aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
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-10Logging: Add UnclosedDiv constructor for LogMessage.John MacFarlane
[API change]
2024-04-08ConTeXt writer: replace depreciated `\sc` with `\setsmallcaps`James P. Ascher
ConTeXt now depreciates `\sc` in favor of `\setsmallcaps`, see #9618
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-26ConTeXt writer: fix options order with `\externalfigure`.John MacFarlane
The dimensions should come before the class if both are present. See https://github.com/jgm/pandoc/discussions/9604#discussioncomment-8913491
2024-03-22Typst writer: put label after Span, not before.John MacFarlane
Labels get applied to preceding markup item.
2024-03-22Minor comment and indentation fixes.John MacFarlane
2024-03-22Typst reader: support Typst 0.11 table features.John MacFarlane
Colspans, rowspans, table head and foot. See #9588.
2024-03-22LaTeX writer: fix math inside strikeout (closes #9597).John MacFarlane
2024-03-21Typst reader: parse cell col/rowspans.John MacFarlane
TODO: - Handle table header and footer. - Assign columns to rows in a way that respects col/rowspans.
2024-03-21Typst reader: Further refactoring on the way to improved table support.John MacFarlane
2024-03-21Typst reader: refactor out parseTable.John MacFarlane
2024-03-20Typst writer: support Typst 0.11 table features. (#9593)John MacFarlane
* Typst writer: support Typst 0.11 table features. - colspans - rowspans - cell alignment overrides - relative column widths - header and footer - multiple table bodies with intermediate headers Row heads are not yet supported. The default typst template has been modified so that tables don't have lines by default. As is standard with pandoc, we only add a line under a header or over a footer. However, a different default stroke pattern can easily be added in a template. Closes #9588.
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-18Export `isOrderedListMarker` from T.P.Writers.Shared.John MacFarlane
[API change] This was formerly in T.P.Writers.Markdown.Inline, but we need to use it in the Typst writer too.
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-17Typst writer: omit width/height in images unless explicitly specified.John MacFarlane
Previously we computed width/heigth for images that didn't have size information, because otherwise typst would expand the image to fit page width. This typst behavior has changed in 0.11. This change fixes a bug in which images would sometimes overflow page margins, depending on their intrinsic size. Closes #9236.
2024-03-16Typst writer: don't add inset to tables.John MacFarlane
This hardcoded `inset` prevented global customizations in a template. Closes #9580.
2024-03-15Typos: remove repeated words (#9577)standstaff
Signed-off-by: standstaff <[email protected]>
2024-03-14Markdown reader: Fix bug with footnotes at end of fenced div.John MacFarlane
Cloess #9576.
2024-03-14Typst writer: add 'kind' parameter to figures.John MacFarlane
This helps to distinguish tables from other figures for purposes of labeling and numbering. Closes #9574.
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-28Docx writer: don't copy over footnotePr in settings.xml...John MacFarlane
rom reference.docx. Closes #9522.
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-28Docx reader: ensure that table captions are counted.John MacFarlane
Normally these occur outside the table element itself, but they should still be parsed as captions in this case. Closes #9518.
2024-02-28Docx reader: detect caption by style name not id.John MacFarlane
The styleId can change depending on the localization. Partially resolves #9518.
2024-02-28Docx reader: avoid emitting empty paragraph where caption was.John MacFarlane
2024-02-22EPUB writer: omit EPUB2-specific meta tag on EPUB3.John MacFarlane
This caused a validation failure in epubs with cover images. Closes #9493.
2024-02-20Class: openUrl TLS negotiation fixes.John MacFarlane
With the release of TLS 2.0.0, the TLS library started requiring Extended Main Secret for the TLS handshake. This caused problems connecting to zotero's server and others that do not support TLS 1.3. This commit relaxes this requirement. Closes #9483.
2024-02-19Minor code cleanup.John MacFarlane
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-19Org writer: omit extra blank line at end of quote block.John MacFarlane
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-16Powerpoint writer: properly handle math in headings and tables.John MacFarlane
This ensures that paragraphs containing math are wrapped in a `mc:AlternateContent` node as required. Closes #9465.
2024-02-16EPUB writer: omit EPUBv3-specific accessibility stuff on epub2.John MacFarlane
Closes #9469. Fixes a regression in 3.1.12.
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-15PDF: internal cleanup of tex2pdf path.John MacFarlane
Distinguish tmpDir and outDir, since they can come apart in the latexmk case.