aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)AuthorFilesLines
2020-09-26Fix short-title.John MacFarlane1-14/+18
We were getting null short-titles generated, and that was creating wrong citations in some cases. Close #6702.
2020-09-25RST reader: apply `.. class::` directly to following Header.John MacFarlane1-0/+13
rather than creating a surrounding Div. Closes #6699.
2020-09-24DocBook reader: Implement table cell alignment (#6698)Nils Carlson2-40/+77
2020-09-24Citeproc: Insert space after csl-left-margin span contents...John MacFarlane3-5/+5
if they come before csl-right-inline. This ensures that the citation number or label will be separated from the rest by a space, even in formats (like plain) that don't yet have special handling for the display spans.
2020-09-24OpenDocument writer: New table cell support with row and column spans (#6682)Nils Carlson1-0/+157
Unit tests only verify column spans at this point. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-09-21Add built-in citation support using new citeproc library.John MacFarlane223-10/+24913
This deprecates the use of the external pandoc-citeproc filter; citation processing is now built in to pandoc. * Add dependency on citeproc library. * Add Text.Pandoc.Citeproc module (and some associated unexported modules under Text.Pandoc.Citeproc). Exports `processCitations`. [API change] * Add data files needed for Text.Pandoc.Citeproc: default.csl in the data directory, and a citeproc directory that is just used at compile-time. Note that we've added file-embed as a mandatory rather than a conditional depedency, because of the biblatex localization files. We might eventually want to use readDataFile for this, but it would take some code reorganization. * Text.Pandoc.Loging: Add `CiteprocWarning` to `LogMessage` and use it in `processCitations`. [API change] * Add tests from the pandoc-citeproc package as command tests (including some tests pandoc-citeproc did not pass). * Remove instructions for building pandoc-citeproc from CI and release binary build instructions. We will no longer distribute pandoc-citeproc. * Markdown reader: tweak abbreviation support. Don't insert a nonbreaking space after a potential abbreviation if it comes right before a note or citation. This messes up several things, including citeproc's moving of note citations. * Add `csljson` as and input and output format. This allows pandoc to convert between `csljson` and other bibliography formats, and to generate formatted versions of CSL JSON bibliographies. * Add module Text.Pandoc.Writers.CslJson, exporting `writeCslJson`. [API change] * Add module Text.Pandoc.Readers.CslJson, exporting `readCslJson`. [API change] * Added `bibtex`, `biblatex` as input formats. This allows pandoc to convert between BibLaTeX and BibTeX and other bibliography formats, and to generated formatted versions of BibTeX/BibLaTeX bibliographies. * Add module Text.Pandoc.Readers.BibTeX, exporting `readBibTeX` and `readBibLaTeX`. [API change] * Make "standalone" implicit if output format is a bibliography format. This is needed because pandoc readers for bibliography formats put the bibliographic information in the `references` field of metadata; and unless standalone is specified, metadata gets ignored. (TODO: This needs improvement. We should trigger standalone for the reader when the input format is bibliographic, and for the writer when the output format is markdown.) * Carry over `citationNoteNum` to `citationNoteNumber`. This was just ignored in pandoc-citeproc. * Text.Pandoc.Filter: Add `CiteprocFilter` constructor to Filter. [API change] This runs the processCitations transformation. We need to treat it like a filter so it can be placed in the sequence of filter runs (after some, before others). In FromYAML, this is parsed from `citeproc` or `{type: citeproc}`, so this special filter may be specified either way in a defaults file (or by `citeproc: true`, though this gives no control of positioning relative to other filters). TODO: we need to add something to the manual section on defaults files for this. * Add deprecation warning if `upandoc-citeproc` filter is used. * Add `--citeproc/-C` option to trigger citation processing. This behaves like a filter and will be positioned relative to filters as they appear on the command line. * Rewrote the manual on citatations, adding a dedicated Citations section which also includes some information formerly found in the pandoc-citeproc man page. * Look for CSL styles in the `csl` subdirectory of the pandoc user data directory. This changes the old pandoc-citeproc behavior, which looked in `~/.csl`. Users can simply symlink `~/.csl` to the `csl` subdirectory of their pandoc user data directory if they want the old behavior. * Add support for CSL bibliography entry formatting to LaTeX, HTML, Ms writers. Added CSL-related CSS to styles.html.
2020-09-21Markdown reader: Set citationNoteNum accurately in citations.John MacFarlane2-2/+2
This also changes stateLastNoteNumber -> stateNoteNumber.
2020-09-15LaTeX writer: fix spacing issue with list in definition list.John MacFarlane1-0/+67
When a list occurs at the beginning of a definition list definition, it can start on the same line as the label, which looks bad. Fix that by starting such lists with an `\item[]`.
2020-09-10Changed default link state to invisible (#6676)Leonard Rosenthol3-3/+137
2020-09-10Improved uncertainty handling in slunitx.John MacFarlane1-0/+3
2020-09-10LaTeX reader: support parenthesized uncertainties in siunitx.John MacFarlane1-0/+12
2020-09-10Implement support for internal document links in ICML (#6606)Leonard Rosenthol3-0/+358
Closes #5541.
2020-09-10docbook reader: Implement column span support for tables (#6492)Nils Carlson1-0/+119
Implement column span support for tables in the DocBook reader. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-09-02LaTeX reader: Support squared, cubed, tothe in siunitx.John MacFarlane1-10/+41
Closes #6657.
2020-08-31Fix tests for skylighting 0.10Albert Krewinkel2-8/+8
2020-08-14Change SIRange to SIrange (#6617)Emerson Harkin1-9/+9
2020-07-23Minimal support for SIRange in LaTeX reader (#6418)Emerson Harkin1-0/+59
Add support for `\SIRange{firstnumber}{secondnumber}{unit}` provided by siunitx. An en-dash is used instead of localized "to".
2020-07-23Further improvements to ams theorem support, and a test.John MacFarlane1-0/+41
See #1608.
2020-07-21RST reader: fix csv tables with multiline cells.John MacFarlane2-0/+30
Closes #6549.
2020-07-19Remove use of cmark-gfm for commonmark/gfm rendering.John MacFarlane4-7/+7
Instead rely on the markdown writer with appropriate extensions. Export writeCommonMark variant from Markdown writer. This changes a few small things in rendering markdown, e.g. w/r/t requiring backslashes before spaces inside super/subscripts.
2020-07-01HTML writer: improve alt-text/caption handling for HTML5Albert Krewinkel4-6/+6
Screen readers read an image's `alt` attribute and the figure caption, both of which come from the same source in pandoc. The figure caption is hidden from screen readers with the `aria-hidden` attribute. This improves accessibility. For HTML4, where `aria-hidden` is not allowed, pandoc still uses an empty `alt` attribute to avoid duplicate contents. Closes: #6491
2020-06-23LaTeX reader: Retain the Div around tables with attributes.John MacFarlane1-25/+26
We'll need this to store table attributes until all writers are adjusted to react to attributes on the Table element.
2020-06-23Add test for #6481.John MacFarlane1-0/+38
2020-05-20Add "summary" to list of block-level HTML tags.John MacFarlane1-0/+18
Closes #6385. (The summary element needs to be the first child of details and should not be enclosed by p tags.) NOTE: you need to include a blank line before the closing `</details>`, if you want the last part of the content to be parsed as a paragraph.
2020-05-18Use CSS in favor of <br> for display math (#6372)Lila1-2/+2
Some CSS to ensure that display math is displayed centered and on a new line is now included in the default HTML-based templates; this may be overridden if the user wants a different behavior.
2020-05-12LaTeX writer: create hypertarget for links with identifier.John MacFarlane1-0/+6
Closes #6360.
2020-05-12Use latest skylighting.John MacFarlane2-8/+8
This adds `aria-hidden="true"` to the empty a elements, which helps people who use screen readers.
2020-05-02LaTeX Writer: Add support for customizable alignment of columns in beamer ↵andrebauer1-0/+40
(#6331) Add support for customizable alignment of columns in beamer. Closes #4805, closes #4150.
2020-04-24RST writer: properly handle images with same alt text.John MacFarlane1-0/+14
Previously we created duplicate references for these in rendering RST. Closes #6194.
2020-04-22AsciiDoc writer: add blank line after Div.John MacFarlane1-0/+18
Closes #6308.
2020-04-17Markdown writer: avoid unnecessary escapes before intraword `_`John MacFarlane1-0/+14
when `intraword_underscores` extension is enabled. Closes #6296.
2020-04-17LaTeX reader: don't put surrounding Div around Table.John MacFarlane1-26/+25
This reverts a change in the last release; the Div is no longer needed, because we can now put the id right in the Table's attributes. However, writers may still need to be modified to do something with the id in a Table (e.g. create an anchor), so in the short term we may lose the ability to link to tables in some writers.
2020-04-15Use the new builders, modify readers to preserve empty headersdespresc8-44/+8
The Builder.simpleTable now only adds a row to the TableHead when the given header row is not null. This uncovered an inconsistency in the readers: some would unconditionally emit a header filled with empty cells, even if the header was not present. Now every reader has the conditional behaviour. Only the XWiki writer depended on the header row being always present; it now pads its head as necessary.
2020-04-15Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessorsdespresc20-205/+205
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc20-421/+593
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-04-15Implement the new Table typedespresc20-215/+520
2020-04-15JATS reader: handle "label" element in section title.John MacFarlane1-0/+8
Closes #6288.
2020-04-11LaTeX writer: ensure that `-M csquotes` works even in fragment mode.John MacFarlane1-0/+6
Closes #6265.
2020-04-11HTML reader: support <bdo> (#6271)Tristan de Cacqueray1-0/+21
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo Closes #5794
2020-04-07LaTeX reader: better handling of `\lettrine`.John MacFarlane1-2/+2
- SmallCaps instead of Span for the part after the initial capital. - Ensure that both arguments are parsed, so that in Markdown both are treated as raw LateX. (Closes #6258.)
2020-02-17Revert "Allow specifying string value in metadata using `!!literal` tag."John MacFarlane1-10/+0
This reverts commit 3493d6afaa6586c46898cf8bdb0c45bb70d31f28. This might be worth considering in the future, but let's not do it yet...the additional complexity needs a better justification.
2020-02-17Allow specifying string value in metadata using `!!literal` tag.John MacFarlane1-0/+10
This is experimental. Normally metadata values are interpreted as markdown, but if the !!literal tag is used they will be interpreted as plain strings. We need to consider whether this can still be implemented if we switch back from HsYAML to yaml for performance reasons.
2020-02-14Fixes: group biblatex citations even with prefix and suffix (#6058)Ethan Riley1-0/+32
Closes #5849. Previously biblatex citations were only grouped if there was no prefix. This patch allows them to be grouped in subgroups split by prefixes and suffixes, which allows better citation sorting.
2020-02-12LaTeX reader: improve caption and label parsing.John MacFarlane3-16/+17
- Don't emit empty Span elements for labels. - Put tables with labels in a surrounding Div.
2020-02-11LaTeX reader: resolve `\ref` to table numbers.John MacFarlane1-0/+31
Closes #6137.
2020-02-10Fix spurious dots in markdown_mmd metadata outputJohn MacFarlane1-0/+12
Closes #6133 (regression).
2020-02-08reveal.js: ensure that pauses work even in title slides.John MacFarlane1-0/+18
Closes #5819.
2020-02-05MediaWiki writer: prevent triple `[[[`.John MacFarlane1-0/+10
This confuses mediawiki's parser. So we insert a `<nowiki/>` no-op between a literal `[` and a link. Closes #6119.
2020-02-05LaTeX reader: skip comments in more places where this is needed.John MacFarlane1-0/+7
Closes #6114.
2020-02-03Fix duplicate frame classes in LaTeX/Beamer output.John MacFarlane1-0/+27
Close #6107.