aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2025-05-14T.P.Writers.Shared: New version of `gridTable`.issue6344John MacFarlane
This handles row and colspans. Partially addresses #6344. It also ensures that cells won't wrap text in places where it wouldn't normally wrap, even if this means making the cells wider than requested by the colspec. (Closes #9001. Closes 7641.) Parameters are different, so this is a breaking [API change]. Markdown, RST, and Muse writers have been adjusted to use the new `gridTable`.
2025-05-13Markdown writer: omit initial newlines in gfm `math` blocks.John MacFarlane
When the input is of the form ``` $$ x=y $$ ``` we would previously get: ```` ``` math x=y ``` ```` which is ugly.
2025-05-12Use latest texmath and dev typst.John MacFarlane
2025-05-11Add new option `--variable-json`.John MacFarlane
This allows non-string values (booleans, lists, maps) to be given to template variables on the command line. Closes #10341. Supersedes #10342.
2025-05-11Org reader: change handling of inline TeX.John MacFarlane
Previously inline TeX was handled in a way that was different from org's own export, and that could lead to information loss. This was particularly noticeable for inline math environments such as `equation`. Previously, an `equation` environment starting at the beginning of a line would create a raw block, splitting up the paragraph containing it (see #10836). On the other hand, an `equation` environment not at the beginning of a line would be turned into regular inline elements representing the math. (This would cause the equation number to go missing and in some cases degrade the math formatting.) Now, we parse all of these as raw "latex" inlines, which will be omitted when converting to formats other than LaTeX (and other formats like pandoc's Markdown that allow raw LaTex). Closes #10836.
2025-05-11T.P.Readers.LaTeX.Math: export `inlineEnvironmentNames`.John MacFarlane
Internal module, not a change to the public API.
2025-05-10Powerpoint writer: use reference-doc font for captions. (#10835)R. N. West (Nat)
Closes #9896.
2025-05-08DocBook writer: use literallayout element for LineBlock.John MacFarlane
See #10825.
2025-05-08DocBook reader: improve handling of literallayout.John MacFarlane
This is now only made a CodeBlock when there is a `monospaced` class. Otherwise it is made a LineBlock. Closes #10825.
2025-04-28Plain writer: Support the four_space_rule extension. (#10813)Manolis Stamatogiannakis
Allows using `-t plain+four_space_rule` to emulate the output of pandoc before #7172. This is useful for users that use pandoc e.g. to autoformat commit messages.
2025-04-26Typst writer: handle equation labels with spaces.John MacFarlane
Closes #10805.
2025-04-25Typst writer: add equation label if math contains `\label{..}`.John MacFarlane
Closes #10805.
2025-04-18OpenDocument writer: fix character styles in footnotes.John MacFarlane
Character styles governing the position of the footnote reference should not be imposed on the footnote text. Closes #10791.
2025-04-14LaTeX reader: support more symbol commands.John MacFarlane
Closes #10782. `\textbaht`, `\textblank`, `\textbigcircle`, `\textbrokenbar`, `\textbullet`, `\textcentoldstyle`, `\textcopyright`, `\textdagger`, `\textdegree`, `\textdollar`, `\textdong`, `\textlira`, `\textmu`, `\textmusicalnote`, `\textonehalf`, `\textonequarter`, `\textparagraph`, `\textpertenthousand`, `\textpeso`, `\textquotesingle`, `\textregistered`, `\textsection`, `\textsterling`, `\textthreequarters`, `\textthreesuperior`, `\texttwosuperior`, `\textyen`.
2025-04-14LaTeX reader: disable ligatures inside `\texttt`.John MacFarlane
Closes #10781.
2025-04-09LaTeX writer: make alignment work within multirow in tables.John MacFarlane
Closes #10772.
2025-04-08Docx writer: don't renumber rels. (#10770)John MacFarlane
This fixes a regression introduced by af57648. We used to renumber the Relationships so they didn't conflict with the set of fixed Relationships we imposed. 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]