git.iko.soy/typeable/pandoc
on d46e055 help sign in
59 files changed+424−822
since splitsnapshots
unifiedsplit
.circleci/config.yml+1−1 .github/ISSUE_TEMPLATE/bug_report.md+25−12 .github/ISSUE_TEMPLATE/bug_report.yml+44 .github/ISSUE_TEMPLATE/config.yml+7−4 .github/ISSUE_TEMPLATE/feature_request.md+9−10 .github/ISSUE_TEMPLATE/feature_request.yml+20 MANUAL.txt+4−4 SECURITY.md−12 cabal.project−9 changelog.md+5−53 data/templates/default.latex+29−29 data/templates/default.revealjs+128−70 data/templates/styles.html+1−2 doc/faqs.md−128 man/pandoc.1+2−2 pandoc.cabal+5−5 src/Text/Pandoc/Citeproc.hs+40−66 src/Text/Pandoc/Citeproc/BibTeX.hs+2−4 src/Text/Pandoc/Error.hs+3−3 src/Text/Pandoc/ImageSize.hs+1−5 src/Text/Pandoc/MediaBag.hs+5−10 src/Text/Pandoc/Parsing.hs+5−4 src/Text/Pandoc/Readers/Docx/Parse.hs+5−11 src/Text/Pandoc/Readers/Metadata.hs−3 src/Text/Pandoc/Readers/Txt2Tags.hs+1−21 src/Text/Pandoc/Writers/Docx.hs+3−19 src/Text/Pandoc/Writers/Docx/Table.hs+3−28 src/Text/Pandoc/Writers/Docx/Types.hs−4 src/Text/Pandoc/Writers/HTML.hs+7−62 src/Text/Pandoc/Writers/LaTeX.hs+1−1 src/Text/Pandoc/Writers/LaTeX/Table.hs+3−11 src/Text/Pandoc/Writers/Markdown.hs+4−6 src/Text/Pandoc/Writers/Powerpoint/Output.hs−1 stack.yaml+11−9 test/Tests/Writers/OOXML.hs+1−3 test/command/2874.md+2−2 test/command/4465.md−15 test/command/6890.md+2−2 test/command/7272.md+1−4 test/command/7376.md−16 test/command/7394.md−85 test/command/7397.md−14 test/command/7400.md−9 test/command/7416.md−19 test/command/pandoc-citeproc-322.md+1−1 test/command/pandoc-citeproc-356.md+7−2 test/command/pandoc-citeproc-chicago-author-date.md+7−7 test/command/pandoc-citeproc-chicago-fullnote-bibliography.md+7−6 test/docx/golden/image.docx test/lhs-test.html+1−2 test/lhs-test.html+lhs+1−2 test/lhs-test.latex+3−3 test/lhs-test.latex+lhs+3−3 test/tables/nordics.latex+4−4 test/writer.html4+1−2 test/writer.html5+1−2 test/writer.latex+4−4 test/writers-lang-and-dir.latex+3−3 tools/build-arm.sh+1−3
.circleci/config.yml+1−1
@@ -2,7 +2,7 @@ version: "2.1"
22jobs:
33 build:
44 macos:
5− xcode: 11.1.0
5+ xcode: 9.4.1
66 environment:
77 HOMEBREW_NO_AUTO_UPDATE: 1
88 steps:
.github/ISSUE_TEMPLATE/bug_report.md+25−12
@@ -2,24 +2,37 @@
22name: Bug report
33about: Create a report to help us improve
44title: ''
5−labels: 'bug'
5+labels: ''
66assignees: ''
77
88---
99
10−<!--
11−Thank you for reporting an issue! Before you continue, please make sure that you have
10+**Describe the bug**
11+A clear and concise description of what the bug is.
1212
13−- searched the issue tracker for similar issues (including closed issues): https://github.com/jgm/pandoc/issues
14−- searched the pandoc-discuss mailing list for solutions: https://groups.google.com/forum/#!forum/pandoc-discuss
15−- reproduced your issue on the latest release of pandoc, or on https://pandoc.org/try
13+**To Reproduce**
14+Steps to reproduce the behavior:
15+1. Go to '...'
16+2. Click on '....'
17+3. Scroll down to '....'
18+4. See error
1619
17−Note that this bug tracker is for reporting bugs, not asking questions. For questions, use the pandoc-discuss mailing list.
18−-->
20+**Expected behavior**
21+A clear and concise description of what you expected to happen.
1922
20−**Explain the problem.**
21−Include the exact command line you used and all inputs necessary to reproduce the issue. Please create as minimal an example as possible, to help the maintainers isolate the problem. Explain the output you received and how it differs from what you expected.
23+**Screenshots**
24+If applicable, add screenshots to help explain your problem.
2225
23−**Pandoc version?**
24−What version of pandoc are you using, on what OS?
26+**Desktop (please complete the following information):**
27+ - OS: [e.g. iOS]
28+ - Browser [e.g. chrome, safari]
29+ - Version [e.g. 22]
2530
31+**Smartphone (please complete the following information):**
32+ - Device: [e.g. iPhone6]
33+ - OS: [e.g. iOS8.1]
34+ - Browser [e.g. stock browser, safari]
35+ - Version [e.g. 22]
36+
37+**Additional context**
38+Add any other context about the problem here.
.github/ISSUE_TEMPLATE/bug_report.ymlnew file+44
@@ -0,0 +1,44 @@
1+---
2+name: 📝 Bug Report
3+description: Report a bug, error, or misbehavior
4+title: "Briefly summarize your issue here"
5+labels: ["bug"]
6+body:
7+- type: markdown
8+ attributes:
9+ value: |
10+ **Thank you for reporting an issue to our issue tracker!**
11+ Before you proceed, please consult our available resources and collect as much information about your issue as possible:
12+
13+- type: checkboxes
14+ attributes:
15+ options:
16+ - label: I have searched [the manual](https://pandoc.org/MANUAL.html) for solutions.
17+ required: true
18+ - label: I have searched [the FAQs](https://pandoc.org/faqs.html) for solutions.
19+ required: true
20+ - label: I have searched [the issue tracker](https://github.com/jgm/pandoc/issues) for similar issues (the closed issues too).
21+ required: true
22+ - label: I have searched [pandoc-discuss](https://groups.google.com/forum/#!forum/pandoc-discuss) for solutions.
23+ required: true
24+ - label: I can reproduce my issue on [the latest release](https://github.com/jgm/pandoc/releases) doom-emacs/commit) of pandoc, or on [try pandoc](https://pandoc.org/try).
25+ required: true
26+ - label: If reporting a behavior change, I have searched the [changelog](https://github.com/jgm/pandoc/changelog.md) to see if it was intentional.
27+ required: true
28+- type: textarea
29+ attributes:
30+ label: Explain how to reproduce the problem.
31+ description: |
32+ + Please give as minimal an example as you can to reproduce the issue.
33+ + Include full command line and all files necessary to reproduce.
34+ validations:
35+ required: true
36+- type: textarea
37+ attributes:
38+ label: What happened, and what did you expect to happen?
39+- type: textarea
40+ attributes:
41+ label: What pandoc version did you use? (`pandoc --version`)
42+ validations:
43+ required: true
44+
.github/ISSUE_TEMPLATE/config.yml+7−4
@@ -1,9 +1,12 @@
11blank_issues_enabled: false
22contact_links:
3− - name: Ask a question
3+ - name: Pandoc User's Guide
4+ url: https://pandoc.org/MANUAL.html
5+ about: "Official manual for pandoc"
6+ - name: pandoc-discuss mailing list
47 url: https://groups.google.com/forum/#!forum/pandoc-discuss
58 about: "Discussion forum for pandoc (may be used as an email list)"
6− - name: Contributing Guidelines
7− url: https://pandoc.org/CONTRIBUTING.html
8− about: "Guidelines for submitting bug reports and code improvements"
9+ - name: Frequently Asked Questions
10+ url: https://pandoc.org/faqs.html
11+ about: "Some frequently asked qusetions (and answers)"
912
.github/ISSUE_TEMPLATE/feature_request.md+9−10
@@ -2,20 +2,19 @@
22name: Feature request
33about: Suggest an idea for this project
44title: ''
5−labels: 'enhancement'
5+labels: ''
66assignees: ''
77
88---
99
10−<!--
11−Thank you for suggesting a feature! Before you continue, please make sure that you have
10+**Is your feature request related to a problem? Please describe.**
11+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1212
13−- read the contributing guidelines: https://pandoc.org/CONTRIBUTING.html
14−- searched the issue tracker for similar issues (including closed issues): https://github.com/jgm/pandoc/issues
15−- searched the pandoc-discuss mailing list for relevant discussions: https://groups.google.com/forum/#!forum/pandoc-discuss
16−-->
13+**Describe the solution you'd like**
14+A clear and concise description of what you want to happen.
1715
18−**Describe your proposed improvement and the problem it solves.**
19−
20−**Describe alternatives you've considered.**
16+**Describe alternatives you've considered**
17+A clear and concise description of any alternative solutions or features you've considered.
2118
19+**Additional context**
20+Add any other context or screenshots about the feature request here.
.github/ISSUE_TEMPLATE/feature_request.ymlnew file+20
@@ -0,0 +1,20 @@
1+---
2+name: 📝 Feature Request
3+description: Propose a new idea or feature
4+title: "Briefly summarize your request here"
5+labels: ["enhancement"]
6+body:
7+- type: checkboxes
8+ attributes:
9+ options:
10+ - label: I have read the [contributing guide](https://github.com/jgm/CONTRIBUTING.md).
11+ required: true
12+ - label: I have searched [the issue tracker](https://github.com/jgm/pandoc/issues) (including closed issues) for similar requests.
13+ required: true
14+ - label: I have searched [the pandoc-discuss mailing list](https://groups.google.com/forum/#!forum/pandoc-discuss) for relevant discussions.
15+ required: true
16+- type: textarea
17+ attributes:
18+ label: Describe your request
19+ required: true
20+
MANUAL.txt+4−4
@@ -1,7 +1,7 @@
11---
22title: Pandoc User's Guide
33author: John MacFarlane
4−date: June 20, 2021
4+date: June 11, 2021
55---
66
77# Synopsis
@@ -6504,9 +6504,9 @@ application, here are some things to keep in mind:
650465044. The HTML generated by pandoc is not guaranteed to be safe.
65056505 If `raw_html` is enabled for the Markdown input, users can
65066506 inject arbitrary HTML. Even if `raw_html` is disabled,
6507− users can include dangerous content in URLs and attributes.
6508− To be safe, you should run all the generated HTML through
6509− an HTML sanitizer.
6507+ users can include dangerous content in attributes for
6508+ headings, spans, and code blocks. To be safe, you should
6509+ run all the generated HTML through an HTML sanitizer.
65106510
65116511# Authors
65126512
SECURITY.mddeleted−12
@@ -1,12 +0,0 @@
1−# Security Policy
2−
3−## Supported Versions
4−
5−Only the most recent version of pandoc is supported with security updates.
6−
7−## Reporting a Vulnerability
8−
9−To report a vulnerability, email the maintainer, jgm@berkeley.edu.
10−But first please read the section of the manual entitled
11−[A note on security](https://pandoc.org/MANUAL.html#a-note-on-security),
12−which describes some security guarantees pandoc does NOT make.
cabal.project−9
@@ -2,12 +2,3 @@ packages: pandoc.cabal
22tests: True
33flags: +embed_data_files
44
5−source-repository-package
6− type: git
7− location: https://github.com/jgm/doctemplates
8− tag: 428c26d5303cf7a2b1051fe1ffd9aafe9ba71c81
9−
10−source-repository-package
11− type: git
12− location: https://github.com/jgm/citeproc
13− tag: 4ce0501cd6f9c86eee087afcf878c256e49b9615
changelog.md+5−53
@@ -1,44 +1,6 @@
11# Revision history for pandoc
22
3−## pandoc 2.14.0.3 (2021-06-22)
4−
5− * Text.Pandoc.MediaBag `insertMediaBag`: ensure we get a sane mediaPath
6− for URLs (#7391). In earlier 2.14.x versions, we'd get
7− incorrect paths for resources downloaded from URLs when the
8− media are extracted (including in PDF production).
9− * Text.Pandoc.Parsing: improve `emailAddress` (#7398).
10− Previously the parser would accept characters in domains
11− that are illegal in domains, and this sometimes caused it
12− to gobble bits of the following text.
13− * txt2tags reader: modify the email address parser so
14− it still includes form parameters, even after the change to
15− `emailAddress` in Text.Pandoc.Parsing.
16− * Text.Pandoc.Readers.Metadata: Fix regression with comment-only YAML
17− metadata blocks (#7400).
18− * reveal.js writer and template: better handling of options. Previously
19− it was impossible to specify false values for options that default to
20− true (e.g. `center`); setting the option to false just caused the portion
21− of the template setting the option to be omitted. Now we prepopulate
22− all the variables with their default values, including them all
23− unconditionally and allowing them to be overridden.
24− * Markdown writer: Fix regression in code blocks with attributes (#7397).
25− Code blocks with a single class but nonempty attributes
26− were having attributes drop as a result of #7242.
27− * LaTeX writer:
28− + Add strut at end of minipage if it contains line breaks.
29− Without them, the last line is not as tall as it should be in
30− some cases.
31− + Always use a minipage for cells with line breaks, when
32− width information is available (#7393). Otherwise the way we treat them
33− can lead to content that overflows a cell.
34− + Use `\strut` instead of `~` before `\\` in empty line.
35− * Use lts-18.0 stack resolver.
36− * Require skylighting 0.10.5.2 (adding support for Swift).
37− * Require commonmark 0.2.1.
38− * Rephrase section on unsafe HTML in manual.
39− * Create SECURITY.md
40−
41−## pandoc 2.14.0.2 (2021-06-13)
3+## pandoc 2.14.0.2 (2021-06-11)
424
435 * Fix MediaBag regressions (#7345). iIn the 2.14 release `--extract-media`
446 stopped working as before; there could be mismatches between the
@@ -86,8 +48,6 @@
8648 ignoring the star usually gives acceptable results). But we
8749 don't want to do this for `\(*\)` and similar cases.
8850
89− * Docx reader: handle absolute URIs in Relationship Target (#7374).
90−
9151 * Docx writer: fix handling of empty table headers (Albert Krewinkel,
9252 #7369). A table header which does not contain any cells is now treated as
9353 an empty header.
@@ -105,11 +65,8 @@
10565 `Ext_fenced_code_attributes`, `Ext_header_attributes`,
10666 `Ext_inline_code_attributes`, `Ext_link_attributes`.
10767
108− * Markdown writer:
109−
110− + Allow `pipe_tables` to be disabled for commonmark formats
111− (`commonmark_x`, `gfm`) (#7375).
112− + Re-use functions from Text.Pandoc.Markdown.Inline (Jan Tojnar).
68+ * Markdown writer: re-use functions from Text.Pandoc.Markdown.Inline (Jan
69+ Tojnar).
11370
11471 * DocBook writer: Remove non-existent admonitions (Jan Tojnar).
11572 `attention`, `error` and `hint` are reStructuredText specific.
@@ -127,13 +84,8 @@
12784 Krewinkel, #7369). Passing an empty list of header cells now results
12885 in an empty table header.
12986
130− * Text.Pandoc.Citeproc:
131−
132− + Avoid duplicate classes and attributes on references div.
133− + Fix regression in citeproc processing (#7376). If inline
134− references are used (in the metadata `references` field), we
135− should still only include in the bibliography items that are
136− actually cited (unless `nocite` is used).
87+ * Text.Pandoc.Citeproc: avoid duplicate classes and attributes on
88+ references div.
13789
13890 * Require citeproc 0.4.0.1. This fixes a bug which led to doubled
13991 "et al." in some (rare) circumstances.
data/templates/default.latex+29−29
@@ -36,6 +36,35 @@ $for(classoption)$
3636 $classoption$$sep$,
3737$endfor$
3838]{$documentclass$}
39+$if(title)$
40+\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
41+$endif$
42+$if(subtitle)$
43+$if(beamer)$
44+$else$
45+\usepackage{etoolbox}
46+\makeatletter
47+\providecommand{\subtitle}[1]{% add subtitle to \maketitle
48+ \apptocmd{\@title}{\par {\large #1 \par}}{}{}
49+}
50+\makeatother
51+$endif$
52+\subtitle{$subtitle$}
53+$endif$
54+\author{$for(author)$$author$$sep$ \and $endfor$}
55+\date{$date$}
56+$if(beamer)$
57+$if(institute)$
58+\institute{$for(institute)$$institute$$sep$ \and $endfor$}
59+$endif$
60+$if(titlegraphic)$
61+\titlegraphic{\includegraphics{$titlegraphic$}}
62+$endif$
63+$if(logo)$
64+\logo{\includegraphics{$logo$}}
65+$endif$
66+$endif$
67+
3968$if(beamer)$
4069$if(background-image)$
4170\usebackgroundtemplate{%
@@ -423,35 +452,6 @@ $if(csquotes)$
423452\usepackage{csquotes}
424453$endif$
425454
426−$if(title)$
427−\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
428−$endif$
429−$if(subtitle)$
430−$if(beamer)$
431−$else$
432−\usepackage{etoolbox}
433−\makeatletter
434−\providecommand{\subtitle}[1]{% add subtitle to \maketitle
435− \apptocmd{\@title}{\par {\large #1 \par}}{}{}
436−}
437−\makeatother
438−$endif$
439−\subtitle{$subtitle$}
440−$endif$
441−\author{$for(author)$$author$$sep$ \and $endfor$}
442−\date{$date$}
443−$if(beamer)$
444−$if(institute)$
445−\institute{$for(institute)$$institute$$sep$ \and $endfor$}
446−$endif$
447−$if(titlegraphic)$
448−\titlegraphic{\includegraphics{$titlegraphic$}}
449−$endif$
450−$if(logo)$
451−\logo{\includegraphics{$logo$}}
452−$endif$
453−$endif$
454−
455455\begin{document}
456456$if(has-frontmatter)$
457457\frontmatter
data/templates/default.revealjs+128−70
@@ -90,198 +90,256 @@ $endif$
9090 // Full list of configuration options available at:
9191 // https://revealjs.com/config/
9292 Reveal.initialize({
93+$if(center)$
94+ // Determines whether slide content should be vertically centered
95+ center: $center$,
96+$endif$
97+$if(controls)$
9398 // Display controls in the bottom right corner
9499 controls: $controls$,
95−
100+$endif$
101+$if(controlsTutorial)$
96102 // Help the user learn the controls by providing hints, for example by
97103 // bouncing the down arrow when they first encounter a vertical slide
98104 controlsTutorial: $controlsTutorial$,
99−
105+$endif$
106+$if(controlsLayout)$
100107 // Determines where controls appear, "edges" or "bottom-right"
101108 controlsLayout: '$controlsLayout$',
102−
109+$endif$
110+$if(controlsBackArrows)$
103111 // Visibility rule for backwards navigation arrows; "faded", "hidden"
104112 // or "visible"
105113 controlsBackArrows: '$controlsBackArrows$',
106−
114+$endif$
115+$if(progress)$
107116 // Display a presentation progress bar
108117 progress: $progress$,
109−
118+$endif$
119+$if(slideNumber)$
110120 // Display the page number of the current slide
111121 slideNumber: $slideNumber$,
112−
122+$endif$
123+$if(showSlideNumber)$
113124 // 'all', 'print', or 'speaker'
114125 showSlideNumber: '$showSlideNumber$',
115−
126+$endif$
116127 // Add the current slide number to the URL hash so that reloading the
117128 // page/copying the URL will return you to the same slide
118− hash: $hash$,
119−
129+ hash: $if(hash)$$hash$$else$true$endif$,
130+$if(hashOneBasedIndex)$
120131 // Start with 1 for the hash rather than 0
121132 hashOneBasedIndex: $hashOneBasedIndex$,
122−
123− // Flags if we should monitor the hash and change slides accordingly
124− respondToHashChanges: $respondToHashChanges$,
125−
133+$endif$
134+$if(history)$
126135 // Push each slide change to the browser history
127136 history: $history$,
128−
137+$endif$
138+$if(keyboard)$
129139 // Enable keyboard shortcuts for navigation
130140 keyboard: $keyboard$,
131−
141+$endif$
142+$if(overview)$
132143 // Enable the slide overview mode
133144 overview: $overview$,
134−
135− // Disables the default reveal.js slide layout (scaling and centering)
136− // so that you can use custom CSS layout
137− disableLayout: false,
138−
145+$endif$
146+$if(center)$
139147 // Vertical centering of slides
140148 center: $center$,
141−
149+$endif$
150+$if(touch)$
142151 // Enables touch navigation on devices with touch input
143152 touch: $touch$,
144−
153+$endif$
154+$if(loop)$
145155 // Loop the presentation
146156 loop: $loop$,
147−
157+$endif$
158+$if(rtl)$
148159 // Change the presentation direction to be RTL
149160 rtl: $rtl$,
150−
161+$endif$
162+$if(navigationMode)$
151163 // see https://revealjs.com/vertical-slides/#navigation-mode
152164 navigationMode: '$navigationMode$',
153−
165+$endif$
166+$if(shuffle)$
154167 // Randomizes the order of slides each time the presentation loads
155168 shuffle: $shuffle$,
156−
169+$endif$
170+$if(fragments)$
157171 // Turns fragments on and off globally
158172 fragments: $fragments$,
159−
173+$endif$
174+$if(fragmentInURL)$
160175 // Flags whether to include the current fragment in the URL,
161176 // so that reloading brings you to the same fragment position
162177 fragmentInURL: $fragmentInURL$,
163−
178+$endif$
179+$if(embedded)$
164180 // Flags if the presentation is running in an embedded mode,
165181 // i.e. contained within a limited portion of the screen
166182 embedded: $embedded$,
167−
183+$endif$
184+$if(help)$
168185 // Flags if we should show a help overlay when the questionmark
169186 // key is pressed
170187 help: $help$,
171−
172− // Flags if it should be possible to pause the presentation (blackout)
173− pause: $pause$,
174−
188+$endif$
189+$if(pause)$
190+ // Flags if it should be possible to pause the presentation (blackout)
191+ pause: $pause$,
192+$endif$
193+$if(showNotes)$
175194 // Flags if speaker notes should be visible to all viewers
176195 showNotes: $showNotes$,
177−
178− // Global override for autoplaying embedded media (null/true/false)
196+$endif$
197+$if(autoPlayMedia)$
198+ // Global override for autoplaying embedded media (video/audio/iframe)
199+ // - null: Media will only autoplay if data-autoplay is present
200+ // - true: All media will autoplay, regardless of individual setting
201+ // - false: No media will autoplay, regardless of individual setting
179202 autoPlayMedia: $autoPlayMedia$,
180−
181− // Global override for preloading lazy-loaded iframes (null/true/false)
203+$endif$
204+$if(preloadIframes)$
205+ // Global override for preloading lazy-loaded iframes
206+ // - null: Iframes with data-src AND data-preload will be loaded when within
207+ // the viewDistance, iframes with only data-src will be loaded when visible
208+ // - true: All iframes with data-src will be loaded when within the viewDistance
209+ // - false: All iframes with data-src will be loaded only when visible
182210 preloadIframes: $preloadIframes$,
183−
211+$endif$
212+$if(autoSlide)$
184213 // Number of milliseconds between automatically proceeding to the
185214 // next slide, disabled when set to 0, this value can be overwritten
186215 // by using a data-autoslide attribute on your slides
187216 autoSlide: $autoSlide$,
188−
217+$endif$
218+$if(autoSlideStoppable)$
189219 // Stop auto-sliding after user input
190220 autoSlideStoppable: $autoSlideStoppable$,
191−
221+$endif$
222+$if(autoSlideMethod)$
192223 // Use this method for navigation when auto-sliding
193224 autoSlideMethod: $autoSlideMethod$,
194−
225+$endif$
226+$if(defaultTiming)$
195227 // Specify the average time in seconds that you think you will spend
196228 // presenting each slide. This is used to show a pacing timer in the
197229 // speaker view
198230 defaultTiming: $defaultTiming$,
199−
231+$endif$
232+$if(totalTime)$
233+ // Specify the total time in seconds that is available to
234+ // present. If this is set to a nonzero value, the pacing
235+ // timer will work out the time available for each slide,
236+ // instead of using the defaultTiming value
237+ totalTime: $totalTime$,
238+$endif$
239+$if(minimumTimePerSlide)$
240+ // Specify the minimum amount of time you want to allot to
241+ // each slide, if using the totalTime calculation method. If
242+ // the automated time allocation causes slide pacing to fall
243+ // below this threshold, then you will see an alert in the
244+ // speaker notes window
245+ minimumTimePerSlide: $minimumTimePerSlide$,
246+$endif$
247+$if(mouseWheel)$
200248 // Enable slide navigation via mouse wheel
201249 mouseWheel: $mouseWheel$,
202−
203− // The display mode that will be used to show slides
204− display: '$display$',
205−
250+$endif$
251+$if(rollingLinks)$
252+ // Apply a 3D roll to links on hover
253+ rollingLinks: $rollingLinks$,
254+$endif$
255+$if(hideInactiveCursor)$
206256 // Hide cursor if inactive
207257 hideInactiveCursor: $hideInactiveCursor$,
208−
258+$endif$
259+$if(hideCursorTime)$
209260 // Time before the cursor is hidden (in ms)
210261 hideCursorTime: $hideCursorTime$,
211−
262+$endif$
263+$if(hideAddressBar)$
264+ // Hides the address bar on mobile devices
265+ hideAddressBar: $hideAddressBar$,
266+$endif$
267+$if(previewLinks)$
212268 // Opens links in an iframe preview overlay
213269 previewLinks: $previewLinks$,
214−
215− // Transition style (none/fade/slide/convex/concave/zoom)
216− transition: '$transition$',
217−
218− // Transition speed (default/fast/slow)
219− transitionSpeed: '$transitionSpeed$',
220−
270+$endif$
271+$if(transition)$
272+ // Transition style
273+ transition: '$transition$', // none/fade/slide/convex/concave/zoom
274+$endif$
275+$if(transitionSpeed)$
276+ // Transition speed
277+ transitionSpeed: '$transitionSpeed$', // default/fast/slow
278+$endif$
279+$if(backgroundTransition)$
221280 // Transition style for full page slide backgrounds
222− // (none/fade/slide/convex/concave/zoom)
223− backgroundTransition: '$backgroundTransition$',
224−
281+ backgroundTransition: '$backgroundTransition$', // none/fade/slide/convex/concave/zoom
282+$endif$
283+$if(viewDistance)$
225284 // Number of slides away from the current that are visible
226285 viewDistance: $viewDistance$,
227−
286+$endif$
287+$if(mobileViewDistance)$
228288 // Number of slides away from the current that are visible on mobile
229289 // devices. It is advisable to set this to a lower number than
230290 // viewDistance in order to save resources.
231291 mobileViewDistance: $mobileViewDistance$,
292+$endif$
232293$if(parallaxBackgroundImage)$
233−
234294 // Parallax background image
235295 parallaxBackgroundImage: '$parallaxBackgroundImage$', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
236296$else$
237297$if(background-image)$
238−
239298 // Parallax background image
240299 parallaxBackgroundImage: '$background-image$', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
241300$endif$
242301$endif$
243302$if(parallaxBackgroundSize)$
244−
245303 // Parallax background size
246304 parallaxBackgroundSize: '$parallaxBackgroundSize$', // CSS syntax, e.g. "2100px 900px"
247305$endif$
248306$if(parallaxBackgroundHorizontal)$
249−
250307 // Amount to move parallax background (horizontal and vertical) on slide change
251308 // Number, e.g. 100
252309 parallaxBackgroundHorizontal: $parallaxBackgroundHorizontal$,
253310$endif$
254311$if(parallaxBackgroundVertical)$
255−
256312 parallaxBackgroundVertical: $parallaxBackgroundVertical$,
257313$endif$
258314$if(width)$
259−
260315 // The "normal" size of the presentation, aspect ratio will be preserved
261316 // when the presentation is scaled to fit different resolutions. Can be
262317 // specified using percentage units.
263318 width: $width$,
264319$endif$
265320$if(height)$
266−
267321 height: $height$,
268322$endif$
269323$if(margin)$
270−
271324 // Factor of the display size that should remain empty around the content
272325 margin: $margin$,
273326$endif$
274327$if(minScale)$
275−
276328 // Bounds for smallest/largest possible scale to apply to content
277329 minScale: $minScale$,
278330$endif$
279331$if(maxScale)$
280−
281332 maxScale: $maxScale$,
282333$endif$
334+$if(zoomKey)$
335+ // Modifier key used to click-zoom to part of the slide
336+ zoomKey: '$zoomKey$',
337+$endif$
338+$if(display)$
339+ // The display mode that will be used to show slides
340+ display: '$display$',
341+$endif$
283342$if(mathjax)$
284−
285343 math: {
286344 mathjax: '$mathjaxurl$',
287345 config: 'TeX-AMS_HTML-full',
data/templates/styles.html+1−2
@@ -14,7 +14,7 @@ body {
1414 padding-top: $if(margin-top)$$margin-top$$else$50px$endif$;
1515 padding-bottom: $if(margin-bottom)$$margin-bottom$$else$50px$endif$;
1616 hyphens: auto;
17− overflow-wrap: break-word;
17+ word-wrap: break-word;
1818 text-rendering: optimizeLegibility;
1919 font-kerning: normal;
2020}
@@ -93,7 +93,6 @@ $endif$
9393pre code {
9494 padding: 0;
9595 overflow: visible;
96− overflow-wrap: normal;
9796}
9897.sourceCode {
9998 background-color: transparent;
doc/faqs.mddeleted−128
@@ -1,128 +0,0 @@
1−% FAQs
2−
3−::: faqs
4−
5−## How can I convert a whole directory of files from Markdown to RTF?
6−
7−On linux or OSX:
8−
9− for f in *.txt; do pandoc "$f" -s -o "${f%.txt}.rtf"; done
10−
11−
12−In Windows Powershell:
13−
14− gci -r -i *.txt |foreach{$rtf=$_.directoryname+"\"+$_.basename+".rtf";pandoc -f markdown -s $_.name -o $rtf}
15−
16−## I used pandoc to convert a document to ICML (or OPML or RTF), and when I try to open it I'm told it's invalid. What have I done wrong?
17−
18−Be sure to use the `-s` or `--standalone` flag, or you just get a
19−fragment, not a full document with the required header:
20−
21− pandoc -s -f markdown -t icml -o my.icml my.md
22−
23−## I get a blank document when I try to convert a markdown document in Chinese to PDF.
24−
25−By default, pandoc uses pdflatex to generate the PDF, and pdflatex
26−doesn't handle Chinese characters. But you can change the default to
27−use xelatex instead. You should also make sure you're using a font
28−with Chinese glyphs. For example:
29−
30− pandoc -o c.pdf --pdf-engine=xelatex -V mainfont='Adobe Ming Std'
31−
32−## The Windows installer does a single user install, rather than installing pandoc for all users. How can I install pandoc for all users?
33−
34−Run the following command as admin:
35−
36− msiexec /i pandoc-VERSION.msi ALLUSERS=1
37−
38−This will put pandoc in `C:\Program Files\Pandoc`.
39−You can install Pandoc to a different directory by setting APPLICATIONFOLDER parameter,
40−for example:
41−
42− msiexec /i pandoc-1.11.1.msi ALLUSERS=1 APPLICATIONFOLDER="C:\Pandoc"
43−
44−## How do I change the margins in PDF output?
45−
46−The option
47−
48− -V geometry:margin=1in
49−
50−will set the margins to one inch on each side. If you don't want uniform
51−margins, you can do something like
52−
53− -V geometry:"top=2cm, bottom=1.5cm, left=1cm, right=1cm"
54−
55−Or
56−
57− -V geometry:"left=3cm, width=10cm"
58−
59−For more options, see the documentation for the LaTeX [geometry
60−package](https://www.ctan.org/pkg/geometry).
61−
62−## How does pandoc compare to multimarkdown?
63−
64−Here is a [wiki
65−page](https://github.com/jgm/pandoc/wiki/Pandoc-vs-Multimarkdown)
66−comparing the two.
67−
68−## When I specify an image width of 50% and convert to LaTeX, pandoc sets the height to textheight and the aspect ratio isn't preserved. How can I prevent this?
69−
70−For example, if you convert an image with `{width="50%"}`, the LaTeX produced
71−will be `\includegraphics[width=0.5\textwidth,height=\textheight]`.
72−
73−This output presupposes the following code in pandoc's default latex
74−template:
75−
76−```
77−% Scale images if necessary, so that they will not overflow the page
78−% margins by default, and it is still possible to overwrite the defaults
79−% using explicit options in \includegraphics[width, height, ...]{}
80−\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
81−```
82−
83−If you don't have this in your custom template, you should
84−add it. If we didn't set the `height` explicitly in this way,
85−the image would not be resized correctly unless it was
86−being resized to smaller than its original size.
87−
88−## Pandoc sometimes uses too much memory. How can I limit the memory used by pandoc?
89−
90−`pandoc +RTS -M30m -RTS` will limit heap memory to 30MB.
91−When converting a document requires more than this, an out of
92−memory error will be issued.
93−
94−## When using `--include-in-header` with PDF or LaTeX output, how do I reference tex declarations coming after `$header-includes$` in the default template?
95−
96−For various reasons, the `$header-includes$` are not at the very
97−end of the LaTeX preamble. This poses a problem when the code
98−you are inserting depends on declarations in the preamble coming
99−after the `$header-includes$` location. For example, you might
100−want to reference the `\author` and `\title` metadata values
101−(set at the very bottom of the preamble) and present them in
102−margins. In that case you can wrap your code in `etoolbox`'s
103−`\AtEndPreamble`. The technique is demonstrated in [this
104−gist](https://gist.github.com/JohnLukeBentley/9dda6166b9ee5c4127afd2b8cd16b70a).
105−When using `\AtEndPreamble`, keep any `makeatletter` or
106−`makeatother` outside of the `\AtEndPreamble`, as shown in the
107−example.
108−
109−## How can I convert PDFs to other formats using pandoc?
110−
111−You can't. You can try opening the PDF in Word or Google Docs
112−and saving in a format from which pandoc can convert directly.
113−
114−## Do I really need to install a 1 GB TeX installation to produce a PDF using pandoc?
115−
116−No. You can get by with a relatively small TeX installation,
117−for example, by starting with MacTeX's Basic TeX distribution
118−and using the `tlmgr` tool to install a few packages required by pandoc
119−(see https://pandoc.org/MANUAL.html#creating-a-pdf).
120−
121−Or, you can produce PDFs via HTML and `wkhtmltopdf`,
122−or via groff ms and `pdfroff`. (These don't produce as nice
123−topography as TeX, particularly when it comes to math, but they
124−may be fine for many purposes.)
125−
126−
127−:::
128−
man/pandoc.1+2−2
@@ -1,7 +1,7 @@
11'\" t
22.\" Automatically generated by Pandoc 2.14.0.1
33.\"
4−.TH "Pandoc User\[cq]s Guide" "" "June 20, 2021" "pandoc 2.14.0.3" ""
4+.TH "Pandoc User\[cq]s Guide" "" "June 11, 2021" "pandoc 2.14.0.2" ""
55.hy
66.SH NAME
77pandoc - general markup converter
@@ -7708,7 +7708,7 @@ The HTML generated by pandoc is not guaranteed to be safe.
77087708If \f[C]raw_html\f[R] is enabled for the Markdown input, users can
77097709inject arbitrary HTML.
77107710Even if \f[C]raw_html\f[R] is disabled, users can include dangerous
7711−content in URLs and attributes.
7711+content in attributes for headings, spans, and code blocks.
77127712To be safe, you should run all the generated HTML through an HTML
77137713sanitizer.
77147714.SH AUTHORS
pandoc.cabal+5−5
@@ -1,6 +1,6 @@
11cabal-version: 2.2
22name: pandoc
3−version: 2.14.0.3
3+version: 2.14.0.2
44build-type: Simple
55license: GPL-2.0-or-later
66license-file: COPYING.md
@@ -451,9 +451,9 @@ library
451451 bytestring >= 0.9 && < 0.12,
452452 case-insensitive >= 1.2 && < 1.3,
453453 citeproc >= 0.4.0.1 && < 0.4.1,
454− commonmark >= 0.2.1 && < 0.3,
454+ commonmark >= 0.2 && < 0.3,
455455 commonmark-extensions >= 0.2.1.2 && < 0.3,
456− commonmark-pandoc >= 0.2.1.1 && < 0.3,
456+ commonmark-pandoc >= 0.2.1 && < 0.3,
457457 connection >= 0.3.1,
458458 containers >= 0.4.2.1 && < 0.7,
459459 data-default >= 0.4 && < 0.8,
@@ -484,8 +484,8 @@ library
484484 random >= 1 && < 1.3,
485485 safe >= 0.3.18 && < 0.4,
486486 scientific >= 0.3 && < 0.4,
487− skylighting >= 0.10.5.2 && < 0.10.6,
488− skylighting-core >= 0.10.5.2 && < 0.10.6,
487+ skylighting >= 0.10.5.1 && < 0.10.6,
488+ skylighting-core >= 0.10.5.1 && < 0.10.6,
489489 split >= 0.2 && < 0.3,
490490 syb >= 0.1 && < 0.8,
491491 tagsoup >= 0.14.6 && < 0.15,
src/Text/Pandoc/Citeproc.hs+40−66
@@ -27,7 +27,7 @@ import Text.Pandoc.Error (PandocError(..))
2727import Text.Pandoc.Extensions (pandocExtensions)
2828import Text.Pandoc.Logging (LogMessage(..))
2929import Text.Pandoc.Options (ReaderOptions(..))
30−import Text.Pandoc.Shared (stringify, ordNub, tshow)
30+import Text.Pandoc.Shared (stringify, ordNub, blocksToInlines, tshow)
3131import qualified Text.Pandoc.UTF8 as UTF8
3232import Text.Pandoc.Walk (query, walk, walkM)
3333import Control.Applicative ((<|>))
@@ -49,7 +49,6 @@ import qualified Data.Text as T
4949import System.FilePath (takeExtension)
5050import Safe (lastMay, initSafe)
5151
52−
5352processCitations :: PandocMonad m => Pandoc -> m Pandoc
5453processCitations (Pandoc meta bs) = do
5554 style <- getStyle (Pandoc meta bs)
@@ -91,18 +90,22 @@ processCitations (Pandoc meta bs) = do
9190 walk (convertQuotes locale) .
9291 insertSpace $ out)
9392 (resultBibliography result)
94− let moveNotes = styleIsNoteStyle sopts &&
95− maybe True truish (lookupMeta "notes-after-punctuation" meta)
93+ let moveNotes = maybe True truish $
94+ lookupMeta "notes-after-punctuation" meta
9695 let cits = map (walk (convertQuotes locale)) $
9796 resultCitations result
9897
98+ let fixQuotes = case localePunctuationInQuote locale of
99+ Just True ->
100+ B.toList . movePunctuationInsideQuotes . B.fromList
101+ _ -> id
102+
99103 let metanocites = lookupMeta "nocite" meta
100104 let Pandoc meta'' bs' =
101105 maybe id (setMeta "nocite") metanocites .
102− walk (mvPunct moveNotes locale) .
103− (if styleIsNoteStyle sopts
104− then walk addNote . walk deNote
105− else id) .
106+ walk (map capitalizeNoteCitation .
107+ fixQuotes . mvPunct moveNotes locale) .
108+ walk deNote .
106109 evalState (walkM insertResolvedCitations $ Pandoc meta' bs)
107110 $ cits
108111 return $ Pandoc meta''
@@ -191,9 +194,7 @@ getReferences mblocale (Pandoc meta bs) = do
191194 then const True
192195 else (`Set.member` citeIds)
193196 let inlineRefs = case lookupMeta "references" meta of
194− Just (MetaList rs) ->
195− filter (idpred . unItemId . referenceId)
196− $ mapMaybe metaValueToReference rs
197+ Just (MetaList rs) -> mapMaybe metaValueToReference rs
197198 _ -> []
198199 externalRefs <- case lookupMeta "bibliography" meta of
199200 Just (MetaList xs) ->
@@ -372,6 +373,7 @@ formatFromExtension fp = case dropWhile (== '.') $ takeExtension fp of
372373
373374
374375isNote :: Inline -> Bool
376+isNote (Note _) = True
375377isNote (Cite _ [Note _]) = True
376378 -- the following allows citation styles that are "in-text" but use superscript
377379 -- references to be treated as if they are "notes" for the purposes of moving
@@ -384,12 +386,6 @@ isSpacy Space = True
384386isSpacy SoftBreak = True
385387isSpacy _ = False
386388
387−movePunctInsideQuotes :: Locale -> [Inline] -> [Inline]
388−movePunctInsideQuotes locale
389− | localePunctuationInQuote locale == Just True
390− = B.toList . movePunctuationInsideQuotes . B.fromList
391− | otherwise
392− = id
393389
394390mvPunct :: Bool -> Locale -> [Inline] -> [Inline]
395391mvPunct moveNotes locale (x : xs)
@@ -402,8 +398,7 @@ mvPunct moveNotes locale (q : s : x : ys)
402398 in if moveNotes
403399 then if T.null spunct
404400 then q : x : mvPunct moveNotes locale ys
405− else movePunctInsideQuotes locale
406− [q , Str spunct , x] ++ mvPunct moveNotes locale
401+ else q : Str spunct : x : mvPunct moveNotes locale
407402 (B.toList
408403 (dropTextWhile isPunctuation (B.fromList ys)))
409404 else q : x : mvPunct moveNotes locale ys
@@ -415,10 +410,9 @@ mvPunct moveNotes locale (Cite cs ils : ys)
415410 , moveNotes
416411 = let s = stringify ys
417412 spunct = T.takeWhile isPunctuation s
418− in Cite cs (movePunctInsideQuotes locale $
419− init ils
420− ++ [Str spunct | not (endWithPunct False (init ils))]
421− ++ [last ils]) :
413+ in Cite cs (init ils
414+ ++ [Str spunct | not (endWithPunct False (init ils))]
415+ ++ [last ils]) :
422416 mvPunct moveNotes locale
423417 (B.toList (dropTextWhile isPunctuation (B.fromList ys)))
424418mvPunct moveNotes locale (s : x : ys) | isSpacy s, isNote x =
@@ -564,62 +558,42 @@ extractText (FancyVal x) = toText x
564558extractText (NumVal n) = T.pack (show n)
565559extractText _ = mempty
566560
567−-- Here we take the Spans with class csl-note that are left
568−-- after deNote has removed nested ones, and convert them
569−-- into real notes.
570−addNote :: Inline -> Inline
571−addNote (Span ("",["csl-note"],[]) ils) =
572− Note [Para $
573− B.toList . addTextCase Nothing CapitalizeFirst . B.fromList $ ils]
574−addNote x = x
575−
576−-- Here we handle citation notes that occur inside footnotes
577−-- or other citation notes, in a note style. We don't want
578−-- notes inside notes, so we convert these to parenthesized
579−-- or comma-separated citations.
580−deNote :: Inline -> Inline
581−deNote (Note bs) =
582− case bs of
583− [Para (cit@(Cite (c:_) _) : ils)]
584− | citationMode c /= AuthorInText ->
585− -- if citation is first in note, no need to parenthesize.
586− Note [Para (walk removeNotes $ cit : walk addParens ils)]
587− _ -> Note (walk removeNotes . walk addParens $ bs)
588−
561+capitalizeNoteCitation :: Inline -> Inline
562+capitalizeNoteCitation (Cite cs [Note [Para ils]]) =
563+ Cite cs
564+ [Note [Para $ B.toList $ addTextCase Nothing CapitalizeFirst
565+ $ B.fromList ils]]
566+capitalizeNoteCitation x = x
567+
568+deNote :: [Inline] -> [Inline]
569+deNote [] = []
570+deNote (Note bs:rest) =
571+ Note (walk go bs) : deNote rest
589572 where
590− addParens [] = []
591− addParens (Cite (c:cs) ils : zs)
573+ go [] = []
574+ go (Cite (c:cs) ils : zs)
592575 | citationMode c == AuthorInText
593− = Cite (c:cs) (concatMap (noteAfterComma (needsPeriod zs)) ils) :
594− addParens zs
576+ = Cite (c:cs) (concatMap (noteAfterComma (needsPeriod zs)) ils) : go zs
595577 | otherwise
596− = Cite (c:cs) (concatMap noteInParens ils) : addParens zs
597− addParens (x:xs) = x : addParens xs
598−
599− removeNotes (Span ("",["csl-note"],[]) ils) = Span ("",[],[]) ils
600− removeNotes x = x
601−
578+ = Cite (c:cs) (concatMap noteInParens ils) : go zs
579+ go (x:xs) = x : go xs
602580 needsPeriod [] = True
603581 needsPeriod (Str t:_) = case T.uncons t of
604582 Nothing -> False
605583 Just (c,_) -> isUpper c
606584 needsPeriod (Space:zs) = needsPeriod zs
607585 needsPeriod _ = False
608−
609− noteInParens (Span ("",["csl-note"],[]) ils)
586+ noteInParens (Note bs')
610587 = Space : Str "(" :
611− removeFinalPeriod ils ++ [Str ")"]
588+ removeFinalPeriod (blocksToInlines bs') ++ [Str ")"]
612589 noteInParens x = [x]
613−
614− noteAfterComma needsPer (Span ("",["csl-note"],[]) ils)
615− | not (null ils)
590+ noteAfterComma needsPer (Note bs')
616591 = Str "," : Space :
617− if needsPer
618− then ils
619− else removeFinalPeriod ils
592+ (if needsPer
593+ then id
594+ else removeFinalPeriod) (blocksToInlines bs')
620595 noteAfterComma _ x = [x]
621−
622−deNote x = x
596+deNote (x:xs) = x : deNote xs
623597
624598-- Note: we can't use dropTextWhileEnd indiscriminately,
625599-- because this would remove the final period on abbreviations like Ibid.
src/Text/Pandoc/Citeproc/BibTeX.hs+2−4
@@ -71,11 +71,9 @@ readBibtexString variant locale idpred contents = do
7171 filter (\item -> idpred (identifier item) &&
7272 entryType item /= "xdata"))
7373 (fromMaybe defaultLang $ localeLanguage locale, Map.empty)
74− (initialSourceName sources) sources of
74+ "" (toSources contents) of
7575 Left err -> Left err
7676 Right xs -> return xs
77− where
78− sources = toSources contents
7977
8078-- | Write BibTeX or BibLaTeX given given a 'Reference'.
8179writeBibtexString :: WriterOptions -- ^ options (for writing LaTex)
@@ -868,7 +866,7 @@ fieldName = resolveAlias . T.toLower
868866
869867isBibtexKeyChar :: Char -> Bool
870868isBibtexKeyChar c =
871− isAlphaNum c || c `elem` (".:;?!`'()$/*@_+=-[]*&" :: [Char])
869+ isAlphaNum c || c `elem` (".:;?!`'()/*@_+=-[]*&" :: [Char])
872870
873871bibItem :: BibParser Item
874872bibItem = do
src/Text/Pandoc/Error.hs+3−3
@@ -97,13 +97,13 @@ renderError e =
9797 [] -> ""
9898 ((pos,txt):_) ->
9999 let ls = T.lines txt <> [""]
100− ln = (errLine - sourceLine pos) + 1
101− in if length ls > ln && ln >= 1
100+ ln = errLine - sourceLine pos
101+ in if length ls > ln - 1
102102 then T.concat ["\n", ls !! (ln - 1)
103103 ,"\n", T.replicate (errColumn - 1) " "
104104 ,"^"]
105105 else ""
106− in "Error at " <> tshow err' <> errorInFile
106+ in "\nError at " <> tshow err' <> errorInFile
107107 PandocMakePDFError s -> s
108108 PandocOptionError s -> s
109109 PandocSyntaxMapError s -> s
src/Text/Pandoc/ImageSize.hs+1−5
@@ -57,8 +57,7 @@ import Codec.Picture (decodeImageWithMetadata)
5757-- quick and dirty functions to get image sizes
5858-- algorithms borrowed from wwwis.pl
5959
60−data ImageType = Png | Gif | Jpeg | Svg | Pdf | Eps | Emf | Tiff
61− deriving Show
60+data ImageType = Png | Gif | Jpeg | Svg | Pdf | Eps | Emf deriving Show
6261data Direction = Width | Height
6362instance Show Direction where
6463 show Width = "width"
@@ -101,8 +100,6 @@ imageType :: ByteString -> Maybe ImageType
101100imageType img = case B.take 4 img of
102101 "\x89\x50\x4e\x47" -> return Png
103102 "\x47\x49\x46\x38" -> return Gif
104− "\x49\x49\x2a\x00" -> return Tiff
105− "\x4D\x4D\x00\x2a" -> return Tiff
106103 "\xff\xd8\xff\xe0" -> return Jpeg -- JFIF
107104 "\xff\xd8\xff\xe1" -> return Jpeg -- Exif
108105 "%PDF" -> return Pdf
@@ -127,7 +124,6 @@ imageSize opts img = checkDpi <$>
127124 Just Png -> getSize img
128125 Just Gif -> getSize img
129126 Just Jpeg -> getSize img
130− Just Tiff -> getSize img
131127 Just Svg -> mbToEither "could not determine SVG size" $ svgSize opts img
132128 Just Eps -> mbToEither "could not determine EPS size" $ epsSize img
133129 Just Pdf -> mbToEither "could not determine PDF size" $ pdfSize img
src/Text/Pandoc/MediaBag.hs+5−10
@@ -26,14 +26,13 @@ module Text.Pandoc.MediaBag (
2626import qualified Data.ByteString.Lazy as BL
2727import Data.Data (Data)
2828import qualified Data.Map as M
29−import Data.Maybe (fromMaybe, isNothing)
29+import Data.Maybe (fromMaybe)
3030import Data.Typeable (Typeable)
3131import System.FilePath
3232import Text.Pandoc.MIME (MimeType, getMimeTypeDef, extensionFromMimeType)
3333import Data.Text (Text)
3434import qualified Data.Text as T
3535import Data.Digest.Pure.SHA (sha1, showDigest)
36−import Network.URI (URI (..), parseURI)
3736
3837data MediaItem =
3938 MediaItem
@@ -77,20 +76,16 @@ insertMedia fp mbMime contents (MediaBag mediamap) =
7776 , mediaContents = contents
7877 , mediaMimeType = mt }
7978 fp' = canonicalize fp
80− uri = parseURI fp
81− newpath = if isRelative fp
82− && isNothing uri
83− && ".." `notElem` splitPath fp
79+ newpath = if isRelative fp && ".." `notElem` splitPath fp
8480 then T.unpack fp'
8581 else showDigest (sha1 contents) <> "." <> ext
8682 fallback = case takeExtension fp of
8783 ".gz" -> getMimeTypeDef $ dropExtension fp
8884 _ -> getMimeTypeDef fp
8985 mt = fromMaybe fallback mbMime
90− path = maybe fp uriPath uri
91− ext = case takeExtension path of
92− '.':e -> e
93− _ -> maybe "" T.unpack $ extensionFromMimeType mt
86+ ext = case takeExtension fp of
87+ '.':e -> e
88+ _ -> maybe "" T.unpack $ extensionFromMimeType mt
9489
9590
9691-- | Lookup a media item in a 'MediaBag', returning mime type and contents.
src/Text/Pandoc/Parsing.hs+5−4
@@ -188,7 +188,7 @@ import Control.Monad.Identity
188188import Control.Monad.Reader
189189 ( asks, runReader, MonadReader(ask), Reader, ReaderT(ReaderT) )
190190import Data.Char (chr, isAlphaNum, isAscii, isAsciiUpper, isAsciiLower,
191− isSpace, ord, toLower, toUpper)
191+ isPunctuation, isSpace, ord, toLower, toUpper)
192192import Data.Default ( Default(..) )
193193import Data.Functor (($>))
194194import Data.List (intercalate, transpose)
@@ -693,12 +693,13 @@ emailAddress = try $ toResult <$> mailbox <*> (char '@' *> domain)
693693 mailbox = intercalate "." <$> (emailWord `sepBy1'` dot)
694694 domain = intercalate "." <$> (subdomain `sepBy1'` dot)
695695 dot = char '.'
696− subdomain = many1 $ alphaNum <|> innerPunct (=='-')
696+ subdomain = many1 $ alphaNum <|> innerPunct
697697 -- this excludes some valid email addresses, since an
698698 -- email could contain e.g. '__', but gives better results
699699 -- for our purposes, when combined with markdown parsing:
700− innerPunct f = try (satisfy f
701− <* notFollowedBy (satisfy (not . isAlphaNum)))
700+ innerPunct = try (satisfy (\c -> isEmailPunct c || c == '@')
701+ <* notFollowedBy space
702+ <* notFollowedBy (satisfy isPunctuation))
702703 -- technically an email address could begin with a symbol,
703704 -- but allowing this creates too many problems.
704705 -- See e.g. https://github.com/jgm/pandoc/issues/2940
src/Text/Pandoc/Readers/Docx/Parse.hs+5−11
@@ -479,26 +479,20 @@ filePathToRelType path docXmlPath =
479479 then Just InDocument
480480 else Nothing
481481
482−relElemToRelationship :: FilePath -> DocumentLocation -> Element
483− -> Maybe Relationship
484−relElemToRelationship fp relType element | qName (elName element) == "Relationship" =
482+relElemToRelationship :: DocumentLocation -> Element -> Maybe Relationship
483+relElemToRelationship relType element | qName (elName element) == "Relationship" =
485484 do
486485 relId <- findAttr (QName "Id" Nothing Nothing) element
487486 target <- findAttr (QName "Target" Nothing Nothing) element
488− -- target may be relative (media/image1.jpeg) or absolute
489− -- (/word/media/image1.jpeg); we need to relativize it (see #7374)
490− let frontOfFp = T.pack $ takeWhile (/= '_') fp
491− let target' = fromMaybe target $
492− T.stripPrefix frontOfFp $ T.dropWhile (== '/') target
493− return $ Relationship relType relId target'
494−relElemToRelationship _ _ _ = Nothing
487+ return $ Relationship relType relId target
488+relElemToRelationship _ _ = Nothing
495489
496490filePathToRelationships :: Archive -> FilePath -> FilePath -> [Relationship]
497491filePathToRelationships ar docXmlPath fp
498492 | Just relType <- filePathToRelType fp docXmlPath
499493 , Just entry <- findEntryByPath fp ar
500494 , Just relElems <- parseXMLFromEntry entry =
501− mapMaybe (relElemToRelationship fp relType) $ elChildren relElems
495+ mapMaybe (relElemToRelationship relType) $ elChildren relElems
502496filePathToRelationships _ _ _ = []
503497
504498archiveToRelationships :: Archive -> FilePath -> [Relationship]
src/Text/Pandoc/Readers/Metadata.hs−3
@@ -45,9 +45,6 @@ yamlBsToMeta pMetaValue bstr = do
4545 Right [] -> return . return $ mempty
4646 Right [YAML.Doc (YAML.Scalar _ YAML.SNull)]
4747 -> return . return $ mempty
48− -- the following is what we get from a comment:
49− Right [YAML.Doc (YAML.Scalar _ (YAML.SUnknown _ ""))]
50− -> return . return $ mempty
5148 Right _ -> Prelude.fail "expected YAML object"
5249 Left (yamlpos, err')
5350 -> do pos <- getPosition
src/Text/Pandoc/Readers/Txt2Tags.hs+1−21
@@ -478,29 +478,9 @@ macro = try $ do
478478-- raw URLs in text are automatically linked
479479url :: T2T Inlines
480480url = try $ do
481− (rawUrl, escapedUrl) <- try uri <|> emailAddress'
481+ (rawUrl, escapedUrl) <- try uri <|> emailAddress
482482 return $ B.link rawUrl "" (B.str escapedUrl)
483483
484−emailAddress' :: T2T (Text, Text)
485−emailAddress' = do
486− (base, mailURI) <- emailAddress
487− query <- option "" emailQuery
488− return (base <> query, mailURI <> query)
489−
490−emailQuery :: T2T Text
491−emailQuery = do
492− char '?'
493− parts <- kv `sepBy1` (char '&')
494− return $ "?" <> T.intercalate "&" parts
495−
496−kv :: T2T Text
497−kv = do
498− k <- T.pack <$> many1 alphaNum
499− char '='
500− let vchar = alphaNum <|> try (oneOf "%._/~:,=$@&+-;*" <* lookAhead alphaNum)
501− v <- T.pack <$> many1 vchar
502− return (k <> "=" <> v)
503−
504484uri :: T2T (Text, Text)
505485uri = try $ do
506486 address <- t2tURI
src/Text/Pandoc/Writers/Docx.hs+3−19
@@ -36,8 +36,7 @@ import Data.Time.Clock.POSIX
3636import Data.Digest.Pure.SHA (sha1, showDigest)
3737import Skylighting
3838import Text.Collate.Lang (renderLang)
39−import Text.Pandoc.Class.PandocMonad (PandocMonad, report, toLang, translateTerm)
40−import qualified Text.Pandoc.Translations as Term
39+import Text.Pandoc.Class.PandocMonad (PandocMonad, report, toLang)
4140import qualified Text.Pandoc.Class.PandocMonad as P
4241import Data.Time
4342import Text.Pandoc.UTF8 (fromTextLazy)
@@ -855,28 +854,14 @@ blockToOpenXML' opts (Plain lst) = do
855854-- title beginning with fig: indicates that the image is a figure
856855blockToOpenXML' opts (Para [Image attr alt (src,T.stripPrefix "fig:" -> Just tit)]) = do
857856 setFirstPara
858− fignum <- gets stNextFigureNum
859− unless (null alt) $ modify $ \st -> st{ stNextFigureNum = fignum + 1 }
860− let figid = "fig" <> tshow fignum
861− figname <- translateTerm Term.Figure
862857 prop <- pStyleM $
863858 if null alt
864859 then "Figure"
865860 else "Captioned Figure"
866861 paraProps <- local (\env -> env { envParaProperties = EnvProps (Just prop) [] <> envParaProperties env }) (getParaProps False)
867862 contents <- inlinesToOpenXML opts [Image attr alt (src,tit)]
868− captionNode <- if null alt
869− then return []
870− else withParaPropM (pStyleM "Image Caption")
871− $ blockToOpenXML opts
872− (Para $ Span (figid,[],[])
873− [Str (figname <> "\160"),
874− RawInline (Format "openxml")
875− ("<w:fldSimple w:instr=\"SEQ Figure"
876− <> " \\* ARABIC \"><w:r><w:t>"
877− <> tshow fignum
878− <> "</w:t></w:r></w:fldSimple>"),
879− Str ":", Space] : alt)
863+ captionNode <- withParaPropM (pStyleM "Image Caption")
864+ $ blockToOpenXML opts (Para alt)
880865 return $
881866 Elem (mknode "w:p" [] (map Elem paraProps ++ contents))
882867 : captionNode
@@ -1304,7 +1289,6 @@ inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do
13041289 Just Eps -> ".eps"
13051290 Just Svg -> ".svg"
13061291 Just Emf -> ".emf"
1307− Just Tiff -> ".tiff"
13081292 Nothing -> ""
13091293 imgpath = "media/" <> ident <> imgext
13101294 mbMimeType = mt <|> getMimeType (T.unpack imgpath)
src/Text/Pandoc/Writers/Docx/Table.hs+3−28
@@ -17,7 +17,7 @@ import Control.Monad.State.Strict
1717import Data.Array
1818import Data.Text (Text)
1919import Text.Pandoc.Definition
20−import Text.Pandoc.Class.PandocMonad (PandocMonad, translateTerm)
20+import Text.Pandoc.Class.PandocMonad (PandocMonad)
2121import Text.Pandoc.Writers.Docx.Types
2222import Text.Pandoc.Shared
2323import Text.Printf (printf)
@@ -25,7 +25,6 @@ import Text.Pandoc.Writers.GridTable hiding (Table)
2525import Text.Pandoc.Writers.OOXML
2626import Text.Pandoc.XML.Light as XML hiding (Attr)
2727import qualified Data.Text as T
28−import qualified Text.Pandoc.Translations as Term
2928import qualified Text.Pandoc.Writers.GridTable as Grid
3029
3130tableToOpenXML :: PandocMonad m
@@ -34,23 +33,15 @@ tableToOpenXML :: PandocMonad m
3433 -> WS m [Content]
3534tableToOpenXML blocksToOpenXML gridTable = do
3635 setFirstPara
37− let (Grid.Table (ident,_,_) caption colspecs _rowheads thead tbodies tfoot) =
36+ let (Grid.Table _attr caption colspecs _rowheads thead tbodies tfoot) =
3837 gridTable
3938 let (Caption _maybeShortCaption captionBlocks) = caption
40− tablenum <- gets stNextTableNum
41− unless (null captionBlocks) $
42− modify $ \st -> st{ stNextTableNum = tablenum + 1 }
43− let tableid = if T.null ident
44− then "table" <> tshow tablenum
45− else ident
46− tablename <- translateTerm Term.Table
4739 let captionStr = stringify captionBlocks
4840 let aligns = map fst $ elems colspecs
4941 captionXml <- if null captionBlocks
5042 then return []
5143 else withParaPropM (pStyleM "Table Caption")
52− $ blocksToOpenXML
53− $ addLabel tableid tablename tablenum captionBlocks
44+ $ blocksToOpenXML captionBlocks
5445 -- We set "in table" after processing the caption, because we don't
5546 -- want the "Table Caption" style to be overwritten with "Compact".
5647 modify $ \s -> s { stInTable = True }
@@ -90,22 +81,6 @@ tableToOpenXML blocksToOpenXML gridTable = do
9081 modify $ \s -> s { stInTable = False }
9182 return $ captionXml ++ [Elem tbl]
9283
93−addLabel :: Text -> Text -> Int -> [Block] -> [Block]
94−addLabel tableid tablename tablenum bs =
95− case bs of
96− (Para ils : rest) -> Para (label : Space : ils) : rest
97− (Plain ils : rest) -> Plain (label : Space : ils) : rest
98− _ -> Para [label] : bs
99− where
100− label = Span (tableid,[],[])
101− [Str (tablename <> "\160"),
102− RawInline (Format "openxml")
103− ("<w:fldSimple w:instr=\"SEQ Table"
104− <> " \\* ARABIC \"><w:r><w:t>"
105− <> tshow tablenum
106− <> "</w:t></w:r></w:fldSimple>"),
107− Str ":"]
108−
10984-- | Parts of a table
11085data RowType = HeadRow | BodyRow | FootRow
11186
src/Text/Pandoc/Writers/Docx/Types.hs−4
@@ -117,8 +117,6 @@ data WriterState = WriterState{
117117 , stDynamicParaProps :: Set.Set ParaStyleName
118118 , stDynamicTextProps :: Set.Set CharStyleName
119119 , stCurId :: Int
120− , stNextFigureNum :: Int
121− , stNextTableNum :: Int
122120 }
123121
124122defaultWriterState :: WriterState
@@ -139,8 +137,6 @@ defaultWriterState = WriterState{
139137 , stDynamicParaProps = Set.empty
140138 , stDynamicTextProps = Set.empty
141139 , stCurId = 20
142− , stNextFigureNum = 1
143− , stNextTableNum = 1
144140 }
145141
146142setFirstPara :: PandocMonad m => WS m ()
src/Text/Pandoc/Writers/HTML.hs+7−62
@@ -26,13 +26,8 @@ module Text.Pandoc.Writers.HTML (
2626 writeSlideous,
2727 writeDZSlides,
2828 writeRevealJs,
29− tagWithAttributes,
30− inlineToHtml,
31− blockToHtml,
32− WriterState(..),
33− defaultWriterState
29+ tagWithAttributes
3430 ) where
35−
3631import Control.Monad.State.Strict
3732import Data.Char (ord)
3833import Data.List (intercalate, intersperse, partition, delete, (\\), foldl')
@@ -349,52 +344,6 @@ pandocToHtml opts (Pandoc meta blocks) = do
349344 PlainMath -> defField "displaymath-css" True
350345 WebTeX _ -> defField "displaymath-css" True
351346 _ -> id) .
352− (if slideVariant == RevealJsSlides
353− then -- set boolean options explicitly, since
354− -- template can't distinguish False/undefined
355− defField "controls" True .
356− defField "controlsTutorial" True .
357− defField "controlsLayout" ("bottom-right" :: Text) .
358− defField "controlsBackArrows" ("faded" :: Text) .
359− defField "progress" True .
360− defField "slideNumber" False .
361− defField "showSlideNumber" ("all" :: Text) .
362− defField "hashOneBasedIndex" False .
363− defField "hash" False .
364− defField "respondToHashChanges" True .
365− defField "history" False .
366− defField "keyboard" True .
367− defField "overview" True .
368− defField "disableLayout" False .
369− defField "center" True .
370− defField "touch" True .
371− defField "loop" False .
372− defField "rtl" False .
373− defField "navigationMode" ("default" :: Text) .
374− defField "shuffle" False .
375− defField "fragments" True .
376− defField "fragmentInURL" True .
377− defField "embedded" False .
378− defField "help" True .
379− defField "pause" True .
380− defField "showNotes" False .
381− defField "autoPlayMedia" ("null" :: Text) .
382− defField "preloadIframes" ("null" :: Text) .
383− defField "autoSlide" ("0" :: Text) .
384− defField "autoSlideStoppable" True .
385− defField "autoSlideMethod" ("null" :: Text) .
386− defField "defaultTiming" ("null" :: Text) .
387− defField "mouseWheel" False .
388− defField "display" ("block" :: Text) .
389− defField "hideInactiveCursor" True .
390− defField "hideCursorTime" ("5000" :: Text) .
391− defField "previewLinks" False .
392− defField "transition" ("slide" :: Text) .
393− defField "transitionSpeed" ("default" :: Text) .
394− defField "backgroundTransition" ("fade" :: Text) .
395− defField "viewDistance" ("3" :: Text) .
396− defField "mobileViewDistance" ("2" :: Text)
397− else id) .
398347 defField "document-css" (isNothing mCss && slideVariant == NoSlides) .
399348 defField "quotes" (stQuotes st) .
400349 -- for backwards compatibility we populate toc
@@ -664,20 +613,17 @@ dimensionsToAttrList attr = consolidateStyles $ go Width ++ go Height
664613figure :: PandocMonad m
665614 => WriterOptions -> Attr -> [Inline] -> (Text, Text)
666615 -> StateT WriterState m Html
667−figure opts attr@(_, _, attrList) txt (s,tit) = do
616+figure opts attr txt (s,tit) = do
668617 html5 <- gets stHtml5
669618 -- Screen-readers will normally read the @alt@ text and the figure; we
670619 -- want to avoid them reading the same text twice. With HTML5 we can
671620 -- use aria-hidden for the caption; with HTML4, we use an empty
672621 -- alt-text instead.
673− -- When the alt text differs from the caption both should be read.
674622 let alt = if html5 then txt else [Str ""]
675623 let tocapt = if html5
676− then (H5.figcaption !) $
677− if isJust (lookup "alt" attrList)
678− then mempty
679− else H5.customAttribute (textTag "aria-hidden")
680− (toValue @Text "true")
624+ then H5.figcaption !
625+ H5.customAttribute (textTag "aria-hidden")
626+ (toValue @Text "true")
681627 else H.p ! A.class_ "caption"
682628 img <- inlineToHtml opts (Image attr alt (s,tit))
683629 capt <- if null txt
@@ -1441,7 +1387,7 @@ inlineToHtml opts inline = do
14411387 return $ if T.null tit
14421388 then link'
14431389 else link' ! A.title (toValue tit)
1444− (Image attr@(_, _, attrList) txt (s, tit)) -> do
1390+ (Image attr txt (s,tit)) -> do
14451391 let alternate = stringify txt
14461392 slideVariant <- gets stSlideVariant
14471393 let isReveal = slideVariant == RevealJsSlides
@@ -1454,8 +1400,7 @@ inlineToHtml opts inline = do
14541400 [A.title $ toValue tit | not (T.null tit)] ++
14551401 attrs
14561402 imageTag = (if html5 then H5.img else H.img
1457− , [A.alt $ toValue alternate | not (null txt) &&
1458− isNothing (lookup "alt" attrList)] )
1403+ , [A.alt $ toValue alternate | not (null txt)] )
14591404 mediaTag tg fallbackTxt =
14601405 let linkTxt = if null txt
14611406 then fallbackTxt
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -919,7 +919,7 @@ inlineToLaTeX il@(RawInline f str) = do
919919inlineToLaTeX LineBreak = do
920920 emptyLine <- gets stEmptyLine
921921 setEmptyLine True
922− return $ (if emptyLine then "\\strut " else "") <> "\\\\" <> cr
922+ return $ (if emptyLine then "~" else "") <> "\\\\" <> cr
923923inlineToLaTeX SoftBreak = do
924924 wrapText <- gets (writerWrapText . stOptions)
925925 case wrapText of
src/Text/Pandoc/Writers/LaTeX/Table.hs+3−11
@@ -26,8 +26,7 @@ import Text.DocLayout
2626 ( Doc, braces, cr, empty, hcat, hsep, isEmpty, literal, nest
2727 , text, vcat, ($$) )
2828import Text.Pandoc.Shared (blocksToInlines, splitBy, tshow)
29−import Text.Pandoc.Walk (walk, query)
30−import Data.Monoid (Any(..))
29+import Text.Pandoc.Walk (walk)
3130import Text.Pandoc.Writers.LaTeX.Caption (getCaption)
3231import Text.Pandoc.Writers.LaTeX.Notes (notesToLaTeX)
3332import Text.Pandoc.Writers.LaTeX.Types
@@ -262,13 +261,8 @@ cellToLaTeX blockListToLaTeX celltype annotatedCell = do
262261 Para{} -> True
263262 Plain{} -> True
264263 _ -> False
265− let hasLineBreak LineBreak = Any True
266− hasLineBreak _ = Any False
267− let hasLineBreaks = getAny $ query hasLineBreak blocks
268264 result <-
269− if not hasWidths || (celltype /= HeaderCell
270− && all isPlainOrPara blocks
271− && not hasLineBreaks)
265+ if not hasWidths || (celltype /= HeaderCell && all isPlainOrPara blocks)
272266 then
273267 blockListToLaTeX $ walk fixLineBreaks $ walk displayMathToInline blocks
274268 else do
@@ -281,9 +275,7 @@ cellToLaTeX blockListToLaTeX celltype annotatedCell = do
281275 let halign = literal $ alignCommand align
282276 return $ "\\begin{minipage}" <> valign <>
283277 braces "\\linewidth" <> halign <> cr <>
284− cellContents <>
285− (if hasLineBreaks then "\\strut" else mempty)
286− <> cr <>
278+ cellContents <> cr <>
287279 "\\end{minipage}"
288280 modify $ \st -> st{ stExternalNotes = externalNotes }
289281 when (rowspan /= RowSpan 1) $
src/Text/Pandoc/Writers/Markdown.hs+4−6
@@ -75,6 +75,7 @@ writeCommonMark opts document =
7575 -- we set them here so that escapeText will behave
7676 -- properly.
7777 enableExtension Ext_all_symbols_escapable $
78+ enableExtension Ext_pipe_tables $
7879 enableExtension Ext_intraword_underscores $
7980 writerExtensions opts }
8081
@@ -256,10 +257,10 @@ noteToMarkdown opts num blocks = do
256257 then hang (writerTabStop opts) (marker <> spacer) contents
257258 else marker <> spacer <> contents
258259
259−-- | (Code) blocks with a single class and no attributes can just use it
260−-- standalone, no need to bother with curly braces.
260+-- | (Code) blocks with a single class can just use it standalone,
261+-- no need to bother with curly braces.
261262classOrAttrsToMarkdown :: Attr -> Doc Text
262−classOrAttrsToMarkdown ("",[cls],[]) = literal cls
263+classOrAttrsToMarkdown ("",[cls],_) = literal cls
263264classOrAttrsToMarkdown attrs = attrsToMarkdown attrs
264265
265266-- | Ordered list start parser for use in Para below.
@@ -791,9 +792,6 @@ blockListToMarkdown opts blocks = do
791792 b1 : commentSep : fixBlocks (b2:bs)
792793 fixBlocks (Plain ils : bs@(RawBlock{}:_)) =
793794 Plain ils : fixBlocks bs
794− fixBlocks (Plain ils : bs@(Div{}:_))
795− | isEnabled Ext_fenced_divs opts =
796− Para ils : fixBlocks bs
797795 fixBlocks (Plain ils : bs) | inlist =
798796 Plain ils : fixBlocks bs
799797 fixBlocks (Plain ils : bs) =
src/Text/Pandoc/Writers/Powerpoint/Output.hs−1
@@ -537,7 +537,6 @@ registerMedia fp caption = do
537537 Just Eps -> Just ".eps"
538538 Just Svg -> Just ".svg"
539539 Just Emf -> Just ".emf"
540− Just Tiff -> Just ".tiff"
541540 Nothing -> Nothing
542541
543542 let newGlobalId = fromMaybe (maxGlobalId + 1) (M.lookup fp globalIds)
stack.yaml+11−9
@@ -7,16 +7,18 @@ flags:
77packages:
88- '.'
99extra-deps:
10−- commonmark-0.2.1
11−- commonmark-pandoc-0.2.1.1
12−- skylighting-core-0.10.5.2
13−- skylighting-0.10.5.2
14−- git: https://github.com/jgm/doctemplates
15− commit: 428c26d5303cf7a2b1051fe1ffd9aafe9ba71c81
16−- git: https://github.com/jgm/citeproc
17− commit: 4ce0501cd6f9c86eee087afcf878c256e49b9615
10+- haddock-library-1.10.0
11+- hslua-1.3.0
12+- hslua-module-path-0.1.0
13+- jira-wiki-markup-1.4.0
14+- random-1.2.0
15+- unicode-collation-0.1.3
16+- citeproc-0.4.0.1
17+- commonmark-0.2
18+- commonmark-extensions-0.2.1.2
19+- commonmark-pandoc-0.2.1
1820ghc-options:
1921 "$locals": -fhide-source-paths -Wno-missing-home-modules
20−resolver: lts-18.0
22+resolver: lts-17.12
2123nix:
2224 packages: [zlib]
test/Tests/Writers/OOXML.hs+1−3
@@ -55,9 +55,7 @@ testArchive :: (WriterOptions -> Pandoc -> PandocIO BL.ByteString)
5555 -> IO Archive
5656testArchive writerFn opts fp = do
5757 txt <- T.readFile fp
58− bs <- runIOorExplode $ do
59− setTranslations "en-US"
60− readNative def txt >>= writerFn opts
58+ bs <- runIOorExplode $ readNative def txt >>= writerFn opts
6159 return $ toArchive bs
6260
6361compareFileList :: FilePath -> Archive -> Archive -> Maybe String
test/command/2874.md+2−2
@@ -3,12 +3,12 @@
33<a></a>
44<br/>
55^D
6−{}\strut \\
6+{}~\\
77```
88
99```
1010% pandoc -f html -t latex
1111<a name="foo"></a><br/>
1212^D
13−\protect\hypertarget{foo}{}{}\strut \\
13+\protect\hypertarget{foo}{}{}~\\
1414```
test/command/4465.mddeleted−15
@@ -1,15 +0,0 @@
1−```
2−% pandoc -f html -t markdown
3−<ol>
4− <li>An ordered list can contain block-level elements ind html, it means that divs are also allowed.</li>
5− <li>Let's see the problem! <div class="example">This is an example.</div></li>
6−</ol>
7−^D
8−1. An ordered list can contain block-level elements ind html, it means
9− that divs are also allowed.
10−2. Let\'s see the problem!
11−
12− ::: example
13− This is an example.
14− :::
15−```
test/command/6890.md+2−2
@@ -23,12 +23,12 @@ references:
2323
2424@fruchtel-sozialer-2013a
2525
26−Some text.[^1]
26+Some text [^1].
2727
2828[^1]: @fruchtel-sozialer-2013a
2929^D
3030[Para [Cite [Citation {citationId = "fruchtel-sozialer-2013a", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 1, citationHash = 0}] [Str "Fr\252chtel,",Space,Str "Budde,",Space,Str "and",Space,Str "Cyprian",Space,Str "(2013)"]]
31−,Para [Str "Some",Space,Str "text.",Note [Para [Cite [Citation {citationId = "fruchtel-sozialer-2013a", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 2, citationHash = 0}] [Str "Fr\252chtel,",Space,Str "Budde,",Space,Str "and",Space,Str "Cyprian",Space,Str "(2013)"]]]]
31+,Para [Str "Some",Space,Str "text",Str ".",Note [Para [Cite [Citation {citationId = "fruchtel-sozialer-2013a", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 2, citationHash = 0}] [Str "Fr\252chtel,",Space,Str "Budde,",Space,Str "and",Space,Str "Cyprian",Space,Str "(2013)"]]],Str ""]
3232,Div ("refs",["references","csl-bib-body","hanging-indent"],[])
3333 [Div ("ref-fruchtel-sozialer-2013a",["csl-entry"],[])
3434 [Para [Str "Fr\252chtel,",Space,Str "Frank,",Space,Str "Wolfgang",Space,Str "Budde,",Space,Str "and",Space,Str "Gudrun",Space,Str "Cyprian.",Space,Str "2013.",Space,Emph [Str "Sozialer",Space,Str "Raum",Space,Str "und",Space,Str "Soziale",Space,Str "Arbeit",Space,Str "Fieldbook:",Space,Str "Methoden",Space,Str "und",Space,Str "Techniken"],Str ".",Space,Str "3rd",Space,Str "ed.",Space,Str "Wiesbaden,",Space,Str "Germany:",Space,Str "Springer",Space,Str "VS."]]]]
test/command/7272.md+1−4
@@ -18,10 +18,7 @@
1818 >{\raggedright\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{1.00}}@{}}
1919\toprule
2020\endhead
21−\begin{minipage}[t]{\linewidth}\raggedright
22−{ text\\
23−text2 }\strut
24−\end{minipage} \\
21+{\vtop{\hbox{\strut text}\hbox{\strut text2 }}} \\
2522\bottomrule
2623\end{longtable}
2724```
test/command/7376.mddeleted−16
@@ -1,16 +0,0 @@
1−```
2−% pandoc --citeproc -t plain
3−---
4−references:
5−- id: item1
6− type: book
7− author:
8− - family: Doe
9− given: Jane
10− issued: 2020
11− title: The title
12−...
13−^D
14−
15−
16−```
test/command/7394.mddeleted−85
@@ -1,85 +0,0 @@
1−```
2−% pandoc -f markdown -t plain --citeproc
3−---
4−csl: command/chicago-fullnote-bibliography.csl
5−references:
6−- author:
7− - family: Wandt
8− given: Manfred
9− edition: 6
10− id: wandt2014ges-sv
11− issued: 2014
12− publisher: Franz Vahlen
13− publisher-place: München
14− title: Gesetzliche schuldverhältnisse
15− title-short: Gesetzl SV
16− type: book
17−- author:
18− - family: Smith
19− given: Zenda
20− edition: 6
21− id: smith2015
22− issued: 2015
23− publisher: Macmillan
24− publisher-place: New York
25− title: A verb and a noun
26− type: book
27−---
28−
29−Hi^[@wandt2014ges-sv.].
30−
31−Hi^[[@wandt2014ges-sv].].
32−
33−Hi^[[See also @wandt2014ges-sv].].
34−
35−Hi^[See also @wandt2014ges-sv.].
36−
37−Hi^[@wandt2014ges-sv [@smith2015].].
38−
39−Hi^[[@wandt2014ges-sv; @smith2015].].
40−
41−Hi [@wandt2014ges-sv].
42−
43−Hi [see also @wandt2014ges-sv].
44−
45−^D
46−Hi[1].
47−
48−Hi[2].
49−
50−Hi[3].
51−
52−Hi[4].
53−
54−Hi[5].
55−
56−Hi[6].
57−
58−Hi.[7]
59−
60−Hi.[8]
61−
62−Smith, Zenda. A Verb and a Noun. 6th ed. New York: Macmillan, 2015.
63−
64−Wandt, Manfred. Gesetzliche Schuldverhältnisse. 6th ed. München: Franz
65−Vahlen, 2014.
66−
67−[1] Manfred Wandt, Gesetzliche Schuldverhältnisse, 6th ed. (München:
68−Franz Vahlen, 2014).
69−
70−[2] Wandt.
71−
72−[3] See also Wandt.
73−
74−[4] See also Wandt.
75−
76−[5] Wandt, Zenda Smith, A Verb and a Noun, 6th ed. (New York: Macmillan,
77−2015).
78−
79−[6] Wandt, Gesetzl SV; Smith, A Verb and a Noun.
80−
81−[7] Wandt, Gesetzl SV.
82−
83−[8] See also Wandt.
84−```
85−
test/command/7397.mddeleted−14
@@ -1,14 +0,0 @@
1−````
2−% pandoc -t markdown
3−~~~~ { .haskell startFrom="100"}
4−qsort [] = []
5−qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
6− qsort (filter (>= x) xs)
7−~~~~
8−^D
9−``` {.haskell startFrom="100"}
10−qsort [] = []
11−qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
12− qsort (filter (>= x) xs)
13−```
14−````
test/command/7400.mddeleted−9
@@ -1,9 +0,0 @@
1−```
2−% pandoc -t native -s
3−---
4−# Comment only
5−...
6−^D
7−Pandoc (Meta {unMeta = fromList []})
8−[]
9−```
test/command/7416.mddeleted−19
@@ -1,19 +0,0 @@
1−```
2−% pandoc -f markdown -t html
3−![caption](../media/rId25.jpg "title"){alt="alt"}
4−
5−^D
6−<figure>
7−<img src="../media/rId25.jpg" title="title" alt="alt" /><figcaption>caption</figcaption>
8−</figure>
9−```
10−
11−```
12−% pandoc -f markdown -t html
13−![caption](../media/rId25.jpg "title")
14−
15−^D
16−<figure>
17−<img src="../media/rId25.jpg" title="title" alt="caption" /><figcaption aria-hidden="true">caption</figcaption>
18−</figure>
19−```
test/command/pandoc-citeproc-322.md+1−1
@@ -19,7 +19,7 @@ references:
1919 type: 'article-journal'
2020---
2121
22−Foo [@timmory__justice_1950].
22+Foo[@timmory__justice_1950].
2323^D
2424Foo.[^1]
2525
test/command/pandoc-citeproc-356.md+7−2
@@ -15,6 +15,11 @@ references:
1515
1616[@bar]
1717^D
18−[WARNING] Citeproc: citation bar not found
19−(**bar?**)
18+(Alice 2042)
19+
20+::: {#refs .references .csl-bib-body .hanging-indent}
21+::: {#ref-foo .csl-entry}
22+Alice. 2042.
23+:::
24+:::
2025```
test/command/pandoc-citeproc-chicago-author-date.md+7−7
@@ -54,14 +54,14 @@ References {#references .unnumbered}
5454
5555([**nonexistent?**](#ref-nonexistent))
5656
57−Doe ([2005](#ref-item1)) says blah.
57+[Doe](#ref-item1) ([2005](#ref-item1)) says blah.
5858
59−Doe ([2005, 30](#ref-item1)) says blah.
59+[Doe](#ref-item1) ([2005, 30](#ref-item1)) says blah.
6060
61−Doe ([2005, 30](#ref-item1), with suffix) says blah.
61+[Doe](#ref-item1) ([2005, 30](#ref-item1), with suffix) says blah.
6262
63−Doe ([2005](#ref-item1); [2006, 30](#ref-item2); see also [Doe and Roe
64−2007](#ref-пункт3)) says blah.
63+[Doe](#ref-item1) ([2005](#ref-item1); [2006, 30](#ref-item2); see also
64+[Doe and Roe 2007](#ref-пункт3)) says blah.
6565
6666In a note.[^1]
6767
@@ -98,8 +98,8 @@ edited by Sam Smith. Oxford: Oxford University Press.
9898:::
9999:::
100100
101−[^1]: Doe and Roe ([2007, 12](#ref-пункт3)) and a citation without
102− locators ([Doe and Roe 2007](#ref-пункт3)).
101+[^1]: [Doe and Roe](#ref-пункт3) ([2007, 12](#ref-пункт3)) and a
102+ citation without locators ([Doe and Roe 2007](#ref-пункт3)).
103103
104104[^2]: Some citations (see [Doe 2005, chap. 3](#ref-item1);
105105 [2006](#ref-item2); [Doe and Roe 2007](#ref-пункт3)).
test/command/pandoc-citeproc-chicago-fullnote-bibliography.md+7−6
@@ -55,13 +55,13 @@ References {#references .unnumbered}
5555
5656[^2]
5757
58−John Doe[^3] says blah.
58+[John Doe](#ref-item1)[^3] says blah.
5959
60−Doe[^4] says blah.
60+[Doe](#ref-item1)[^4] says blah.
6161
62−Doe[^5] says blah.
62+[Doe](#ref-item1)[^5] says blah.
6363
64−Doe[^6] says blah.
64+[Doe](#ref-item1)[^6] says blah.
6565
6666In a note.[^7]
6767
@@ -112,8 +112,9 @@ Sam Smith. Oxford: Oxford University Press, 2007.
112112 Roe, "Why Water Is Wet," in *Third Book*, ed. Sam Smith (Oxford:
113113 Oxford University Press, 2007)](#ref-пункт3).
114114
115−[^7]: Doe and Roe, ["Why Water Is Wet," 12](#ref-пункт3) and a citation
116− without locators ([Doe and Roe, "Why Water Is Wet"](#ref-пункт3)).
115+[^7]: [Doe and Roe](#ref-пункт3), ["Why Water Is Wet," 12](#ref-пункт3)
116+ and a citation without locators ([Doe and Roe, "Why Water Is
117+ Wet"](#ref-пункт3)).
117118
118119[^8]: See [Doe, *First Book*, chap. 3](#ref-item1); also [Doe and Roe,
119120 "Why Water Is Wet," 34--35](#ref-пункт3).
test/docx/golden/image.docx

Binary file not shown.

test/lhs-test.html+1−2
@@ -21,7 +21,7 @@
2121 padding-top: 50px;
2222 padding-bottom: 50px;
2323 hyphens: auto;
24− overflow-wrap: break-word;
24+ word-wrap: break-word;
2525 text-rendering: optimizeLegibility;
2626 font-kerning: normal;
2727 }
@@ -92,7 +92,6 @@
9292 pre code {
9393 padding: 0;
9494 overflow: visible;
95− overflow-wrap: normal;
9695 }
9796 .sourceCode {
9897 background-color: transparent;
test/lhs-test.html+lhs+1−2
@@ -21,7 +21,7 @@
2121 padding-top: 50px;
2222 padding-bottom: 50px;
2323 hyphens: auto;
24− overflow-wrap: break-word;
24+ word-wrap: break-word;
2525 text-rendering: optimizeLegibility;
2626 font-kerning: normal;
2727 }
@@ -92,7 +92,6 @@
9292 pre code {
9393 padding: 0;
9494 overflow: visible;
95− overflow-wrap: normal;
9695 }
9796 .sourceCode {
9897 background-color: transparent;
test/lhs-test.latex+3−3
@@ -4,6 +4,9 @@
44%
55\documentclass[
66]{article}
7+\author{}
8+\date{}
9+
710\usepackage{amsmath,amssymb}
811\usepackage{lmodern}
912\usepackage{iftex}
@@ -85,9 +88,6 @@
8588 \usepackage{selnolig} % disable illegal ligatures
8689\fi
8790
88−\author{}
89−\date{}
90−
9191\begin{document}
9292
9393\hypertarget{lhs-test}{%
test/lhs-test.latex+lhs+3−3
@@ -4,6 +4,9 @@
44%
55\documentclass[
66]{article}
7+\author{}
8+\date{}
9+
710\usepackage{amsmath,amssymb}
811\usepackage{lmodern}
912\usepackage{iftex}
@@ -52,9 +55,6 @@
5255 \usepackage{selnolig} % disable illegal ligatures
5356\fi
5457
55−\author{}
56−\date{}
57−
5858\begin{document}
5959
6060\hypertarget{lhs-test}{%
test/tables/nordics.latex+4−4
@@ -11,10 +11,10 @@ Name
1111Capital
1212\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
1313Population\\
14−(in 2018)\strut
14+(in 2018)
1515\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
1616Area\\
17−(in km\textsuperscript{2})\strut
17+(in km\textsuperscript{2})
1818\end{minipage} \\
1919\midrule
2020\endfirsthead
@@ -25,10 +25,10 @@ Name
2525Capital
2626\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
2727Population\\
28−(in 2018)\strut
28+(in 2018)
2929\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
3030Area\\
31−(in km\textsuperscript{2})\strut
31+(in km\textsuperscript{2})
3232\end{minipage} \\
3333\midrule
3434\endhead
test/writer.html4+1−2
@@ -24,7 +24,7 @@
2424 padding-top: 50px;
2525 padding-bottom: 50px;
2626 hyphens: auto;
27− overflow-wrap: break-word;
27+ word-wrap: break-word;
2828 text-rendering: optimizeLegibility;
2929 font-kerning: normal;
3030 }
@@ -95,7 +95,6 @@
9595 pre code {
9696 padding: 0;
9797 overflow: visible;
98− overflow-wrap: normal;
9998 }
10099 .sourceCode {
101100 background-color: transparent;
test/writer.html5+1−2
@@ -24,7 +24,7 @@
2424 padding-top: 50px;
2525 padding-bottom: 50px;
2626 hyphens: auto;
27− overflow-wrap: break-word;
27+ word-wrap: break-word;
2828 text-rendering: optimizeLegibility;
2929 font-kerning: normal;
3030 }
@@ -95,7 +95,6 @@
9595 pre code {
9696 padding: 0;
9797 overflow: visible;
98− overflow-wrap: normal;
9998 }
10099 .sourceCode {
101100 background-color: transparent;
test/writer.latex+4−4
@@ -4,6 +4,10 @@
44%
55\documentclass[
66]{article}
7+\title{Pandoc Test Suite}
8+\author{John MacFarlane \and Anonymous}
9+\date{July 17, 2006}
10+
711\usepackage{amsmath,amssymb}
812\usepackage{lmodern}
913\usepackage{iftex}
@@ -67,10 +71,6 @@
6771 \usepackage{selnolig} % disable illegal ligatures
6872\fi
6973
70−\title{Pandoc Test Suite}
71−\author{John MacFarlane \and Anonymous}
72−\date{July 17, 2006}
73−
7474\begin{document}
7575\maketitle
7676
test/writers-lang-and-dir.latex+3−3
@@ -5,6 +5,9 @@
55\documentclass[
66 english,
77]{article}
8+\author{}
9+\date{}
10+
811\usepackage{amsmath,amssymb}
912\usepackage{lmodern}
1013\usepackage{iftex}
@@ -84,9 +87,6 @@
8487 \newenvironment{LTR}{\beginL}{\endL}
8588\fi
8689
87−\author{}
88−\date{}
89−
9090\begin{document}
9191
9292\hypertarget{empty-divs-and-spans}{%
tools/build-arm.sh+1−3
@@ -1,8 +1,6 @@
11#!/bin/sh
22
3−#old version:
4−#IMAGE_ID=ami-0fa8979d18f69948b
5−IMAGE_ID=ami-0cd6b53a434812702
3+IMAGE_ID=ami-0fa8979d18f69948b
64INSTANCE_TYPE=t4g.2xlarge
75KEY_NAME=debian-arm-us-east-2
86SECURITY_GROUP_ID=sg-086ffbadc286c5c00