aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-02-01LaTeX writer: avoid `{}` after control sequences when escaping.John MacFarlane3-6/+5
`\ldots{}.` doesn't behave as well as `\ldots.` with the latex ellipsis package. This patch causes pandoc to avoid emitting the `{}` when it is not necessary. Now `\ldots` and other control sequences used in escaping will be followed by either a `{}`, a space, or nothing, depending on context. Thanks to Elliott Slaughter for the suggestion.
2019-01-31LaTeX reader: don't let `\egroup` match `{`.John MacFarlane1-0/+12
`braced` now actually requires nested braces. Otherwise some legitimate command and environment definitions can break (see test/command/tex-group.md).
2019-01-31Tests: avoid calling findPandoc multiple times.John MacFarlane3-194/+207
2019-01-31Old tests: remove need for temp files by using pipeProcess.John MacFarlane1-16/+6
2019-01-30Org reader: add support for #+SELECT_TAGS.leungbk3-0/+28
2019-01-26Improve writing metadata for docx, pptx and odt (#5252)Agustín Martín Barbero40-0/+26
* docx writer: support custom properties. Solves the writer part of #3024. Also supports additional core properties: `subject`, `lang`, `category`, `description`. * odt writer: improve standard properties, including the following core properties: `generator` (Pandoc/VERSION), `description`, `subject`, `keywords`, `initial-creator` (from authors), `creation-date` (actual creation date). Also fix date. * pptx writer: support custom properties. Also supports additional core properties: `subject`, `category`, `description`. * Includes golden tests. * MANUAL: document metadata support for docx, odt, pptx writers
2019-01-25MediaWiki reader: use `_` instead of `-` in auto-identifiers.John MacFarlane1-16/+16
Partially addresses #4731. We may not still be exactly matching mediawiki's algorithm for identifiers.
2019-01-25LaTeX template: Set default listings language for lua, assembler.John MacFarlane1-0/+2
Otherwise we get an error when trying to compile code with lua or assembler code. To change the default dialect (currenty 5.3 for lua and x86masm for assembler), you can use `--include-in-header` to inject something like \lstset{defaultdialect=[5.2]Lua} Closes #5227.
2019-01-22LaTeX reader: support `\endinput`. Closes #5233.John MacFarlane1-0/+9
2019-01-22LaTeX template: Respect `numbersections` for books (#5235)Andrew Dunning4-4/+4
Ensure that `\part` and `\chapter` are only numbered if `numbersections` is set. To return to the previous behaviour, use `-V numbersections -V secnumdepth=0`. Notes on secnumdepth: 1 = Number `\section` 0 = Number `\chapter` -1 = Number `\part` -2 = No numbering
2019-01-21HTML and markdown: treat textarea as a verbatim environment.John MacFarlane1-0/+12
We don't want to parse its contents as Markdown or HTML. Closes #5241.
2019-01-16Fix tests for sample custom writer tablesAlbert Krewinkel1-7/+7
2019-01-13data/pandoc.lua: auto-fix nested constructor argumentsAlbert Krewinkel2-4/+25
Incorrect types to pandoc element constructors are automatically converted to the correct types when possible. This was already done for most constructors, but conversions are now also done for nested types (like lists of lists).
2019-01-12LaTeX template: Simplify fontspec usage (#5218)Andrew Dunning4-0/+8
Simplify the approach of #5212, ensuring that `mainfont` is used as the base font for scaling and that LuaLaTeX does not display the mono font with TeX ligatures (as it does not use the `Mapping=tex-ansi` option). With a modified version of `\defaultfontfeatures`, fontspec will continue to report scaling against the old default font in the log, but it nonetheless displays main font at the specified size. Using this rather than setting `Scale=MatchLowercase` for each family individually means that users will not lose scaling when upgrading to the new template if they were using other font options. Scaling can be disabled for an individual family by adding the option `Scale=1` to `sansfontoptions`, `monofontoptions`, etc. Remove the `\setromanfont` command added in #4665, as this is not documented in the fontspec manual and appears to be a deprecated alias for `\setmainfont`. For the release notes, I should also add that one can imitate the previous appearance with `-V mainfontoptions="Scale=MatchLowercase"`.
2019-01-10LaTeX template: Prevent scaling of main font (#5212)Andrew Dunning4-4/+0
When `Scale=MatchLowercase` is set as a default font option, this scales `mainfont` against the old default, meaning that it resizes whatever is set as the main font to match the metrics of Latin Modern. This can result, for example, in a document set to 12pt appearing in 11pt or 13pt. Setting this option for individual families allows everything to scale against the main font, and permits the user to override the setting if desired. Note that it is not necessary to specify `Ligatures=TeX`, as this is already set by default for the appropriate families. See the `fontspec` manual: <https://ctan.org/pkg/fontspec>. Those who specify font-options in metadata may need to add `Scale=MatchLowercase`, which will now only be provided if `(roman|sans|math|mono)fontoptions` aren't given explicitly.
2019-01-09RST reader: change treatment of `number-lines` directives. (#5207)Brian Leung3-2/+13
Directives of this type without numeric inputs should not have a `startFrom` attribute; with a blank value, the writers can produce extra whitespace.
2019-01-08Removed superfluous sourceCode class on code blocks.John MacFarlane9-18/+18
* These were added by the RST reader and, for literate Haskell, by the Markdown and LaTeX readers. There is no point to this class, and it is not applied consistently by all readers. See #5047. * Reverse order of `literate` and `haskell` classes on code blocks when parsing literate Haskell. Better if `haskell` comes first.
2019-01-07Asciidoc writer: shorter delimiters for tables, blockquotes.John MacFarlane3-32/+32
This matches asciidoctor reference docs. Closes #4364.
2019-01-07Org reader: handle `minlevel` option differently. (#5190)Brian Leung1-1/+6
When `minlevel` exceeds the original minimum level observed in the file to be included, every heading should be shifted rightward.
2019-01-06Add DokuWiki reader (#5108)Alexander2-0/+317
Closes #1792
2019-01-04Cleaned up findPandoc.John MacFarlane1-11/+5
2019-01-04Tests: Fix findPandoc to work with Windows.John MacFarlane1-0/+5
2019-01-04Fix findPandoc so it works with cabalv2.John MacFarlane2-9/+28
2019-01-03LaTeX Template: Improve package selections (#5193)John MacFarlane4-64/+69
* Use Babel for LuaTeX. There are a number of bugs in Polyglossia under LuaLaTeX with common languages, e.g. <https://github.com/reutenauer/polyglossia/issues/182>. * Load xcolor. The `xcolor` package must be loaded before the `footnote` package, which we load to fix foonotes in tables. Closes #4861. * Load xurl if available. This breaks URLs in more locations. Only available with TeX Live 2018 and later. * Remove obsolete fixltx2e package * Reindent. Use two spaces to be consistent internally and with other templates. * Use `bookmark` if available. The `bookmark` package can sometimes correct the levels of headings where `hyperref` cannot: see <https://komascript.de/release3.26>. * Update LaTeX tests
2019-01-02LaTeX template: Require xcolorAndrew Dunning4-4/+4
2019-01-02Implement task lists (#5139)Mauro Bieg2-0/+142
Closes #3051
2019-01-02Commonmark writer: fix handling of SoftBreak with `hard_line_breaks`.John MacFarlane1-0/+7
This should be rendered as a space. Closes #5195.
2019-01-01Update LaTeX testsAndrew Dunning4-64/+69
2019-01-01Zimwiki writer: remove automatic colon prefix before internal images (#5183)damien clochard1-2/+2
* FIX #5183 : zimwiki : remove automatic colon prefix before internal images ![](foo.png) should be converted to {{foo.png}} (relative path) ![](/foo.png] should be converted to {{/foo.png}} (absolute path) Therefore the ':' prefix is useless and must be removed. I never used the zimwiki, but i submitted the similar dokuwiki fix. 1. The zimwiki syntax is inspired by dokuwiki 2. The zimwiki documentation does not mention the colon character for images 3. The pandoc zimwiki writer seems to be a copy-paste for the dokuwiki writer If the PR #5184 is applied, I think this one should be applied too.
2019-01-01Dokuwiki writer: remove automatic ':' prefix before internal image links (#5183)damien clochard2-3/+3
* FIX #5183 : remove automatic ':' prefix before internal image links `![](foo.png)` should be converted to `{{foo.png}}` (relative path) `![](/foo.png]` should be converted to `{{/foo.png}}` (absolute path) Therefore the ':' prefix is useless and must be removed. It blocks users from making relative image links. Update tests for DokuWiki Writer : external images
2019-01-01Org reader: fix self-link parsing regressionAlbert Krewinkel1-0/+4
Fixes a regression introduced by the previous commit.
2019-01-01Org reader: fix treatment of links to imagesAlbert Krewinkel1-13/+17
Links with descriptions which are pointing to images are no longer read as inline images, but as proper links. Fixes: #5191
2018-12-31Simplify/fix reading of `--metadata` values on command line.John MacFarlane1-0/+12
Previously we used HsYAML's decodeStrict to recognize boolean values (treating everything else as a string). This caused problems relating to hvr/HsYAML#7. We now just check for the recognized boolean values `true|True|TRUE|false|False|FALSE`, and avoid using HsYAML. Closes #5177.
2018-12-28Org writer: preserve line-numbering for example and code blocks.leungbk1-0/+41
2018-12-25Muse reader tests: test #cover directiveAlexander Krotov1-0/+5
2018-12-14Remove unnecessary type="text/css" on style and link for HTML5.John MacFarlane3-5/+5
Closes #5146.
2018-12-13Man/Ms writers: don't escape `-` as `\-`.John MacFarlane2-19/+19
For discussion see https://groups.google.com/forum/#!msg/pandoc-discuss/B-oiCXcQOVo/WO-BXVpICAAJ The `\-` gets rendered in HTML and PDF as a unicode minus sign.
2018-12-11template:latex: make @ letter before using it (#5145)Enno4-16/+28
This fixes the previous commit for parskip and KOMA classes.
2018-12-11Let KOMA document class handle parskip when applicable (#5143)Enno4-24/+28
This is just a change to the default latex template.
2018-12-10Docx: add test for lists with level overrides.Jesse Rosenthal3-0/+41
2018-12-05RST writer: don't wrap simple table header lines.John MacFarlane1-0/+18
Closes #5128.
2018-12-04Strip out illegal XML characters in escapeXMLString.John MacFarlane1-0/+9
Closes #5119.
2018-12-03Markdown writer: include needed whitespace after HTML figure.John MacFarlane1-0/+13
We use HTML for a figure in markdown dialects that can't represent it natively. Closes #5121.
2018-11-29Fix custom tests.John MacFarlane1-8/+8
2018-11-27MediaWiki writer: fix caption, use 'thumb' instead of 'frame'.John MacFarlane1-1/+1
Captions used to have the word 'caption' prepended; this has been removed. Also, 'thumb' is used instead of 'frame' to allow images to be resized. Closes #5105.
2018-11-25Added test for #5053.John MacFarlane1-0/+14
Note that the fix for #5099 also fixes #5053, a pandoc 2.4 regression in parsing underscore emphasis after symbols.
2018-11-25Fix parsing of citations and quotes after parentheses.John MacFarlane3-13/+15
Starting with pandoc 2.4, citations and quoted inlines were no longer recognized after parentheses. This is because of commit 9b0bd4ec6f5c9125efb3e36232e6d1f6ac08a728, which is reverted here. The point of that commit was to allow relocation of soft line breaks to before an abbreviation, so that a nonbreaking space could be added after the abbreviation. Now we simply leave the soft line break in place, even though this means that we won't get a nonbreaking space after "Mr." at the end of a line (and in LaTeX this may result in a longer intersentential space). Those who care about this issue should take care not to end lines with an abbreviation, or to insert nonbreaking spaces manually. Closes #5099.
2018-11-22OpenDocument writer: small amendment to #5095.John MacFarlane1-189/+189
Level one lists should start at 0.5in rather than 0.75in. (At least this is how LibreOffice behaves for me with a new document.)
2018-11-22ODT writer: Fix list indentationNils Carlson1-189/+189
Previously lists were indented by half an inch on the first line for each level of nesting. This resulted in lists that looked like this: 1. The first line of the list point text the second line of the same list point. Fix this and bring style into line with libreoffice standards: 1. The first line of the list point text the second line of the list point text.
2018-11-20Fix markdown-citations test for new abbreviations changes.John MacFarlane1-2/+2