Commit Graph

19213 Commits

Author SHA1 Message Date
Hendrik Erz fa0dfdf0e1 Markdown reader: case-insensitive alert keywords (#11836)
The keywords (e.g. `TIP`) for GFM-style alerts need not be all caps.
This commit fixes that. It also adds the class `alert` to the produced
Divs to allow for namespacing.

This commit changes the emitted classes from the alert extension
of the basic Markdown reader to add the class `alert` to the
produced DIVs to allow for namespacing.
2026-08-29 17:25:41 -07:00
John MacFarlane b913622e1f circleci release build for wasm: top-level directory in zip. pandoc-lua-engine-0.5.4 pandoc-cli-3.11 pandoc-server-0.1.4 3.11 2026-08-28 17:30:55 -07:00
John MacFarlane dfd654cf36 release candidate action: create proper .tar.gz for macos.
Previously this happened automatically, but now we get a zip
file with no containing directory?
2026-08-28 15:10:48 -07:00
John MacFarlane 916c2216ff Minor changelog revision. 2026-08-28 11:04:16 -07:00
John MacFarlane 5eb26dfe21 Spacing issues in changelog. 2026-08-28 10:56:56 -07:00
John MacFarlane eb2258fb88 Update AUTHORS.md. 2026-08-28 10:11:37 -07:00
John MacFarlane ec2007e844 Update all-cabal-hashes in flake.lock. 2026-08-28 10:09:39 -07:00
John MacFarlane e56c76fa02 Minor changelog edits 2026-08-28 09:43:57 -07:00
John MacFarlane 6708521943 Rename some command tests. 2026-08-28 09:30:20 -07:00
John MacFarlane 4bfd873b79 Whitespace fix. 2026-08-28 09:20:36 -07:00
John MacFarlane d2a0588448 Edit math-method clause in pandoc-server man. 2026-08-28 09:15:29 -07:00
John MacFarlane 5317e01f8c Bump pandoc-cli to 3.11, use pandoc 3.11 2026-08-28 09:13:52 -07:00
John MacFarlane 630b3a45f0 Bump pandoc-server to 0.5.4, use pandoc 3.11 2026-08-28 09:13:32 -07:00
John MacFarlane 9c663d6d6c pandoc-lua-engine: bump to 0.5.4, use pandoc 3.11.x. 2026-08-28 09:12:23 -07:00
John MacFarlane 008e8dc706 Update man page and date 2026-08-28 09:10:25 -07:00
John MacFarlane cd0499cb73 Bump to 3.11, update changelog. 2026-08-28 08:54:31 -07:00
John MacFarlane 99d1ab880d Use typst 0.11.0.1. 2026-08-27 22:47:57 -07:00
John MacFarlane db702a01e2 use released texmath 0.13.2.2 2026-08-27 22:44:38 -07:00
John MacFarlane 2440f2fe99 Use asciidoc 0.1.0.5 2026-08-27 22:38:09 -07:00
John MacFarlane 06ff6df11d Use djot 0.1.4.2. 2026-08-27 22:34:10 -07:00
John MacFarlane 9dfad4005d MediaWiki writer: put nowiki around possible URLs.
Otherwise they get linkified automatically.
Closes #11834.
2026-08-27 19:55:16 -07:00
John MacFarlane 6f2dcd886c Fix compiler warnings. 2026-08-27 15:41:55 -07:00
John MacFarlane 2f103b3c76 Docx reader: handle case where non-header rows come before header rows.
In this case we'll treat them all as the header in order to
preserve the order.

Added test case for #11833.
2026-08-27 14:51:13 -07:00
John MacFarlane 75982322cf Docx reader: improve handling of tables with uneven rows.
Previously if a table started with a 1-column row, only 1 column
would be included, even if other rows had more  columns.

Closes #11833.
2026-08-27 14:39:26 -07:00
John MacFarlane c96d3a63bd Use dev texmath. 2026-08-27 13:42:09 -07:00
John MacFarlane 1b50a4672b Text.Pandoc.Templates: Fix bug in getTemplate.
When calling `fetchItem` in `getTemplate`, we temporarily
reset the `stSourceURL` in CommonState so that the template
is sought locally. Previously, an exception in `fetchItem`
would prevent `stSourceURL` from being set back to its original
value. This could result in a local file being fetched instead
of a remote one. Note that an exception is triggered when one
uses e.g. `--template default.html5`; in that case `getTemplate`
handles the exception by looking for the file in the user
data directory.

This patch fixes the bug so that the `stSourceURL` is reset
regardless of whether `fetchItem` raises an exception.

Thanks to Yingjie Su for identifying the problem.
2026-08-26 20:26:23 -07:00
John MacFarlane 9260d17d21 Make mathml the default math-method.
Closes #11751.
2026-08-26 09:51:03 -07:00
John MacFarlane c73a35a2e7 Add --math-method option.
This replaces (now deprecated but still functional) options
`--mathml`, `--mathjax`, `--gladtex`, `--katex`, `--webtex`.

The `plain` style can now be specified explicitly.

In defaults files, `html-math-method` is now
`math-method` (though `html-math-method` will still work).

Text.Pandoc.App.Opt:

- In unexported type CompletionKind, add MathMethods.
- In Opt, change `optHTMLMathMethod` to `optMathMethod`. [API  change]

Text.Pandoc.Options:

- Rename HTMLMathMethod type to MathMethod. [API change]
- Rename `writerHTMLMathMethod` field of WriterOptions to
  `writerMathMethod`. [API change]

Text.Pandoc.App.Completion:

- Clean up code.
- Add support for `--math-method`.
2026-08-26 09:46:48 -07:00
John MacFarlane 7b866613f6 ODT/OpenDocument writers: support RTL text direction.
RTL is now properly handled in these cases:

- `dir: rtl` (or `ltr`) in document metadata
- an RTL `lang` in metadata (e.g. `he`, `ar`), unless overridden
  by `dir`
- a `dir` attribute on a Div

The OpenDocument writer tracks the active writing mode and, when it
is RTL, emits automatic paragraph styles with
`style:writing-mode="rl-tb"` derived from the usual named styles
(deduplicated per parent style).  `fo:text-align` is also used
to get the matching text alignment.

Code blocks remain ltr regardless.

Closes #11301.

With some help from Claude Fable.
2026-08-26 08:49:07 -07:00
John MacFarlane da54424b3c Fix some syntax highlighting regressions.
In 3.8, we added DefaultHighlighting as a HighlightStyle.
However, not all writers were updated to match on it, with
the result that we have lost highlighting in Ms, ConTeXt,
ODT, and OpenDocument.

(This was compounded by a bug in the change that was made
to the ConTeXt writer at the time.)

This commit fixes these things.

Closes #11829.

Co-authored by Claude Fable 5.
2026-08-26 02:58:14 +00:00
John MacFarlane 5727e10827 Markdown reader: Add a syntax for resetting example list counter.
This is needed often at the beginning of a chapter.

Closes #10940.
2026-08-24 12:07:19 -07:00
John MacFarlane 14b0ec95c8 Use dev version of typst. 2026-08-22 18:49:53 -07:00
Wrong-Code 1c81441a7a Fix upgrade detection for per-machine installations (#11827)
* Add FindRelatedProducts action to Install buttons

* Disabled the preliminary FindRelatedProducts until the install mode is set

Previously, registry records of previous versions were not being removed.
Closes #11825.
2026-08-22 18:37:17 -07:00
John MacFarlane 673814c32a ODT writer: use style:language-complex for RTL languages...
rather than fo:language.

See #11301.
2026-08-22 18:32:57 -07:00
John MacFarlane 0a9a2f2615 Avoid a deprecation warning relating to QuickCheck. 2026-08-22 11:00:45 -07:00
John MacFarlane 65e6d995f9 Docx writer: initialize envLang from lang metadata.
This ensures that setting `lang` will affect the whole document.
Previously, setting `lang` to `he` was not sufficient to make
the document RTL.

See #11301.
2026-08-22 10:26:07 -07:00
John MacFarlane 965e9e7d0d Revert "Use withNumTests and require QuickCheck >= 2.18."
This reverts commit b38743d218.
2026-08-22 09:50:06 -07:00
John MacFarlane b38743d218 Use withNumTests and require QuickCheck >= 2.18. 2026-08-21 23:27:19 -07:00
John MacFarlane 92937d23b3 Give correct instructions for adding zsh completion. 2026-08-20 14:54:30 -07:00
John MacFarlane 7601bcd6b4 Regularize punctuation in deprecatedOption warnings. 2026-08-20 14:04:53 -07:00
wzy 0ce83fb133 Add --completion={bash,zsh,fish} (#11818)
Make `--bash-completion` an alias of `--completion=bash`.

Reorganize option parsing code using a new data structure OptionSpec,
which can encode the type of completion needed by each option.

Add new unexported module Text.Pandoc.Completion.

Unexported module Text.Pandoc.CommandLineOptions: export OptionSpec.

Closes #8542.
2026-08-20 13:46:25 -07:00
John MacFarlane 3105b38470 Note that sourcepos extension works for djot too. 2026-08-20 13:39:57 -07:00
John MacFarlane 0507289fce beamer template: remove spurious extra tableofcontents.
It was outside the frame, and LaTeX seemed not to trip on it,
but it's a mistake. Closes #11819.
2026-08-18 13:49:49 -07:00
Alex 6658e94511 RTF Reader: nested table support (#11790)
Closes #11218.
2026-08-18 10:24:49 -07:00
John MacFarlane 5f37c6781b Typst reader: 'block' should also be block-level.
See 185c29b4b2 which claims that
`block` can occur in inline contexts. I can no longer confirm
this and suspect that it may have been an unintended behavior
of earlier versions of typst, now fixed.

Closes #11814.
2026-08-17 10:01:58 -07:00
John MacFarlane d354db9b04 Add a note that thanks in typst doesn't currently work.
See #11807.
2026-08-17 09:43:29 -07:00
John MacFarlane dd970030ba HTML reader: handle pre without code.
We preserve whitespace as nonbreaking spaces.

Closes #11810.
2026-08-17 09:27:38 -07:00
John MacFarlane cd77c632a8 Use dev asciidoc-hs. 2026-08-16 21:49:04 -07:00
John MacFarlane 8139d6bc1c Use dev version of djoths. 2026-08-16 16:25:00 -07:00
John MacFarlane 6107a26945 JATS writer: fix illegal use of p inside p.
Closes #11809.
2026-08-16 10:44:18 -07:00