summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
AgeCommit message (Collapse)Author
2024-04-01Put `$` or `$$` around math in `csljson` output.HEADmainJohn 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-22LaTeX writer: fix math inside strikeout (closes #9597).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-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-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-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-02-28Docx writer: don't copy over footnotePr in settings.xml...John MacFarlane
rom reference.docx. Closes #9522.
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-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-14Fixe whitespace.John MacFarlane
2024-02-14Man writer: fix bug with long URLs.John MacFarlane
URLs with more than 68 characters didn't display properly because of wrapping. Closes #9458.
2024-02-13Fix some exports to avoid warnings on older ghc versions.John MacFarlane
2024-02-13Add djot reader and writer.John MacFarlane
Djot is a light markup syntax (https://djot.net). This patch adds djot as input and output formats. API changes: Add Text.Pandoc.Readers.Djot Add Text.Pandoc.Writers.Djot
2024-02-13Man writer: support syntax highlighting (limited).John MacFarlane
Currently only boldface and italics are supported. The `monochrome` style might be of use for those generating man pages. Closes #9446.
2024-02-13Typst writer: use `#ref` or `@` for links with `reference-type="ref"`.John MacFarlane
This attribute is added to LaTeX `\cref`, for example. See #7463.
2024-02-13Make LaTeX writer sensitive to `empty_paragraphs` extension.John MacFarlane
Closes #9443.
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-09Powerpoint writer: Fix regression in layout for slides with figures.John MacFarlane
Closes #9442.
2024-02-03Docx writer: restore ability to center-justify table.John MacFarlane
The fix to #5947 caused all tables to be left indented. This was necessary to avoid extra indentation in table cells when a table appeared in a list item. This change makes the changes conditional, so that they only affect tables in list items. Closes #9393.
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-02-01Using internal column widths in pptx writer tables (#9392)Tomas Dahlqvist
The table writer used to only divide all available width evenly for all columns. In this update the code uses the incoming widths if they are available. If they are not set the earlier even distribution is used. Some of the golden templates are adjusted slightly because of different rounding when using the new calculation model. Closes #5706
2024-02-01EPUB accessibility additions (#9400)Iacobus1983
AccessModeSufficient and AccessibilitySummary are added. These metadata are optional according to the EPUB Accessibility 1.1 standard, but ACE Daisy checker flags ebooks for missing them (cf daisy/ace#389 and daisy/ace#400). With this commit: AccessModeSufficient is defaulted to "textual". AccessibilitySummary can be included via the metadata block.
2024-01-30Typst writer: unescape URI escapes in image paths.John MacFarlane
Closes #9389.
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-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-27EPUB writer: add ARA roles for accessibility (#9378)Iacobus1983
This commit adds roles to some html element within epub in order to comply with accessibility best practices. Footnote references are given role "doc-noteref",footnote text gets "doc-footnote", and nav gets "doc-toc".
2024-01-27EPUB writer: change default accessibilityFeatures.John MacFarlane
Don't include ARIA and MathML in general; they won't apply for epub2 or documents without math.
2024-01-26EPUB writer: Add accessibility metadata to EPUB metadata.John MacFarlane
accessModes, accessibilityFeatures, accessibilityHazards. Reasonable default values are used to ensure that pandoc's EPUBs conform to the EU Accessibilty Act requirements. Closes #9372.
2024-01-25EPUB writer: Add xml:lang to package element.John MacFarlane
See #9372.
2024-01-25Add some kerns where needed between quotes in LaTeX output.John MacFarlane
Closes #9371.
2024-01-23add case for "variable" classGokul Rajiv
2024-01-22Use reference form (e.g. `@jones2000[p. 30]`) for citations.John MacFarlane
Previously we were using `#cite` and trying to put the supplement in brackets; but a bracketed supplement only works with the reference form.
2024-01-22Org writer: escape special lines in code blocksAlbert Krewinkel
Fixes: #9218
2024-01-20HTML writer: ensure that an alt attribute is added in EPUB output.John MacFarlane
This seems to be required by iBooks; even an empty alt attribute will satisfy it. Closes #9354.