aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2025-08-26LaTeX writer: don't invariably insert blanks between blocks.issue7111John MacFarlane
Plain or RawBlock elements should not automatically be followed by blank lines. See #7111
2025-08-26Markdown reader: don't confuse a span after...John MacFarlane
an author-in-text citation with a locator. E.g. `@foo [test]{.bar}`. See https://github.com/jgm/pandoc/issues/9080#issuecomment-3221689892.
2025-08-21Make `-t chunkedhtml -o -` output to stdout (as documented)...John MacFarlane
rather than creating a directory called `-`. Closes #11068.
2025-08-17Citeproc: don't move footnotes around em-dashes.John MacFarlane
Closes #11046.
2025-08-17Typst writer: add escapes to prevent inadvertent lists...John MacFarlane
due to automatic wrapping. Also simplify existing code that was meant to do this. Closes #10047.
2025-08-17LaTeX writer: add braces around comments in title-meta.John MacFarlane
This is needed to prevent PDFs from interpreting this as a sequence of titles. See #10501.
2025-08-15ImageSize: Fix JPEG file signature detection.R. N. West
The previous implementation didn't include all possible JPEG file signatures. All signatures in the range of ff d8 ff e0 and ff d8 ff ef should be valid, in addition to ff d8 ff db (no application segment). See <https://gist.github.com/leommoore/f9e57ba2aa4bf197ebc5?permalink_comment_id=3863054#gistcomment-3863054> and p. 32 of <https://www.w3.org/Graphics/JPEG/itu-t81.pdf>.
2025-08-14ImageSize: Handle jpgs with signature FF D8 FF EE.John MacFarlane
Closes #11049.
2025-08-14Org reader: allow "greater block" names to contain any non-space charAlbert Krewinkel
Closes: #4287
2025-08-14Org reader: accept quoted values as argument values.Albert Krewinkel
Fixes: #8869
2025-08-12Typst writer: add parens around typst-native year-only citations.John MacFarlane
Closes #11044.
2025-08-11Create directory of output file if it doesn't exist.John MacFarlane
Closes #11040.
2025-08-11Docx writer: ensure that documents don't start with a section separatorAlbert Krewinkel
Any leading section separator is removed from the result. Closes: #10578
2025-08-11LaTeX reader/writer: change handling of math environments.John MacFarlane
Certain environments in LaTeX will trigger math mode and can't occur within math mode: e.g., `align` or `equation`. Previously we "downshifted" these, parsing an `align` environment as a Math element with `aligned`, and an `equation` environment as a regular display math element. With this shift, we put these in Math inlines but retain the original environments. This works because: 1) texmath handles these environments just fine, 2) and so does MathJax; 3) when writing LaTeX we detect these environments in Math elements and emit them verbatim instead of putting them in `$..$` or `$$..$$`. Closes #9711. Closes #9296.
2025-08-10LaTeX reader: parse `\minisec` as unlisted level 6 headings.Albert Krewinkel
Closes: #10635
2025-08-10T.P.Writers.Shared: amend docs of `lookupMeta...` functions.Albert Krewinkel
Add notes to the Haddock docs that certain meta values lead to empty return values. Closes: #10634
2025-08-10ODT Reader: Add table-header-rowsTuong Nguyen Manh
2025-08-09T.P.Options: Add and export `defaultWebTeXURL` WebTeX URL [API change] (#11029)Sean Soon
This fixes the `webtex` option when used without parameter in a defaults file.
2025-08-06Org template: add `#+options` lines if necessaryAlbert Krewinkel
The default template now adds `#+options` lines if non-default settings are used for the `smart_quotes` and `special_strings` extensions.
2025-08-06Org writer: disable smart quotes by defaultAlbert Krewinkel
2025-08-06Add `smart_quotes` and `special_strings` extensions for OrgAlbert Krewinkel
Org mode makes a distinction between smart parsing of quotes, and smart parsing of special strings like `...`. The finer grained control over these features is necessary to truthfully reproduce Emacs Org mode behavior. Special strings are enabled by default, while smart quotes are disabled. The behavior of `special_string` is brought closer to the reference implementation in that `\-` is now treated as a soft hyphen.
2025-08-06LaTeX writer: set `pdf-trailer-id` if `SOURCE_DATE_EPOCH` envvar is setAlbert Krewinkel
The `SOURCE_DATE_EPOCH` environment variable is used to trigger reproducible PDF compilation, i.e., PDFs that are identical down to the byte level for repeated runs. Closes: #6539
2025-08-06LaTeX reader and writer: add support for soft hypensAlbert Krewinkel
The `\-` command is parsed as a soft hyphen character; likewise, the character is written as that command when outputting LaTeX.
2025-08-06ImageSize: Unpack compressed object streams in PDFs...John MacFarlane
...and look inside for MediaBox information. Closes #10902.
2025-08-04Do not drop fragment/hash for local file paths.John MacFarlane
With the previous behavior it was impossible to have an image file containing `#` or `?`. For the motivation for the previous behavior, see commit 1d137fb. Closes #11021.
2025-08-03Fix named entity lookup in POD readerEvan Silberman
Translating entities by name ultimately relies on Commonmark.Entity.lookupEntity, which de facto requires the entity name to be followed by a semicolon. Paste a semicolon onto the end of the entity name read from POD to look it up. Fixes #11015
2025-08-03Typst reader: handle inline-level show rules on block content.John MacFarlane
Typst allows things like `smallcaps` to be applied to block-level content like headings. This produces a type mismatch in pandoc, so before processing the output of typst-hs, we transform it, pulling the block-level elements outside of the inline-level elements. Closes #11017.
2025-08-02HTML writer: Unwrap "wrapper" divs.John MacFarlane
Some of the readers (e.g. djot) add "wrapper" divs to hold attributes for elements that have no slot for attributes in the pandoc AST. With this change, the HTML reader "unwraps" these wrappers so that the attributes go on the intended elements. Closes #11014.
2025-08-01Text.Pandoc.PDF: avoid encoding errors when reading LaTeX logs.John MacFarlane
Sometimes they are not all UTF-8, even in a UTF-8 locale. Closes #10954.
2025-08-01PandocMonad: add function `runSilently` [API Change]Albert Krewinkel
The function runs an action in the PandocMonad, but returns all log messages reported by that action instead of adding them to the main log.
2025-08-01Make CommonState opaque.John MacFarlane
Text.Pandoc.Class now exports CommonState as an opaque object, without its fields. [API change] The internal module Text.Pandoc.Class.CommonState still exports the fields. Text.Pandoc.Class now exports the following new functions: `getRequestHeaders`, `setRequestHeaders`, `getSourceURL`, `getTrace`. [API change]
2025-07-31Improve org-cite parsing.John MacFarlane
Handle global prefix and suffix properly. Use all and only the styles mentioned in oc-basic.el.
2025-07-31Improve org citation parsing (allow space after ;).John MacFarlane
2025-07-30Fix mistaken attempt to fix #11006.John MacFarlane
Update the test so it reflects the right output, and fix the solution. Really closes #11006.
2025-07-30Typst writer: add native Typst support for `nocite`.Albert Krewinkel
The `nocite` metadata field can now be used to supply additional citations that don't appear in the text, just as with citeproc and LaTeX's bibtex and natbib. Closes: #10680
2025-07-29Asciidoc writer: handle lists with sublists following continuations.John MacFarlane
These require an additional blank line in some cases. Closes #11006.
2025-07-29TikiWiki reader: Use getVerbosity instead of getCommonState.John MacFarlane
2025-07-29LaTeX writer: be more conservative about using `\url`.John MacFarlane
We only use it when the URL is all ASCII, since the `\url` macro causes problems when used with some non-ASCII characters. Closes #8802.
2025-07-29ImageSize: Add Point and Pica as constructors of ImageSize.John MacFarlane
[API change] This will prevent unnecessary conversion of units. Closes #8957.
2025-07-28Text.Pandoc.Class: Add `stManager` to CommonState.John MacFarlane
[API change] This allows us to cache the HTTP client manager and reuse it for many requests, instead of creating it again (an expensive operation) for each request. (The documentation for `newManager` advises sharing a single manager between requests.) This fixes a memory leak and performance issue in files with a large number of remote images. Closes #10997.
2025-07-27Markdown writer: use fenced divs even with empty attributes.Carlos Scheidegger
Previously fenced divs were not used in this case, causing the writer to fall back to raw HTML. Closes #10955.
2025-07-27Org writer: don't wrap link descriptions.John MacFarlane
Org doesn't reliable display these as links if they have hard breaks. Closes #9000.
2025-07-27Docx reader: fix `stringToInteger`.John MacFarlane
It previously converted things like `11ccc` to an integer; now it requires that the whole string be parsable as an integer. Closes #9184.
2025-07-26Ensure that the default template for `xml` is null.John MacFarlane
2025-07-26Associate the `.xml` extension with the XML reader and writer.John MacFarlane
2025-07-26New `xml` format exactly representing a Pandoc AST.massifrg
This adds a reader and writer for an XML format equivalent to `native` and `json`. XML schemas for validation can be found in `tools/pandoc-xml.*`. The format is documented in `doc/xml.md`. API changes: - Add module Text.Pandoc.Readers.XML, exporting `readXML`. - Add module Text.Pandoc.Writers.XML, exporting `writeXML`. A new unexported module Text.Pandoc.XMLFormat is also added.
2025-07-25PDF: Improve error readability when pdf-engine is not supported.Albert Krewinkel
Each supported engine is now printed on a line of its own.
2025-07-25PDF: allow `pdflatex-dev` and `lualatex-dev` as PDF enginesAlbert Krewinkel
These are the development versions of the LaTeX binaries; installable, e.g., with `tlmgr install latex-base-dev`. Closes: #10991
2025-07-25T.P.PDF: clean up `makePDF`Albert Krewinkel
2025-07-24DocBook reader: Add rowspan support. (#10981)Sean Soon