aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-12-06Implement `reset-citation-positions` class on headings.reset-positionJohn MacFarlane
When the `reset-citation-positions` class is added to a top-level heading, `--citeproc` will reset position information at that point in the document. This is needed in order to ensure that the first citation in a chapter to a work that has been cited in a previous chapter will not be in abbreviated form. Requires a dependency on a development version of citeproc.
2025-12-05HTML reader: parse inline style elements as RawInline.John MacFarlane
This is a cleaner fix to #10643 than the reverted commit 7fe8c92. Styles are not stripped, but with this change they will not interfere with inline parsing. Closes #11246.
2025-12-05Revert "HTML reader: ignore style tags in the body."John MacFarlane
This reverts commit 7fe8c928212197354196724e9b95b71a854fdca9. See #10643 and #11246.
2025-12-05RST reader: fix definition lists where term ends with `-`.John MacFarlane
This reverts some old code giving special treatment to lines ending in hyphens; I don't understand why it was there, because rst2html does not seem to do this. Closes #11323.
2025-12-04Citeproc.BibTeX: Fix typo affecting `jurisdiction` biblatex type.John MacFarlane
Closes #11321.
2025-12-04Fix biblatex parsing of `@commentary` entries.John MacFarlane
Previously they were skippedas comments due to a bug. Closes #11322.
2025-12-02Texinfo writer: improve handling of certain code blocks.John MacFarlane
MediaWiki, for example, will parse a code block containing formatting as a sequence of Code elements separated by LineBreaks. For this we now use a texinfo example block. Closes #11312.
2025-12-01Fix spacing issue.John MacFarlane
2025-11-30Docx reader: Handle REF link instruction (#11296)Ezwal
This PR aims to handle a common run field instruction (fieldInstr) from docx format : REF, specifically those with the "link" switch \h. In word software, you can create REF field instruction with the Cross-reference button. You can create cross-reference to many things such as Equation, Table, Title...
2025-11-30Add reveal.js scroll view option to HTML writer (#11305)Asliddinbek Azizovich
* Add revealjs `scroll` view option to HTML writer * Add `scrollSnap` option into default.revealjs Closes #10052
2025-11-30ANSI writer: Apply row spans in tables (#11294)Tuong Nguyen Manh
The ANSI writer is now able to keep track of row spans and apply them in rows. [API change] T.P.Writers.Shared: Add functions `insertCurrentSpansAtColumn`, `takePreviousSpansAtColumn` and `decrementTrailingRowSpans` for applying and keeping track of RowSpans over multiple rows. Fixes: #10149
2025-11-30pptx writer: Handle reference doc without slides (#11310)Tuong Nguyen Manh
An empty `sldIdLst` is now added if the reference doc is missing one so that `modifySldIdLst` can replace it. To ensure PowerPoint doesn't say that the file will need fixing, the `sldIdLst` has to be placed after the `sldMasterIdLst`. I also added a test to ensure that if there are notes, they will be placed between the `sldMasterIdLst` and `sldIdLst`. Otherwise PowerPoint wouldn't show the slide of a note when viewing Notes Pages. Closes #7536.
2025-11-30Change message for missing HTML title warning.John MacFarlane
Suggest setting the `pagetitle` variable instead of setting `title` in metadata, which also has the effect of adding an h1 element. Closes #11307.
2025-11-30RST reader: correctly handle intraword emphasis.John MacFarlane
Closes #11309.
2025-11-30Make Control.Monad import unqualified.John MacFarlane
ghc 9.6+ needs the import of MonadPlus, but previous versions give a warning.
2025-11-29Avoid compiler warning with mplus import.John MacFarlane
2025-11-29Add asciidoc as an input format.John MacFarlane
New exported module Text.Pandoc.Readers.AsciiDoc, exporting readAsciiDoc [API change]. The bulk of parsing is handled by the asciidoc library. Closes #1456.
2025-11-24Add `xlsx` (Microsoft Excel) as an input format.Anton Antich
Each worksheet turns into a section containing a table. The common file `nativeDiff` has been extract from the Docx and Pptx text files and put in Tests.Helpers.
2025-11-24Support pptx (PowerPoint) as an input format.Anton Antich
New module `Text.Pandoc.Readers.Pptx`, exporting `readPptx`. [API change] Factored out some common OOXML functions from Text.Pandoc.Readers.Docx.Util into a non-exported module Text.Pandoc.Readers.OOXML.Shared.
2025-11-16HTML writer: use 'defer' when including mathjax script.John MacFarlane
As recommended in the MathJax docs. Closes #11292.
2025-11-12LaTeX writer: make L1-3 headings work inside blockquotes.James Barlow
Add mbox before all headings (not just L4+) inside blockquotes. Otherwise LaTeX raises an error. Closes #11281.
2025-11-12Docx reader: check recursively for caption styles.Albert Krewinkel
The docx reader uses caption styles to identify figures and captioned tables. It now checks for known caption styles in the full styles hierarchy of a paragraph instead of just checking the style directly. This allows to recognize caption styles that are built on top of the basic *caption* style, as is sometimes the case in sophisticated styles.
2025-11-06PDF: avoid converting SVG to PDF when non-TeX PDF engine is used.John MacFarlane
This fixes a 3.8 regression, which caused documents with SVGs to raise an error when converted to PDF using WeasyPrint. Closes #11275.
2025-11-05LaTeX writer: Remove `split` from list of math environments.John MacFarlane
This fixes #11274.
2025-11-05LaTeX reader: revert `\linebreak` as LineBreak.John MacFarlane
`\linebreak` is more of a hint, it shouldn't produce a hard break. See #11272.
2025-11-05Add BBCode writer (#11242)reptee
`bbcode` is now supported as an output format, as well as variants `bbcode_fluxbb` (FluxBB), `bbcode_phpbb` (phpBB), `bbcode_steam` (Hubzilla), `bbcode_hubzilla` (Hubzilla), and `bbcode_xenforo` (xenForo). [API change] Adds a new module Text.Pandoc.Writers.BBCode, exporting a number of functions. Also exports `writeBBCode`, `writeBBCodeSteam`, `writeBBCodeFluxBB`, `writeBBCodePhpBB`, `writeBBCodeHubzilla`, `writeBBCodeXenforo` from Text.Pandoc.Writers.
2025-11-04Better handling of `\makeatletter` in parsing raw LaTeX.John MacFarlane
Closes #11270.
2025-11-04Revert "Improve parsing of raw LaTeX blocks..."John MacFarlane
This reverts commit 22863a3e124215e6fd24efe55a5a99fb2d605e5b.
2025-11-04Improve parsing of raw LaTeX blocks...John MacFarlane
containing macro definitions with `\makeatletter` and `\makeatother`. Closes #9953, see also #11270.
2025-11-04T.P.LaTeX.Parsing: change type on rawLaTeXParser.John MacFarlane
The preparser doesn't need to return a value.
2025-11-04LaTeX reader: fix spurious paragraph breaks in math environments (#11265)Emmanuel Ferdman
Previously, a math environment with extra space before the `\end` would get rendered with a blank line, which LaTeX treats as a paragraph break. Signed-off-by: Emmanuel Ferdman <[email protected]>
2025-11-03LaTeX reader: fix bugs in raw LaTeX parsing.John MacFarlane
Fix `rawTeXParser`. Make macro expansion in raw LaTeX depend on the setting of the `latex_macros` extension. Previously macros were always expanded, even in raw TeX in markdown. In addition, there was previously a bug that caused content to be garbled in certain cases. Closes #11253. Handle `ifstrequal` at a lower level, like the other `if` commands. See #11253.
2025-11-03asciidoc writer: Add more table features (#11267)Tuong Nguyen Manh
This adds the following table features: - row span and column span - footer row - individual horizontal cell alignment [API change] T.P.Writers.Shared: Add functions `allRowsEmpty` and `tableBodiesToRows` from the RST writer for reuse in other writers. Also fix hlint warning about `unzip` from `NonEmpty`: The exported polymorphic function will become monomorphic in the future. Restrict the `NonEmpty` import to use the Prelude `unzip` function.
2025-11-03Markdown reader: fix performance issue in links with `'`.John MacFarlane
Closes #10880.
2025-11-02LaTeX writer: improve handling of math environments in tex math.John MacFarlane
Previously the special handling added for #9711 worked only when the math element did not contain spaces before the math environment. Closes #11266.
2025-10-30Typst reader: handle document metadata and `#title`.John MacFarlane
See jgm/typst-hs#80. Note that previously, the typst reader never returned document metadata. Now it does, even if the typst document does not contain a `#title` function that would result in actually printing the title block.
2025-10-30PDF: fix regression with typst and smart quotes.John MacFarlane
Before 3.8, the default behavior when producing a PDF `-t typst` was to produce smart quotes according to typst's defaults. (This could be defeated by specifying `-t typst-smart`.) This behavior broke in 3.8 because of a change to Text.Pandoc.PDF. This change caused `smart` to be disabled for all formats when producing PDFs, when before it was only disable for TeX-based formats (to avoid bad ligatures). This commit restores the old behavior. Possibly the regression also other affects other non-TeX formats, e.g. HTML. Closes #11256.
2025-10-28LaTeX reader: Moved some entries from environments to blockCommands.John MacFarlane
They are not environments! `ifstrequal`, `iftoggle`, etc. ifstrequal, iftoggle, etc. -- these are not environments, and they are handled under inlineCommands.
2025-10-27Djot reader: add Space elements.John MacFarlane
Previously we just got big Str elements with spaces included. But many pandoc writers assume that breakable spaces will be Space elements. So, we got odd results with e.g. jira output. Closes #11250.
2025-10-24Citeproc: allow formatting in locator to be transmitted to citeproc.John MacFarlane
We do this indirectly, by rendering the formatting using the HTML tags that citeproc recognizes. Fixes jgm/citeproc#68 and jgm/citeproc#163. Note that formatting is only possible for locators given in the explicit form, surrounded by curly braces. It won't work for implicit locators, since these expect number-like expressions.
2025-10-18Org reader: parse parameter lists on unknown blocks.Albert Krewinkel
The reader tries to parse the rest of the opening line of a block, e.g., `#+begin_myblock …`, as a parameters list. It first assumes that the parameters are in lisp-style (`:key value`), then alternatively tries to read python-style key-value pairs (`key=value`) and falls back to reading the entire remaining line as a single `parameter` attribute. This method is also applied to dynamic blocks. Closes: #11188
2025-10-18Org reader: add support for dynamic blocks.Albert Krewinkel
2025-10-15Docx writer: properly handle nested comment spans.John MacFarlane
Patch credit: @mmourino. Closes #8189. Closes #6959.
2025-10-14RST writer: Don't use simple tables with RowSpans (#11214)TuongNM
2025-10-13RTF reader: improve hyperlink parsing.John MacFarlane
Closes #11211.
2025-10-13Typst writer: Escape open paren after non-space.John MacFarlane
This fixes an issue that occurs if an open paren comes right after e.g. `#strong[test]`. Closes #11210.
2025-10-11HTML reader: allow blank space between open and close iframe.John MacFarlane
2025-10-06LaTeX writer/template: small fix for unnumbered tables.John MacFarlane
This improves on commit e13aa5c0157744de262ac512cc95a76a4562e37b, which worked only for recent versions of longtable. For older versions, we need to define a dummy counter `none`. Closes #11201. Thanks to @priiduonu for the solution.
2025-10-05Typst writer: don't add semicolons as much.John MacFarlane
Previously we added semicolons after inline commands not followed by spaces, but mainly this was to deal with one issue: the presence of a semicolon after an inline command, which would be swallowed as a command separator (#9252). This commits adopts an approach that should avoid so many superfluous semicolons: it escapes semicolons that might come right after a command. See #11196.
2025-10-04Small improvement to oneOfStrings.John MacFarlane
Use accumulator.