Commit Graph
955 Commits
Author SHA1 Message Date
John MacFarlane b27d90f2c0 Make mathml the default math-method. 2026-08-22 10:04:09 -07:00
John MacFarlane 6753f6b360 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-22 10:04:09 -07:00
John MacFarlane 92937d23b3 Give correct instructions for adding zsh completion. 2026-08-20 14:54:30 -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 d354db9b04 Add a note that thanks in typst doesn't currently work.
See #11807.
2026-08-17 09:43:29 -07:00
John MacFarlane 3f7bff5984 Regenerate man pages 2026-08-11 12:41:35 -07:00
gemmaro 225b09dbc7 docs: Correct Asciidoctor name casing. (#11782) 2026-07-29 09:54:16 +02:00
John MacFarlane ee69867122 Update manual date and regenerate man pages. 2026-07-21 23:20:21 +02:00
John MacFarlane bc64721fe5 MANUAL: small clarification in image section.
Explain what "link text" means here. See #11760.
2026-07-14 09:37:04 +02:00
luginfandluginf c645e57dc8 Add Txt2Tags writer (#11699).
`t2t` is now supported as an output format, producing Txt2Tags
markup (<https://txt2tags.org>). The writer covers headers, lists
(bullet, ordered, definition), tables, links, images, code blocks,
inline formatting, and raw txt2tags/HTML passthrough.

[API change]
Adds a new module Text.Pandoc.Writers.Txt2Tags, exporting
`writeTxt2Tags`. Also exported from Text.Pandoc.Writers.

Co-authored-by: luginf <alan@luginf>
2026-07-12 12:50:54 +02:00
John MacFarlane 36f183cda2 MANUAL.txt: Rewrite "A note on security."
Clarify the risks of using pandoc in a web service and explain
how to do so more safely. Note some specific vulnerabilities
with the pdf-engine `wkhtmltopdf`.

This incorporates the suggestions made in #11262 and also
benefits from a report by Kai Aizen.
2026-07-12 12:22:17 +02:00
John MacFarlane bb00041908 Clarify native_numbering extension. Closes #11599. 2026-07-12 11:44:47 +02:00
John MacFarlane e5fab443f6 MANUAL.txt: include Lua filter to set float attribute on tables. 2026-07-10 16:44:29 +02:00
John MacFarlane 3ecd95bf00 LaTeX writer: Provide a way to use table instead of longtable.
When the `float` class is attached to a table, a standard
floating `table` will be generated instead of a `longtable`.
Placement can be specified via the `latex-placement` attribute.
This will help, especially, those who use two-column layouts,
since `longtable` is incompatible with these.

Small change to the default LaTeX template: the `caption`
package is included and a default spacing set between the caption
and the table.

Closes #1023.
2026-07-10 16:38:03 +02:00
John MacFarlaneandClaude 9ebf79dd4b RTF writer: allow fontsize to be specified.
The fontsize is specified in a variable or metadata field
and passed through the renderer via a Reader monad.

Closes #11750.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-08 00:41:30 +02:00
John MacFarlane 8547196b44 Markdown reader: ordered sublists must start with 1
(or equivalent, e.g. 'i').  This brings the markdown
parser in line with commonmark, and avoids a lot of
unintended list starts.  Closes #11735.

Note that ordered lists that are not sublists may
still start with numbers other than 1.
2026-07-01 11:17:21 +02:00
John MacFarlane c7b6552552 MANUAL.txt: clarify expectations for EPUB metadata.
See #11723.
2026-06-23 16:51:46 +02:00
John MacFarlane 22f11b8871 MANUAL.txt: improve instructions for specifying EPUB identifier.
Closes #11723.
2026-06-23 12:27:34 +02:00
John MacFarlane 4f73087589 MANUAL: clarify comment about table types.
See #11719.
2026-06-21 11:57:59 +02:00
Scott Talbert d706da2379 Fix typo in MANUAL.txt (shoud -> should) (#11720)
As reported in Debian by lintian on the manpage.
2026-06-20 23:03:18 +02:00
John MacFarlane da82107116 Change adding of .yaml extension in --defaults option.
Previously it was always added if the specified filename
lacked an extension. Now it is only added if there is
no file with the original name.  So, these are tried in
order: `FILE`, `FILE.yaml`, `DATADIR/defaults/FILE`,
`DATADIR/defaults/FILE.yaml`.

This facilitates using `--defaults` with bash/zsh `<(..)` or
`=(..)`.

Closes #11717.
2026-06-18 23:27:17 +03:00
John MacFarlane 1a1a5efcb2 Fix typo in manual. 2026-06-18 23:05:54 +03:00
John MacFarlaneandClaude 850c7b9613 App: enable auto_identifiers when a table of contents is requested.
Table-of-contents entries link to heading identifiers, so when
`--toc/--table-of-contents` is given, force the `auto_identifiers`
extension on for the input format even when it is off by default
(as it now is for typst).  This makes typst-to-markdown `--toc`
produce working links.

Closes #11041.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 23:40:17 +02:00
John MacFarlaneandClaude ec4fb91049 Typst reader: support auto_identifiers extension.
Headings without an explicit label can now be assigned automatic
identifiers based on the heading text, making them linkable in a
generated table of contents.  The extension is available for the
typst reader but is off by default; enable it with
`-f typst+auto_identifiers`.  The related `gfm_auto_identifiers` and
`ascii_identifiers` extensions are also made available.

Closes #11041.

Text.Pandoc.Readers.Typst.Parsing: PState gains sOptions,
sIdentifiers, and sLogMessages fields, and now has
HasReaderOptions, HasIdentifierList, and HasLogMessages
instances, allowing reuse of the shared registerHeader. (Not an
API change.)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 23:38:51 +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
積丹尼 Dan Jacobson 05b14ffe79 Update instructions for modifying reference.docx (#11600)
Mention LibreOffice as an alternative.
2026-06-01 08:54:41 +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
John MacFarlane 7469bd8ad2 MANUAL: improve description of reference links.
See #11643.
2026-05-13 17:29:12 +02:00
積丹尼 Dan Jacobson a67492e1e0 Fix typo in MANUAL.txt regarding author variable (#11619) 2026-05-06 18:29:06 +02:00
John MacFarlane a206e83e82 MANUAL: move --sandbox to general options. 2026-04-18 13:19:44 +02:00
John MacFarlane aa571d2c41 Add --typst-input CLI option.
This allows one to pass parameters to typst, which are available
at `sys.inputs`, just as `typst` itself does with its `--input`
option.

[API changes]

* ReaderOptions has a new field `readerTypstInputs`.
* Opt has a new field `optTypstInputs`.

Closes #11588.
2026-04-18 13:05:35 +02:00
John MacFarlane 40e05e47a9 Make groff the default pdf-engine for ms output.
Closes #11558.
2026-04-05 20:22:13 +02:00
John MacFarlane 1a8d44b0c3 MANUAL: Reword restrictions on YAML metadata in commonmark.
See #11561.
2026-04-01 22:24:40 -04:00
John MacFarlane 54453a311c MANUAL.txt: Clarify indentation rules for definition lists.
See #11542.
2026-03-21 16:49:34 +01:00
John MacFarlane f1e061478d Bump to 3.9.0.2, update changelog and man pages. 2026-03-19 09:40:27 +01:00
John MacFarlane dcdd2af224 Bump lower bounds for asciidot, djot, texmath, typst. 2026-03-17 16:17:24 +01:00
John MacFarlane 0784049b40 MANUAL.txt: Note that JSON may be used in YAML metadata blocks.
JSON is a subset of YAML. See #11525.
2026-03-17 09:04:44 +01:00
Peter Briggs 87e00ed944 Fix outdated OPML spec URL in MANUAL.txt (#11504) 2026-03-08 09:52:20 +01:00
massifrg 15ddf4124c ICML writer support for image object styles (#11498)
This change allows users to style images in InDesign bysetting the
`object-style` attribute in a pandoc Image, which is mapped to the
AppliedObjectStyle attribute in the Rectangle element around
an Image element in the resulting ICML.
2026-03-03 22:31:55 +01:00
Pascal Wagler 72b62843c1 EPUB 3 update allowed values for metadata identifier.scheme (#11485)
- Update allowed values for metadata `identifier.scheme` from ONIX codelist  issue 72.
- Change some `identifier.schema` allowed values to better align with ONIX codelist.
- Update manual.

Closes #11481.
2026-02-25 22:03:33 +01:00
Sidney Mau ddf25d83ca Beamer template: add logooption variable (#11456).
Closes #11452.
2026-02-12 08:51:43 +01:00
John MacFarlane 77d371c38c Update link for ICML in manual.
See #11425.
2026-02-11 11:37:28 +01:00
John MacFarlane 9a32653165 Update manual date. 2026-02-02 17:24:50 +01:00
John MacFarlane 818c840e10 Allow defaults files to be either JSON or YAML. 2026-01-31 10:32:51 +01:00
John MacFarlane 828382ba65 Revise change to --extract-media.
An earlier change added the feature that if the specified file
ends in .tar, a tar archive is created instead of a directory.
This has now been changed to create a zip archive if the filename
ends in .zip.
2026-01-30 19:43:32 +01:00
John MacFarlane 0e779d93fd MANUAL.txt: Fix defaults.yaml example for wrap. 2026-01-30 14:11:28 +01:00
John MacFarlane 60cf41f393 Remove statement in manual that alerts only work with gfm/commonmark. 2026-01-27 12:46:58 +01:00
John MacFarlane 675e0c4506 MANUAL.txt: Small rewrite of syntax-highlighting info. 2026-01-25 13:53:42 +00:00