aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-04-08Docx writer: don't renumber rels.issue10769John MacFarlane
This fixes a regression introduced by af57648. We are now preserving the ids from the reference doc's document.xml.refs, so we shouldn't renumber them or references introduced by the user (e.g. in a template) will fail. Closes #10769.
2025-04-07Recognize `en` as a `langid` in biblatex bibliographies.John MacFarlane
Closes #10764.
2025-04-05Docx writer: preserve Relationships for images from reference docx.John MacFarlane
This should allow one to include an image in a reference.docx and reference it in an openxml template. Closes #10759.
2025-04-05Allow compilation with random 1.2.*.John MacFarlane
2025-04-05Markdown writer: improve use of implicit figures when possible.John MacFarlane
Closes #10758. When the alt differs from the caption, but only as regards formatting, we still use an implicit figure.
2025-04-04Markdown writer: render a figure with Para caption as implicit figure.John MacFarlane
Also, when falling back to a Div with class `figure` for a figure that can't be represented any other way, include a Div with class `caption` containing the caption. Closes #10755.
2025-04-01Typst writer: support `mark` class on spans.John MacFarlane
Closes #10747.
2025-03-31Ms writer: ensure no line breaks in '.pdfhref O'.John MacFarlane
2025-03-31JATS writer: fix escaping for writing-review-editing role.John MacFarlane
Closes #10744.
2025-03-31Require random >= 1.3 and use `splitGen`.John MacFarlane
`split` has been deprecated.
2025-03-29Use `pdf-engine` variable instead of extensions...John MacFarlane
...to determine what to do about `.pdfhref` macros in `ms` output. When no PDF engine is specified, we don't use the `.pdfhref` macros at all. This gives better results for links in formats other than PDF, since the link text would simply disappear if it exists only in a `.pdfhref` macro. When a PDF engine is specified, escape the argument of `.pdfhref O` in a way that is appropriate. Remove `groff` extension. Text.Pandoc.Extensions: remove `Ext_groff` constructor. See #10738. This revises the earlier commit 3adcb4bd8089cdb8408da5f17780cd49513b7cec.
2025-03-29Text.Pandoc.App: set `pdf-engine` variable.John MacFarlane
If `--pdf-engine` is specified or if a PDF is being produced, we set the `pdf-engine` variable. This allows writers and templates to behave differently depending on the PDF engine.
2025-03-29Allow `groff` to be used as `--pdf-engine` with `ms`.John MacFarlane
When `groff` is used as a PDF engine, the `groff` extension to `ms` is automatically enabled. Limitations: - `groff` currently produces larger PDFs than `pdfroff`. - With `groff`, a table of contents produced with `--table-of-contents/--toc` will always be placed at the end of the document. - Certain characters (e.g. Greek characters) may be dropped in the PDF outline. Closes #10738.
2025-03-29Add `groff` extension affecting `ms` writer.John MacFarlane
When this extension is enabled, the `ms` writer won't escape `.pdfhref O` macros in the way that is required when `pdfroff` is used (octal-encoded UTF-16). The extension is not enabled by default. Text.Pandoc.Extensions: add `Ext_groff` constructor [API change].
2025-03-29Org reader: don't include newlines in inine code/verbatim.John MacFarlane
Convert newlines to spaces as we do in other formats. Closes #10730.
2025-03-29fix(revealjs)!: upgrade reveal.js to v5 (#10740)Kolen Cheung
because v4 on unpkg.com is no longer available.
2025-03-29Add AVIF to Org Reader image extensions (#10736)Christian Christiansen
AVIF is an image extension. This commit enables the Org reader to recognise AVIF files as images to be displayed, and not simply links.
2025-03-28T.P.Mime: fix typo in avif mime type (#10735)Christian Christiansen
`impage` -> `image`.
2025-03-25Ms writer: improve PDF TOC labels.John MacFarlane
We now use the plain writer to render these, so that Greek characters etc. will show up properly. Note: the ms output this produces works well with pdfroff but not with `groff -Tpdf`.
2025-03-23Docx writer: ensure that figures and tables with custom styles...John MacFarlane
...are not dropped. Closes #10705.
2025-03-23T.P.Writers.Roff: use the most compatible form.John MacFarlane
The form `\[e aa]` works for groff but not for all roff's (not for macOS man for instance). So instead we'll emit `e` followed by an escape for a unicode combining accent. See #10716.
2025-03-23Use the most compatible form for roff escapes.John MacFarlane
This affects T.P.RoffChar, T.P.Writers.Roff, and the Man and Ms writers. That is, `\(xy` instead of `\[xy]`. This was the original AT&T troff form and is the most widely supported. The bracketed form causes problem for some tools, e.g. `makewhatis` on macOS. Closes #10716.
2025-03-22Commonmark Reader: handle GFM math irregularity with braces.John MacFarlane
In GFM, you need to use `\\{` rather than `\{` for a literal brace. Closes #10631.
2025-03-21MediaWiki reader/writer: allow definition on same line as term.John MacFarlane
Closes #10708.
2025-03-21HTML writer: remove trailing slash from default revealjs url.John MacFarlane
This avoids a double slash in the URL's path component, which sometimes causes problems with CDNs. See #8749.
2025-03-19Skip at most one argument to LaTeX tabular newline (#10707)silby
In LaTeX's tabular environment, the tabular newline takes an optional argument that we skip. But it only takes a single optional argument, and any further square-bracketed text that follows shouldn't be skipped. Fixes #7512, and also adds a test for the original problem raised in that issue which was already fixed at some point.
2025-03-19T.P.Readers.Docx.Util: use xml-lights's `onlyElems`...John MacFarlane
...instead of defining it again.
2025-03-19Mime: handle apng, avif, jxl.John MacFarlane
See #10704.
2025-03-18Handle percent encoding in pBase64URI.John MacFarlane
This improves efficiency. See #10704.
2025-03-18Add mime type and extension for avif.John MacFarlane
See #10704.
2025-03-18Fix parsing of base64 data URIs...John MacFarlane
...to allow (a) URI escapes, (b) whitespace (which will be ignored). Partially addresses #10704.
2025-03-17T.P.Writers.Shared: rename `surroundInlines` -> `delimited`.John MacFarlane
2025-03-17Markdown writer: avoid spaces after/before open/close delimiters.John MacFarlane
E.g. instead of rendering `x<em> space </em>y` as `x* space *y` we render it as `x *space* y`. Closes #10696.
2025-03-17T.P.Writers.Shared: export `surroundInlines`.John MacFarlane
[API change]
2025-03-15LaTeX writer: protect `\phantomsection` (#10688)etclub
`\phantomsection` is used for anchors. When these occur inside a caption, a LaTeX error is raised unless the `\phantomsection` is protected using `\protect`. So we now `\protect` every `\phantomsection` (even outside of captions -- this seems to be harmless).
2025-03-14LaTeX writer: use `*` for multirow width when no colwidth specified.John MacFarlane
Otherwise the multirow will be excessively wide. Closes #10685.
2025-03-14Markdown reader: remove some misguided list fanciness.John MacFarlane
Previously we tried to handle things like commented out list items: - one <!-- - two --> - three and also things like: - one `and - two` and But the code we added to handle these cases caused problems with other, more straightforward things, like: - one - ``` code ``` - three So we are rolling back all the fanciness, so that the markdown parser now behaves more like the commonmark parser, in which indicators of block-level structure always take priority over indicators of inline structure. Closes #9865. Closes #7778. See also #5628.
2025-03-10Markdown writer: treat `Emph [Emph ils]]` as `ils`.John MacFarlane
Otherwise we get `**content**` which means strong emphasis. This is a more robust solution than using `_`, which won't work for intraword emphasis. Closes #10642.
2025-03-10HTML reader: ignore style tags in the body.John MacFarlane
They are invalid but do occur in the wild. Closes #10643.
2025-03-08HTML reader: skip MathJaX-introduced cruft.John MacFarlane
See #10673.
2025-03-07Markdown reader: fixed `escapedChar'` parser.John MacFarlane
It should not accept escaped newlines. See #10672.
2025-03-07T.P.Logging: Change NoTitleElement from WARNING to INFO.John MacFarlane
Users commonly complain about the warning when producing HTML documents without an explicit title. It seems that an info message is more appropriate, since pandoc's default here (using the input's base name) ensures compliance with the standard and many users are happy with that default. Those who want to make sure the message is seen can use `--verbose`. Closes #10671.
2025-03-05Disable citations extension in writers if `--citeproc` is used.John MacFarlane
Otherwise we get undesirable results, as the format's native citation mechanism is used instead of (or in addition to) the citeproc-generated citations. Closes #10662.
2025-03-04Typst writer: ensure that `citation-style` works as well as `csl`.John MacFarlane
Closes #10661.
2025-03-04LaTeX reader: support `\newline`, `\linebreak`.John MacFarlane
2025-03-04LaTeX reader: better handle comments/whitespace in option lists and includes.John MacFarlane
Closes #10659.
2025-02-27Typst writer: better heuristics for escaping potential list markers.John MacFarlane
Closes #10650.
2025-02-19Revert "Docx reader and writer: support row heads."John MacFarlane
This reverts commit cbe67b9602a736976ef6921aefbbc60d51c6755a. Word sets `w:firstColumn="1"` by default for tables. You have to find the Table Design tab and explicitly uncheck "First Column" to make this go away. In most cases, I don't think writers intend to designate the first column as a row head, so this commit is going to produce unexpected results. In addition, because of the table normalization done by pandoc-type's `tableWith`, any table containing a colspanned cell in the left-hand column will get broken if the first column is designated a row head. For these reasons it seems best to revert this change, which was made in response to #9495. Closes #10627.
2025-02-18Give better position information when YAML metadata parsing fails...John MacFarlane
with a YAML exception. See #10231.
2025-02-16EPUB writer: use a nonbreaking space after section number in nav.xhtml.John MacFarlane
This seems to be required for iOS books app to display the space.