aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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.
2025-10-04LaTeX writer: Fix strikeout in links (#11192)TuongNM
As in #1294 \url and \href need to be protected inside an mbox for soul commands. Closes #9366.
2025-10-03Parsing.General: Rewrite `oneOfStrings'` with less conversion to string.John MacFarlane
2025-10-02Markdown tables: implement `table_attributes` extension.John MacFarlane
When `table_attributes` is enabled (as it is by default for pandoc's Markdown), attributes can be attached to a table by including them at the end of the caption. Previously the writer would emit an identifier in this position, but the reader didn't handle it. Now arbitrary attributes are allowed, and they work in both the reader and writer. Closes #10884. [API change]: Text.Pandoc.Extensions: Add `Ext_table_attributes` constructor for `Extension`.
2025-09-29T.P.XML: Add `fetchpriority` to list of HTML attributes.John MacFarlane
Closes #11176.
2025-09-29RST writer: Add col spans for simple tables (#11173)TuongNM
Closes #10127.
2025-09-28LaTeX writer: Fix strikeouts in beamer title (#11169)TuongNM
beamer uses pdfstring for the pdfinfo which can't handle soul strikeouts. Therefore, the title, subtitle and author contents need to be put inside texorpdfstring to deal with both the pdfinfo as well as the formatting. Fixes #11168.
2025-09-28Typst writer: Fix syntax highlighting.John MacFarlane
See #11171. Previously the native typst highlighting was always used, regardless of the setting of `--syntax-highlighting`. With this change, `--syntax-highlighting=none` and `--syntax-highlighting=<style name>` (with skylighting) will work. Completes #10525.
2025-09-28T.P.Highlighting: export typst functions.John MacFarlane
[API change] New exported functions `formatTypstBlock`, `formatTypstInline`, `styleToTypst`.
2025-09-27LaTeX writer: make beamer footnotes compatible with pauses.John MacFarlane
Previously they would appear before the content to which the note was attached, when there were pauses in a slide. Closes #5954. See related discussion in https://github.com/josephwright/beamer/issues/565.
2025-09-24RST writer: ensure blank line before directives.John MacFarlane
Closes #11162.
2025-09-20OpenDocument writer: Add missing table elements (#11157)TuongNM
Add missing header rows after the first one, footer rows as well as TableBody header rows. Also apply hlint suggestions to use Down and fuse mapM/map. Closes #10002.
2025-09-19Docx writer: fix regression (3.8) in highlighted code.John MacFarlane
We added DefaultHighlighting in commit 6475725 but didn't adjust the pattern-match here. Closes #11156.
2025-09-19Docx reader: handle figures in indented paragraphs.John MacFarlane
Previously these were omitted. Closes #11028.
2025-09-19LaTeX writer: avoid `\_` in bibliography variable.John MacFarlane
Since underscores are common in filenames, and pandoc will render strings to variables using default LaTeX escaping, we special-case `bibliography`, under the assumption that this variable will be used in the context of the `\bibliography{..}` command, which accepts unescaped underscores. Closes #11152.
2025-09-18RST reader: fix regression in simple table parsing.John MacFarlane
Closes #11150.
2025-09-18RST reader: SkippedContent warning if table directive...John MacFarlane
containts non-tabular content.
2025-09-17RST simple table fix.John MacFarlane
Leading space in a cell should not cause the contents to be parsed as a block quote. Closes #11146.
2025-09-17Docx reader: change default for textwidth.John MacFarlane
This should only be used if sectPr is not found.
2025-09-17Docx reader: properly calculate table column widths.John MacFarlane
Previously we assumed that every table took up the full text width. Now we read the text width from the document's sectPr. Closes #9837. Closes #11147.
2025-09-16LaTeX writer: ensure that unlabelled tables don't increment counter.John MacFarlane
Closes #11141.
2025-09-16Markdown reader: Improve superscript/subscript/inline note parsing.John MacFarlane
We do not allow inline notes to be followed by `(` or `[`. Otherwise, we parse inline notes before superscripts. This fixes #8652. Also, the sub/superscript parsers have been adjusted so that they really exclude unescaped spaces (as they did not before, when the spaces occurred in nested inlines). See #5878 for comment.
2025-09-16Markdown reader: refactor out litBetween.John MacFarlane
2025-09-15Vimdoc writer (#11132)reptee
Support for vimdoc, documentation format used by vim in its help pages. Relies heavily on definition lists and precise text alignment to generate tags.
2025-09-15LaTeX reader: ignore `\pandocbounded`.John MacFarlane
Third issue in #11140.
2025-09-15Markdown writer: improve handling of implicit figures.John MacFarlane
Allow implicit figures when alt text differs from caption (in this case, we use an image attribute to add the alt). Closes #11140.
2025-09-15RST reader: parse `:alt:` on figure.John MacFarlane
Also give a better default if `alt` is not specified, using the stringified caption rather than the filename. Partially addresses #11140. Add failing test case for Markdown writer issue in #11140.
2025-09-15LaTeX writer: Protect VERB in caption (#11139)TuongNM
Also apply hlint suggestions for fewer imports and moving brackets to avoid $.
2025-09-13xml reader: parse MetaString (#11137)massifrg
`<MetaString>` contents parsing was missing.
2025-09-12Markdown reader: Fix simple table alignment (#11136)TuongNM
Take wide characters into account when determining the alignment.
2025-09-10Add support for reading typst pagebreak (#11126)Raymond Berger
The pagebreak is parsed as a HorizontalRule inside a wrapper Div with class `page-break`. Closes #11101.
2025-09-10Markdown writer: use approximate pipe tables when it's the only option.John MacFarlane
If we have a table with row/colspans that can rendered as an approximate pipe table (without row/colspans), and no other table format is enabled that could render the table, we fall back to an "approximate" pipe table, with no row/colspans. Closes #11128.
2025-09-10Markdown writer: refactor table cases.John MacFarlane
2025-09-09PandocMonad: Let fetching fail if the HTTP request is not successful.Albert Krewinkel
HTTP requests that don't return a 200 error code are now treated as an error. This ensures that a warning is triggered when using `--embed-resources` or `--extract-media`.
2025-09-09RST Reader: Add col spans for simple tablesTuong Nguyen Manh
[API change] Text.Pandoc.Parsing: New functions `tableWithSpans`, `tableWithSpans'`, `toTableComponentsWithSpans` and `toTableComponentsWithSpans'` take a list of lists of (Blocks, RowSpan, ColSpan) to parse a Table with different RowSpan and ColSpan values accordingly. New helper functions `singleRowSpans` and `singleColumnSpans` help set all RowSpans or ColSpans to be 1 in case the table format only allows setting one or the other.
2025-09-09LaTeX writer: Don't add links to TOC.Albert Krewinkel
Fixes: #11124
2025-09-09T.P.Writers.Shared: add new function `removeLinks`.Albert Krewinkel
The function converts links to spans. It is used, for example, to avoid nested links. The HTML writer used to put the description of nested links into small caps, but uses a simple *span* now.
2025-09-08pptx writer: Handle single columnTuong Nguyen Manh
Add an additional guard for a single column to be able to process it.
2025-09-06Citeproc: put bibliography in a div with id `.*__refs`John MacFarlane
as well as `refs`. Reason: when `--file-scope` is used, a Div with id `refs` gets a prefix attached, derived from the filename. The prefix ends in `__`. Closes #11072.
2025-09-06Fix spacing errors.John MacFarlane
2025-09-06Docx reader: better handling of AlternateContent.John MacFarlane
This revises the solution to #9214 in commit 2e8ecb3 in order to handle a standard Word way of inserting emojis. Closes #11113.
2025-09-06Partially undo commit 2e8ecb3.John MacFarlane
This was too heavy-handed a fix, and it interferes with processing Word emojis (#11109).
2025-09-04Revision of query/fragment dropping fix to #11021.John MacFarlane
2025-09-03T.P.Citeproc.BibTeX: Protect case in periodical titles.John MacFarlane
Thus, for example, `{npj} Quantum Information` should translate as `[npj]{.nocase} Quantum Information`. Closes #11048.
2025-09-03T.P.SelfContained: try fetching relative resources...John MacFarlane
...without query or fragment if the original fetch fails. This provides a fix for #1477 in a way that doesn't raise the problems mentioned in #11021.
2025-09-02Refactor highlighting options [API Change]Albert Krewinkel
A new command line option `--syntax-highlighting` is provided; it takes the values `none`, `default`, `idiomatic`, a style name, or a path to a theme file. It replaces the `--no-highlighting`, `--highlighting-style`, and `--listings` options. The `writerListings` and `writerHighlightStyle` fields of the `WriterOptions` type are replaced with `writerHighlightStyle`. Closes: #10525
2025-09-02T.P.Options: add type `HighlightMethod` and patterns [API Change]Albert Krewinkel
The Text.Pandoc.Options module exports the `HighlightMethod` data type and it's constructors. Furthermore, three pattern synonyms are exported, `NoHighlightingString`, `DefaultHighlightingString`, and `IdiomaticHighlightingString`, which hold the string value that's used for decoding and encoding of HighlightMethod values.
2025-09-02T.P.Highlighting: export `defaultStyle` [API Change]Albert Krewinkel
This allows to be more explicit about using a default style, and providing a single point of truth for its value. The variable is an alias for `pygments`.
2025-09-02RST Reader: Support multiple header rows (#11057)TuongNM
[API change] Text.Pandoc.Parsing: `tableWith` and `tableWith'` now return a list of lists of Blocks, rather than a list of Blocks, for the header rows, allowing for multiple header rows. Closes #10338.