aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)Author
2024-08-29Markdown writer: avoid emitting markdown caption if...John MacFarlane
...table has fallen back to raw HTML, which will then contain a `<caption>` tag. Closes #10094.
2024-08-29RST reader: improve simple table support.John MacFarlane
Multiline rows occur only when the *first* cell is empty; we were previously treating lines with *any* empty cell as row continuations. Closes #10093. In addition, we no longer wrap multiline cells in Para if they can be represented as Plain. This is consistent with docutils behavior.
2024-08-23AsciiDoc writer: add `link:` prefix when needed.John MacFarlane
AsciiDoc requires it except for http, https, irc, mailto, ftp schemes. Closes #10105.
2024-08-08Org reader: fix parsing of src blocks with an `-i` flag.Albert Krewinkel
Tabs are now preserved in the contents of *src* blocks if the the block has the `-i` flag. Fixes: #10071
2024-08-06Asciidoc writer: preserve original base level.John MacFarlane
We used to normalize so that the base level is always 1, but asciidoc no longer seems to care about that, and the behavior creates difficulties when we are converting fragments. Closes #10062.
2024-08-06LaTeX writer: preserve locator labels with `--natbib`.John MacFarlane
In #9275 we made pandoc strip off locator labels (e.g. `p.`) for natbib and biblatex output. In fact, this is only desirable for biblatex. natbib needs the locators to be preserved. Closes #10057.
2024-07-15BibTeX writer: ensure that "literal" names are enclosed in braces.John MacFarlane
Closes #9987.
2024-07-05Change sr -> sr-Latn in translation testsStephen Huan
2024-07-03Adjust test for #9943 so it works with Windows.John MacFarlane
2024-07-03Man writer: use default middle header when metadata does not...John MacFarlane
include `header`. This change causes pandoc to omit the middle header parameter when `header` is not set, rather than emitting `""`. The parameter is optional and man will use a default based on the section if it is not specified. Closes #9943.
2024-06-23LaTeX writer: new method for ensuring images don't overflow.John MacFarlane
Previously we relied on graphicx internals and made global changes to Gin to force images to be resized if they exceed textwidth. This approach is brittle and caused problems with `\includesvg` (see #9660). The new approach uses a new macro `\pandocbounded` that is now defined in the LaTeX template. (Thanks here to Falk Hanisch in https://github.com/mrpiggi/svg/issues/60.) The LaTeX writer has been changed to enclose `\includegraphics` and `\includesvg` commands in this macro when they don't explicitly specify a width or height. In addition, the writer now adds `keepaspectratio` to the `\includegraphics` or `\includesvg` options if `height` is specified without width, or vice versa. Previously, this was set in the preamble as a global option. Compatibility issues: - If custom templates are used with the new LaTeX writer, they will have to be updated to include the new `\pandocbounded` macro, or an error will be raised because of the undefined macro. - Documents that specify explicit dimensions for an image may render differently, if the dimensions are greater than the line width or page height. Previously pandoc would shrink these images to fit, but the new behavior takes the specified dimensions literally. In addition, pandoc previously always enforced `keepaspectratio`, even when width and height were both specified, so images with width and height specified that do not conform to their intrinsic aspect ratio will appear differently. Closes #9660.
2024-06-23Markdown writer: fix bug with block quotes in lists.John MacFarlane
Closes #9908.
2024-06-22HTML writer: ensure URI escaping needed for html4.John MacFarlane
Unicode characters need not be escaped for html5, and still won't be. See #9905.
2024-06-21RST reader: Support `:cite:` role with citeproc.John MacFarlane
This patch supports a subset of the functionality of the sphinxcontrib-bibtex extension to Sphinx. See <https://sphinxcontrib-bibtex.readthedocs.io/en/latest/quickstart.html>. Closes #9904.
2024-06-21Add command test for #9358.John MacFarlane
2024-06-21LaTeX reader: fix parsing of dimensions beginning with `.`.John MacFarlane
E.g., `\kern.1pt`. Closes #9902.
2024-06-18Textile reader: don't let spans begin right after a symbol.John MacFarlane
Closes #9878.
2024-06-17Use latest commonmark-extensions.John MacFarlane
This fixes `auto_identifiers` and `ascii_auto_identifiers` extensions so that they substitute aliases for emojis, as documented. See #9876.
2024-06-12Docx reader: improve handling of captions.John MacFarlane
- Turn captioned images into Figure elements. Closes #9391. - Improve the logic for associating elements with captions. Closes #9358. - Ensure that captions that can't be associated with an element aren't just silently dropped. Closes #9610.
2024-06-10LaTeX writer/template: specify language option for `selnolig`...John MacFarlane
...and only include it if `english` or `german` is used. Since 3d8f011, the babel language is not specified as a class option any more; so now we need to explicitly specify the language option when we load `selnolig`. Only `german` and `english` are valid, so we construct the variable `selnolig-langs` in the writer and include `selnolig` if it is nonempty. This should restore proper ligature suppression when lualatex is used. Closes #9863. Supersedes #9864. Thanks to @fkohrt for the initial fix.
2024-06-10SelfContained: only create svg elements for SVG images when...John MacFarlane
...the image has the class `inline-svg`. Otherwise just use a `data` URI as we do with other images. Closes #9787.
2024-06-07Fixes to #9376.John MacFarlane
2024-06-07Don't emit unnecessary classes in HTML tables (#9376)ThomasSoeiro
Pandoc used to emit a `header` class on the `tr` element that forms the table header. This is no longer needed, because `head > tr` will do the same thing. Similarly, pandoc used to emit `even` and `odd` classes on `tr`s, allowing striped styling. This is no longer needed, because one can use e.g. `tbody tr:nth-child(2n)`. We now omit these classes, which have a good chance of conflicting with classes used for other things. Closes #9325.
2024-06-03typst,table - support '.typst:no-figure' and 'typst:figure:kind=kind' (#9778)Carlos Scheidegger
This extends support for fine-grained properties in Typst. If the `typst:no-figure` class is present on a Table, the table will not be placed in a figure. If the `typst:figure:kind` attribute is present, its value will be used for the figure's `kind`. These features are documented in `doc/typst-property-output.md`. Closes #9777.
2024-06-01Fix command test #6285 for Windows.John MacFarlane
2024-06-01Support HorizontalRule in docx reader.John MacFarlane
We support both pandoc-style and the style described at https://support.microsoft.com/en-us/office/insert-a-horizontal-line-9bf172f6-5908-4791-9bb9-2c952197b1a9 Closes #6285.
2024-05-31Use `\linewidth` instead of `\columnwidth` or `\textwidth`...John MacFarlane
for resizing figures, table cells, etc. in LaTeX. `\linewidth`, unlike the others, is sensitive to indented environments like lists. Closes #9775.
2024-05-28HTML reader: better handle non-li elements in ul and ol.John MacFarlane
For example, a `p` after a closed `li` will be incorporated into the previous `li`. This mirrors what browsers do with this invalid HTML. Closes #9809.
2024-05-27Typst reader: handle inline bodies ending in a parbreak.John MacFarlane
E.g. `#strong[ test ]`. Here we simply skip the final parbreak. Treat this as a soft break, which will give results similar to the typst app.
2024-05-27CSV reader: turn line breaks into LineBreaks not SoftBreaks.John MacFarlane
Closes #9797.
2024-05-27RST reader: tighten up rules fro when emphasis can start.John MacFarlane
Closes #9805.
2024-05-27Markdown writer: ensure blank line after HTML blocks...John MacFarlane
in commonmark-based formats. Closes #9792.
2024-05-18Allow author-only textual citations.John MacFarlane
E.g. `-@reese2002` outside of brackets. Closes #7219.
2024-05-10RST reader: fix figclass and align annotations for figures (#9744)Gokul Rajiv
Fixes #7473 Previously, `figclass`es weren't being extracted correctly. `figclass` and `align` annotations are now implemented following the rst docs: these options apply to the figure while other options are passed onto the underlying image.
2024-04-25Markdown writer: don't try to align columns in pipe tables...John MacFarlane
...with lines greater than COLUMNS. The alignment just reduces readibility when the lines soft wrap.
2024-04-21LaTeX reader: fix over-eager macro expansion in conditionals.John MacFarlane
Closes #9676.
2024-04-20Change to `--file-scope` behavior.John MacFarlane
Previously a Div with an identifier derived from the filename would be added around the contents of each file. This caused problems for "chunking" files into chapters, e.g. in EPUB. We no longer add the surrounding Div. This cooperates better with chunking. Note, however, that if you have relied on the old behavior to link to the beginning of the contents of a file using its filename as identifier, that will no longer work. Closes #8741.
2024-04-15Fix command test for #9652.John MacFarlane
2024-04-15SelfContained: merge 'class' attr when both img and svg specify it (#9653)Carlos Scheidegger
Closes #9652.
2024-04-15Typst writer: property output (#9648)Gordon Woodhull
The Typst writer will pass on specially marked attributes as raw Typst parameters on selected elements. This allows extensive customization using filters. An attribute with key `typst:PROP` will set the PROP parameter on the corresponding Typst element. An attribute with key `typst:text:PROP` will set a parameter on a Typst `#set text()` rule or a text element. The feature has been implemented for the following elements: * span text * div and div text * table and table text * table cell and table cell text It would be possible to support more elements in the future. A separate document has been added that provides extensive documentation and examples of the use of this feature.
2024-04-14OpenDocument writer: implement custom-style for spans.John MacFarlane
Closes #9657.
2024-04-10Markdown reader: auto-close unclosed divs.John MacFarlane
This applies to both fenced and HTML-ish varieties. Otherwise we face an exponential performance problem with backtracking. This also accords with the behavior of the `fenced_divs` extension in commonmark. A warning is issued when a div is implicitly closed. Closes #9635.
2024-04-08LaTeX writer: improve treatment of math inside soul commands.John MacFarlane
soul commands (`ul`, `hl`, `st`) are very fragile and the math must be handled specially. In #9597 we improved this for strikethrough but omitted the other soul environments. This patch generalizes the fix and a related fix for verbatim (#1294, #5529).
2024-04-06Org reader: Fix treatment of `id` property under heading.John MacFarlane
Cloess #9639.
2024-04-04DokuWiki reader: fix issues with links.John MacFarlane
- Link text cannot contain formatting (e.g., `//` is not italics). Closes #9630. - An explicitly empty link text (`[[url|]]`) works the same as an omitted link text. Closes #9632.
2024-04-01Put `$` or `$$` around math in `csljson` output.John MacFarlane
Closes #9616.
2024-03-22LaTeX writer: fix math inside strikeout (closes #9597).John MacFarlane
2024-03-19DocBook reader: add empty title to admonition div if not present.John MacFarlane
This allows admonition elements (e.g. `<note>`) to work with gfm admonitions even if the `<title>` is not present. Closes #9569.
2024-03-18Typst writer: more reliable escaping in inline `[..]` contexts.John MacFarlane
For example, we need to escape `[\1. April]` or it will be treated as an ordered list. Closes #9586.
2024-03-18Typst writer: handle `unnumbered` on headings.John MacFarlane
Closes #9585.