19006 Commits
Author SHA1 Message Date
John MacFarlane 2bb3958d66 Add circleci config.
This is based on the old cirrus build config.
2026-06-03 18:07:38 +02:00
John MacFarlane 443bb1da8e Update AUTHORS. 2026-06-03 17:10:16 +02:00
John MacFarlane 08f9a91a48 Update changelog. 2026-06-03 16:38:44 +02:00
John MacFarlaneandClaude 098c48d79f RTF reader: fix tables parsed as deeply nested tables.
Closes #11682.

Fixes two bugs that caused a simple table to be read as a cascade of
nested tables:

* `\plain` reset the entire property record (including the in-table
  flag) via `const def`.  When a cell paragraph used `\plain` after
  `\intbl`, the in-table flag was cleared, so the next `\cell` closed
  the partially-built table and embedded it inside a new cell.  Per the
  RTF spec, `\plain` should reset only character formatting, so it now
  preserves paragraph/context properties (in-table, list level, outline
  level, hyperlink, anchor).

* `\row` was ignored and only `\trowd` started a new row.  Real-world
  RTF often emits a single `\trowd` and separates rows with `\row`, so
  every cell ended up in one row.  Both `\trowd` and `\row` now begin a
  fresh row (only when the current one has cells), and empty trailing
  rows are dropped when closing the table.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-03 16:36:29 +02:00
John MacFarlane 0951c95d1d pandoc-server: bump to 0.1.3. 2026-06-03 16:34:44 +02:00
John MacFarlane f166e42d4f pandoc-lua-engine: bump to 0.5.3. 2026-06-03 16:34:44 +02:00
John MacFarlane c6ab657dd3 Update man pages. 2026-06-03 16:34:44 +02:00
John MacFarlane 33bc2c9f5f Bump pandoc, pandoc-cli to 3.10, update changelog 2026-06-03 16:34:44 +02:00
John MacFarlane f8d6a6fca2 Update pandoc-server docs with typst-inputs 2026-06-03 16:34:44 +02:00
John MacFarlane ea1570e8c9 pandoc-lua-engine: require pandoc 3.10.x 2026-06-03 16:34:44 +02:00
John MacFarlane f8fddc86f3 pandoc-server: handle typst-inputs, require pandoc >= 3.10 2026-06-03 16:34:44 +02:00
John MacFarlane 9d120951dc Update manual date 2026-06-03 16:34:44 +02:00
John MacFarlane d9c33510d0 MANUAL: document typst-inputs in defaults 2026-06-03 16:34:44 +02:00
John MacFarlane 676ccdc904 T.P.Writers.Shared: htmlAttrs: use data- prefix when needed.
This now behaves like the HTML writer, adding the `data-`
prefix for custom attributes.  This will affect, e.g.,
the mediawiki writer.

