aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)Author
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.
2024-03-17LaTeX reader: better handling of colwidths.John MacFarlane
Previously the parser just failed if the column width specified in `p{}` wasn't a multiple of `\linewidth`. This led to cases where content was skipped. Now we treat these as ColWidthDefault and silently parse the table. A future improvement could be to guess relative column widths from the dimensions specified, based on a default line width. Closes #9579.
2024-03-17Typst writer: only use explicit figure 'kind' for tables.John MacFarlane
The rest of the time the autodetection should work fine.
2024-03-17Typst writer: use `kind: image` for image figures.John MacFarlane
2024-03-17Typst writer: avoid unnecessary box around image in figure.John MacFarlane
See #9236.
2024-03-14Markdown reader: Fix bug with footnotes at end of fenced div.John MacFarlane
Cloess #9576.
2024-03-10Fix test for #9555.John MacFarlane
2024-03-10LaTeX reader: improve tokenization of `@`.John MacFarlane
Make tokenization sensitive to `\makeatletter`/`\makeatother`. Previously we just always treated `@` as a letter. This led to bad results, e.g. with the sequence `\@`. E.g., `a\@ b` would parse as "ab" and `a\@b` as "a". Closes #9555.
2024-03-09LaTeX reader: Make `withRaw` work inside `parseFromToks`.John MacFarlane
This is needed for raw environments to work inside table cells. Closes #9517.
2024-02-29SelfContained: add `role="img"` to svgs.John MacFarlane
This is needed in conjunction with `aria-label` for screen readers. Completes the fix to #9525.
2024-02-29SelfContained: Add aria-label to svg elements.John MacFarlane
Screen readers don't seem to pay attention to an alt attribute on svg. But they do read the aria-label. So if there's an alt attribute, we copy its contents to aria-label, unless there is already an aria-label. This will make pandoc's output with `--embed-resources` more accessible. Closes #9525.
2024-02-28Fix regression in section numbering.John MacFarlane
Starting with pandoc 3.1.12, unnumbered sections incremented the section number. Closes #9516.
2024-02-19Markdown reader: fix regression in link parsing...John MacFarlane
with wikilinks extensions. This fixes a regression introduced in 3.1.12. Closes #9481.
2024-02-19Org reader/writer: support admonitions.John MacFarlane
Closes #9475.
2024-02-19Typst writer: ensure that `-`, `+`, etc. are escaped at beginning of block.John MacFarlane
Our recent relaxing of escaping (#9386) caused problems for things like emphasized `-` characters that were rendered using `#strong[-]#`. This now gets rendered as `#strong[\-]`. Closes #9478.
2024-02-18LaTeX writer: fix bug when a language is specified in two different ways.John MacFarlane
If you used `lang: de-DE` but then had a span or div with `lang=de`, the preamble would try to load `ngerman` twice, leading to an error. This fix ensures that a language is only loaded once. Closes #9472.
2024-02-16More fixes for SVG ids with `--self-contained`.John MacFarlane
This generalizes the fix to #9420 so it applies to things like `style="fill(url(#..."`. Closes #9467.
2024-02-13LaTeX reader: improve treatment of cref, Cref.John MacFarlane
Associate with `\cref` and `\Cref` the reference-type `ref+label` and `ref+Label`. So far we don't do anything fancy with these. Also, associate with `\vref` `ref` instead of `ref+page`. See #7463.
2024-02-12Typst writer: improve citation support.John MacFarlane
Emit `form: "prose"` or `form: "year"` qualifiers if the citation is author-in-text or suppress-author. Strip initial comma from suffix, since typst will add an extra one. Closes #9452.
2024-02-12HTML5 writer: Add suffix to multiple footnote section idsSam May
The first (and often only) `<aside id=footnotes>` block remains unchanged, however any additional blocks from `--reference-location` are distinguished as `#footnotes-2`, `#footnotes-3`, and so on. No other existing writer seems to implement per-section IDs, including HTML4.
2024-02-12Markdown writer: use different width fences for nested divs.John MacFarlane
Outer divs have longer fences. This aids clarity for the reader, making it easier to see where the div ends. It also makes the output compatible with some other implementations, e.g. micromark, which require different-width fences for nesting. Closes #9450.
2024-02-11Man reader: move spaces outside of emph/strong.John MacFarlane
This is needed to avoid problems in conversion to Markdown and some other formats. Closes #9445.
2024-02-09Fix id replacements in SVGs with clipping paths.John MacFarlane
This fixes `--embed-resources` when SVGs have `clip-path` attributes. Closes #9420.
2024-02-09Fix size of duplicated SVGs with `--embed-resources`.John MacFarlane
Closes #9439.
2024-02-03Shared: `makeSections` behavior changes.John MacFarlane
+ When the optional base level parameter is provided, we no longer ensure that the sequence of heading levels is gapless [behavior change]. Instead, we set the lowest heading level to the specified base level, and adjust the others accordingly. If an author wants to skip a level, e.g. from level 1 to level 3, they can do that. In general, the heading levels specified in the source document are preserved; `makeSections` only puts them into a hierarchical structure. Closes #9398. + Section numbers are now assigned so that the top level gets `1`, no matter what heading level is used. So, even if the top heading level is 2, numbers will be `1`, `2`, etc. rather than `0.1`, `0.2`, as in the past. Closes #5071. + We revert to the old behavior when the `--number-offset` option is used. So, for example, if a document begins with a level-3 heading, and `--number-offset=1,2` is used, the top-level section numbers will be `1.2.1`, `1.2.2`, etc. This is mainly for backwards-compatibility.
2024-01-29Typst writer: handle labels and citaiton ids with spaces...John MacFarlane
and other special characters. In these cases, we produce an explicit `label()` rather than using `<>` or `@`. Cloess #9387.
2024-01-29Typst writer: avoid illegal labels.John MacFarlane
Closes #9387.
2024-01-29LaTeX reader: generate relative widths for `\linewidth`, `\textheight`.John MacFarlane
Closes #9388.
2024-01-29Makefile: change default rule to build THEN test.John MacFarlane
That way we can play with the executable while the tests complete.
2024-01-29Typst writer escaping improvements.John MacFarlane
We no longer escape `(`. The reason we did this before (#9137) has been addressed in another way (#9252). We only escape `=`, `+`, `-` at the beginning of a line. We now also escape `/` at the beginning of a line. This should reduce unnecessary escapes. Closes #9386.
2024-01-26EPUB reader: don't put `#` characters in identifiers.John MacFarlane
2024-01-25Add some kerns where needed between quotes in LaTeX output.John MacFarlane
Closes #9371.
2024-01-23add testcaseGokul Rajiv
2024-01-22Org writer: escape special lines in code blocksAlbert Krewinkel
Fixes: #9218