aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-12-05Keep the \author{} command even if author is not specified (#5961)Yihui Xie3-0/+3
Otherwise there will be a LaTeX warning "No \author given" when the .tex file is compiled. This does not affect spacing in the title block.
2019-12-05Roll back part of of `--shift-heading-level-by` change.John MacFarlane1-3/+2
With positive heading shifts, starting in 2.8 this option caused metadata titles to be removed and changed to regular headings. This behavior is incompatible with the old behavior of `--base-header-level` and breaks old workflows, so with this commit we are rolling back this change. Now, there is an asymmetry in positive and negative heading level shifts: + With positive shifts, the metadata title stays the same and does not get changed to a heading in the body. + With negative shifts, a heading can be converted into the metadata title. I think this is a desirable combination of features, despite the asymmetry. One might, e.g., want to have a document with level-1 section headigs, but render it to HTML with level-2 headings, retaining the metadata title (which pandoc will render as a level-1 heading with the default template). Closes #5957. Revises #5615.
2019-12-05HTML-based templates: Add CSS to suppress bullet on unordered task lists.John MacFarlane7-0/+7
2019-12-05HTML writer: add task-list class to ul if all elements are task list items.John MacFarlane1-4/+4
This will allow styling unordered task lists in a way that omits the bullet.
2019-12-05Fix makeSections so it doesn't turn column divs into sections.John MacFarlane1-0/+28
2019-11-25RST writers: Use grid tables for 1-column tables.John MacFarlane1-0/+40
With simple tables, we have a clash with heading syntax. Closes #5936.
2019-11-22Jira writer: improve escaping of special chars (#5925)Albert Krewinkel2-50/+51
Backslash-escaping is used instead of HTML entities, as escaped characters are easier to read this way. Furthermore, Confluence, which seems to use a subset of Jira markup, seems to get confused by HTML entities.
2019-11-19Improve markdown escaping in list items.John MacFarlane1-0/+6
Closes #5918.
2019-11-18DokuWiki reader: parse markup inside monospace ('') (#5917)Alexander Krotov1-0/+3
Fixes #5916
2019-11-16Ms template: Use Palatino for default font.John MacFarlane1-1/+1
This is less ugly than Times.
2019-11-16Updaet ms writer test.John MacFarlane1-1/+1
2019-11-16Ms writer: boldface definition terms in DefinitionLists.John MacFarlane1-17/+17
Like LaTeX, ConTeXt.
2019-11-16ms template: default to page numbers on bottom, no paragaraph indent.John MacFarlane1-1/+4
To be more like the default LaTeX output.
2019-11-16ConTeXt template: add a saner default for page numbers.John MacFarlane2-0/+2
Previously they appeared centered at the top of the page; now we put them centered at the bottom, unless the `pagenumbering` variable is set (this gives users full control over page number format and position, https://wiki.contextgarden.net/Command/setuppagenumbering)
2019-11-16ConTeXt writer: use braces, not start/stop, for inline language tags.John MacFarlane1-7/+6
This prevents unwanted gobbling of spaces.
2019-11-16Change styles in reference.docx.John MacFarlane28-0/+0
All headings now have a uniform color. Level-1 headings no longer set `w:themeShade="B5"`. Level-2 headings are now 14 point rather than 16 point. Level-3 headings are now 12 point rather than 14 point. Level-4 headings are italic rather than bold. Closes #5820.
2019-11-15RST writer: Improve spacing for tables with no width information.John MacFarlane2-9/+68
If a simple table would be too wide, we use a grid table. The code for generating grid tables has been adjusted to give more intelligent column widths when widths aren't given. (This also affects the markdown writer.) Closes #5899.
2019-11-14Change reference.docx to use more normal block quotes.John MacFarlane28-0/+0
Indented left and right, same font and size. Previously it was unindented, smaller font and different typeface. See #5820.
2019-11-14Change optInputFiles to a `Maybe [FilePath]`.John MacFarlane1-1/+1
`Nothing` means: nothing specified. `Just []` means: an empty list specified (e.g. in defaults). Potentially these could lead to different behavior: see #5888.
2019-11-14Allow combining `-Vheader-includes` and `--include-in-header`.John MacFarlane1-0/+2
Closes #5904.
2019-11-14Fixed some test locations and put test data files in extra-source-files.John MacFarlane10-7/+7
2019-11-14Fix regression preventing header-includes from being set using -V.John MacFarlane1-0/+8
See #5904.
2019-11-14RST writer: fix backslash escaping after stringsAlbert Krewinkel1-0/+3
The check whether a complex inline element following a string must be escaped, now depends on the last character of the string instead of the first. Fixes: #5906
2019-11-13Add test for #5881.John MacFarlane7-0/+23
2019-11-13Ensure there's a blank line before RST tables.John MacFarlane1-0/+36
Closes #5898.
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc14-32/+49
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-11-11Markdown reader: fix small super/subscript issue.John MacFarlane1-0/+7
Superscripts and subscripts cannot contain spaces, but newlines were previously allowed (unintentionally). This led to bad interactions in some cases with footnotes. E.g. ``` foo^[note] bar^[note] ``` With this change newlines are also not allowed inside super/subscripts. Closes #5878.
2019-11-11Change the implementation of `htmlSpanLikeElements` and implement `<dfn>` ↵Florian Beeres1-0/+20
(#5882) * Add HTML Reader support for `<dfn>`, parsing this as a Span with class `dfn`. * Change `htmlSpanLikeElements` implementation to retain classes, attributes and inline content.
2019-11-07DocBook reader: Fix bug with entities in mathphrase element.John MacFarlane1-0/+20
Closes #5885.
2019-11-07Change merge behavior for metadata.John MacFarlane1-1/+1
Previously, if a document contained two YAML metadata blocks that set the same field, the conflict would be resolved in favor of the first. Now it is resolved in favor of the second (due to a change in pandoc-types). This makes the behavior more uniform with other things in pandoc (such as reference links and `--metadata-file`).
2019-11-04HTML Reader/Writer - Add support for <var> and <samp> (#5861)Amogh Rathore2-0/+28
Closes #5799
2019-11-03Docx reader: fix list number resumption for sublists. Closes #4324.John MacFarlane3-0/+12
The first list item of a sublist should not resume numbering from the number of the last sublist item of the same level, if that sublist was a sublist of a different list item. That is, we should not get: ``` 1. one 1. sub one 2. sub two 2. two 3. sub one ```
2019-11-03Place caption before table in OpenDocument format. (#5869)Dmitry Pogodin2-10/+10
Closes #5681.
2019-11-02LaTeX reader: Fixed dollar-math parsing...John MacFarlane1-0/+8
...to ensure that space is left between a control seq and a following word that would otherwise change its meaning. Closes #5836.
2019-11-02Add test for #5836.John MacFarlane1-0/+19
2019-11-02Test for macro definitions in LaTeX preamble.John MacFarlane1-0/+16
2019-11-02Add test case for #5845.John MacFarlane1-0/+16
2019-10-31Jira writer: remove extraneous newline after single-line block quotesAlbert Krewinkel1-5/+0
See #5858
2019-10-30Use latest doclayout.John MacFarlane1-1/+2
Closes #5863.
2019-10-30docbook reader: fix nesting of chapters and sections (#5864)Florian Klink3-0/+49
* Set dbBook to true when traversing a chapter too. Currently, a `<title/>` in a chapter and in a `<section/>` below that chapter have the same level if they're not inside a `<book/>`. This can happen in a multi-file book project. Also see the example at https://tdg.docbook.org/tdg/4.5/chapter.html Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr> * Add docbook-chapter test This tests nested `<section/>` and makes sure `<title/>` in the first `<section/>` below `<chapter/>` is one level deeper than the `<chapter/>`'s `<title/>`, also when not inside a `<book/>`. Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>
2019-10-29T.P.W.Shared: Changed gridTables so it does better at...John MacFarlane1-6/+6
...keeping the widths of columns. See #4320. Adjust test case for #4320.
2019-10-29Changes to build with new doctemplates/doclayout.John MacFarlane2-2/+1
The new version of doctemplates adds many features to pandoc's templating system, while remaining backwards-compatible. New features include partials and filters. Using template filters, one can lay out data in enumerated lists and tables. Templates are now layout-sensitive: so, for example, if a text with soft line breaks is interpolated near the end of a line, the text will break and wrap naturally. This makes the templating system much more suitable for programatically generating markdown or other plain-text files from metadata.
2019-10-29Remove include of grffile from default latex template.John MacFarlane1-1/+1
This package is needed for proper handling of image filenames containing periods (in addition to the period before the extension). Unfortunately, grffile breaks in the latest texlive update. Until a fix is released (see ho-tex/oberdiek#73) it seems best to remove this from the default template. This may cause problems if you have filenames with periods. The workaround is to put `\usepackage{grffile}` in header-includes, and be sure you're using an older version of texlive packages. See #5848. We will leave that issue open to remind us to check upstream, and restore grffile when it's possible to do so.
2019-10-29Shared.makeSections: better behavior in some corner cases.John MacFarlane1-0/+170
When a div surrounds multiple sections at the same level, or a section of highre level followed by one of lower level, then we just leave it as a div and create a new div for the section. Closes #5846, closes #5761.
2019-10-28Shared: improve isTight.John MacFarlane1-0/+11
If a list has an empty item, this should not count against its being a tight list. Closes #5857.
2019-10-27Org reader: fix parsing of empty comment linesAlbert Krewinkel1-1/+11
Comment lines in Org-mode can be completely empty; both of these line should produce no output: # a comment # The reader used to produce a wrong result for the latter, but ignores that line as well now. Fixes: #5856
2019-10-24HTML reader/writer: Better handling of <q> with cite attribute (#5837)Ole Martin Ruud3-0/+25
* HTML reader: Handle cite attribute for quotes. If a `<q>` tag has a `cite` attribute, we interpret it as a Quoted element with an inner Span. Closes #5798 * Refactor url canonicalization into a helper function * Modify HTML writer to handle quote with cite. [0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q
2019-10-23Add Reader support for HTML <samp> element (#5843)Amogh Rathore1-0/+6
The `<samp>` element is parsed as a Span with class `sample`. Closes #5792.
2019-10-16Add support for reading & writing <mark> elementsFlorian B1-0/+20
Parse <mark> elements from HTML as HTML span like elements, with a single class matching the tag name `mark`. Mark elements are rendered to HTML using the native <mark> element. Fixes https://github.com/jgm/pandoc/issues/5797.
2019-10-15Add support for reading and writing <kbd> elementsDaniele D'Orazio1-0/+20
* Text.Pandoc.Shared: export `htmlSpanLikeElements` [API change] This commit also introduces a mapping of HTML span like elements that are internally represented as a Span with a single class, but that are converted back to the original element by the html writer. As of now, only the kbd element is handled this way. Ideally these elements should be handled as plain AST values, but since that would be a breaking change with a large impact, we revert to this stop-gap solution. Fixes https://github.com/jgm/pandoc/issues/5796.