Closes #11680.
2026-06-03 12:23:44 +02:00
John MacFarlane ea40d0bd0a Bump upper bound for time, tls 2026-06-03 09:17:36 +02:00
John MacFarlane 0fac8827df Use doclayout 0.5.0.3.
(Fixes compatibility with older QuickCheck versions.)
2026-06-03 09:15:50 +02:00
John MacFarlane df61830d38 Use asciidoc 0.1.0.3 2026-06-02 23:50:04 +02:00
John MacFarlane e16f5012f0 cabal.project: ensure we use latest doclayout for build.
pandoc.cabal keeps compatibility with older versions.
2026-06-02 09:46:23 +02:00
John MacFarlane e287fd65a8 Use released texmath 0.13.1.2. 2026-06-01 22:12:21 +02:00
John MacFarlane 683d496e9d Use typst 0.10 2026-06-01 22:08:13 +02:00
John MacFarlane d79e324e05 Use released typst-symbols 2026-06-01 20:11:41 +02:00
John MacFarlane 9038439481 Fix typo in stack.yaml. 2026-06-01 13:08:14 +02:00
John MacFarlane f7dcd693f6 Use released pandoc-types 1.23.1.2. 2026-06-01 12:45:38 +02:00
John MacFarlane 3cff7d44ba Use citeproc 0.13.0.1. 2026-06-01 11:04:45 +02:00
John MacFarlane 239522c398 Use released doclayout. 2026-06-01 10:42:59 +02:00
積丹尼 Dan Jacobson 05b14ffe79 Update instructions for modifying reference.docx (#11600)
Mention LibreOffice as an alternative.
2026-06-01 08:54:41 +02:00
John MacFarlane 74c9f4d2b0 Use released versions of commonmark libraries. 2026-05-31 17:11:17 +02:00
John MacFarlane 1e37beac98 Remove unnecessary import. 2026-05-31 16:54:54 +02:00
John MacFarlane f0b9d7d3cc T.P.Error: display IOError without stack trace.
Closes #11676.
2026-05-31 11:30:32 +02:00
John MacFarlane 1147836faf Try to fix a CI problem on Windows. 2026-05-31 10:46:45 +02:00
John MacFarlane 328a9fcc6e Docx writer: fix display of paragraph with just inline math.
Word displays a paragraph containing just one inline math
element as if it were display math. We don't want that,
so we add a zero-width space to defeat this behavior.

Closes #11674.
2026-05-31 10:43:39 +02:00
John MacFarlane af3af04f19 Use dev commonmark-extensions. 2026-05-31 10:29:59 +02:00
Meher Chaitanya 1ffeb856ee Add auto_identifiers support to Man Reader (#11675)
Add support for the `auto_identifiers`, `gfm_auto_identifiers`, and
`ascii_identifiers` extensions in the man reader. Section headings
parsed from .SH and .SS macros now receive auto-generated id
attributes when the extension is enabled, enabling `--toc` to
produce working anchor links.

- Add `autoIdExtensions` to default man extensions [behavior change]
- Add `HasReaderOptions`, `HasLogMessages` and `HasIdentifierList` to
  `ManState` to run `registerHeader`

Closes #8852.
2026-05-30 19:11:14 +02:00
Amir Dekel c6ba4d9040 Prevent wrong combination of subtitle and titleaddon with maintitle (#11677)
When `maintitle` is present, `subtitle` should not be added to `title`, but only
to `volume-title`.
2026-05-30 19:01:19 +02:00
John MacFarlane 3385981157 ODT reference doc: demonstrate predefined styles.
Previously data/odt/content.xml contained only "Hello World!", so the
reference.odt produced by `--print-default-data-file reference.odt` gave
users no visual indication of which styles pandoc uses or how their
customizations would render.

Populate content.xml with example content exercising the predefined
paragraph and text styles shipped in data/odt/styles.xml: Author, Date,
Abstract, Heading_20_1..6, First_20_paragraph, Text_20_body (with
Emphasis, Strong_20_Emphasis, Strikeout, Superscript, Subscript,
Source_20_Text, Highlighted, hyperlink, and footnote), Quotations,
Preformatted_20_Text, List_20_Bullet, List_20_Number, TableCaption,
a two-column table using Table_20_Heading and Table_20_Contents,
FigureCaption, Definition_20_Term, and Definition_20_Definition.

This mirrors the demonstration content already present in
data/docx/word/document.xml.

Closes #10327.
2026-05-29 11:17:16 +02:00
John MacFarlane 864682663e Use dev pandoc-types. 2026-05-29 09:35:56 +02:00
John MacFarlane ad4bf9aa31 Accept aeson 2.3. 2026-05-29 09:34:48 +02:00
Johan Larsson 41f829c43d Markdown reader: allow grid tables to be indented. (#11671)
Like the other table syntaxes (pipe, simple, and multiline tables) and
block-level constructs generally, a grid table may now be indented by up
to three spaces and still be recognized as a table.  Previously the
grid-table parser required the table to begin at the left margin, so an
indented grid table was parsed as a paragraph.

The leading indentation is stripped uniformly from each line before the
table is parsed, so an indented grid table produces the same AST as its
non-indented equivalent.

Adds a command test.
2026-05-28 00:07:29 +02:00
John MacFarlane 1c7cfb2a2a OpenDocument/ODT writer: use predefined styles. (#11672)
Previously the OpenDocument writer emitted a fresh automatic style
(L1..Ln, P1..Pn, T1..Tn) for nearly every list, list-item paragraph,
block quote, preformatted block, and inline text style.  This produced
large ODT files, made `--reference-doc` customization ineffective (the
user's predefined styles were never referenced), and gave each list its
own indentation independent of any containing block quote.

This commit teaches the writer to reference the predefined styles that
LibreOffice ships and that pandoc's reference.odt now exports:

- Bullet lists use `List_20_1`; ordered lists with default start and
  decimal format use `Numbering_20_1`.  Non-default ordered lists
  generate a single named override style (`Pandoc_Numbering_N`)
  memoised by (ListNumberStyle, ListNumberDelim); a non-default start
  value with the default format is expressed via `text:start-value`
  on the `text:list` element instead of a new style.
- List-item paragraphs use `List_20_Bullet[_Tight]` and
  `List_20_Number[_Tight]`.  The Tight variants are pandoc-specific
  (zero top/bottom margin) and are injected into the user's
  reference.odt if missing, just like the Skylighting token styles.
- Block quotes use the predefined `Quotations` paragraph style
  directly.  Nested block quotes use a single automatic style that
  inherits from Quotations and only adds extra margin-left, so a list
  inside a block quote now inherits its container's indent (#2747).
- Preformatted blocks use `Preformatted_20_Text` directly.
- Emphasis, Strong, Strikeout, Subscript, Superscript and Code spans
  use the predefined `Emphasis`, `Strong_20_Emphasis`, `Strikeout`,
  `Subscript`, `Superscript` and `Source_20_Text` text styles.
- `paraStyle`/`paraStyleFromParent` no longer emit a wrapper automatic
  style when its only attribute would be `parent-style-name`; the
  parent name is returned directly.

Closes #9136.
Closes #5086.
Closes #2747.
Closes #3426.
Closes #7336.

Co-authored by: Claude Opus 4.7.
2026-05-27 17:35:39 +02:00
John MacFarlane 9c83002851 Use MathJax v4 in default HTML templates.
See #11669.
2026-05-26 22:44:17 +02:00
John MacFarlane d37f306299 Man reader: better handling of .TP macro.
We parse these as DefinitionList items, but we previously
sometimes stopped prematurely in including material in the
definition.  We should include everything until we hit a new
indentation-changing macro.

Closes #11668.
2026-05-26 12:57:29 +02:00
Sai Asish Y 8922be0530 Docx writer: fix empty keywords in core document properties (#11666)
`stringify` returns the empty string for a MetaString, so each keyword
in the `cp:keywords` list of `docProps/core.xml` was rendered as empty.
Convert each metadata value like `lookupMetaString` does instead.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-05-25 15:16:18 +02:00
John MacFarlane 8886720de5 Fix cabal.project, stack.yaml (specify subdir). 2026-05-25 12:39:55 +02:00
John MacFarlane b741220c89 Use latest dev commonmark-hs. 2026-05-25 12:27:26 +02:00
John MacFarlane 646eeb6614 gridTable: fix calculation of column widths for default columns.
This fixes a bug which produced too-narrow columns in some cases.

Closes #11664.
2026-05-23 18:09:46 +02:00
nibras shami 0640c4c985 EPUB writer: support multiple EPUB versions for raw content (#11628).
This change ensures that raw content marked `epub2` will appear in (only) EPUBv2 output
and content marked `epub3` will appear in (only) EPUBv3 output.
2026-05-17 11:02:34 +02:00
John MacFarlane a263eac360 Typst writer: add zero-width space before a Span label...
...if otherwise the label doesn't come after anything.
(In this case typst will raise an error.)

Closes #11568.
2026-05-15 15:25:14 +02:00
John MacFarlane 05b0f4a4a2 Use latest citeproc. 2026-05-14 15:30:32 +02:00
John MacFarlane 73a48d2670 HTML reader: parse aside as a Div.
(Instead of using raw HTML.)

The "aside" class is added to the Div.
Also, add "header" class to Divs created from headers.

See #11626.
2026-05-14 11:58:19 +02:00
John MacFarlane 7469bd8ad2 MANUAL: improve description of reference links.
See #11643.
2026-05-13 17:29:12 +02:00