Changelog
v3.1.1
- The filter stops with a clear error on pandoc older than 3.1.1.
_extension.ymldeclares, for packagers, the pandoc versions the filter supports (pandoc-required) and the command that tests it (pandoc-test). Quarto ignores both keys.
v3.1.0
Other output now follows what amsthm does in LaTeX more closely. The design notes describe the approach, and pixi run bake compares the two renderings.
- Cross-references link to the environment in HTML and other non-LaTeX output. As hyperref does for
\ref, only the number is a link (#21). @Euler, with the first letter of the identifier capitalised, puts the environment’s name before the number: “Theorem 1”, writtenTheorem~\ref{euler}in LaTeX.[@Euler]gives “(Theorem 1)” (#22).- Theorem numbers count sections as LaTeX does: without
-Nthey are 0.1, 0.2, … with a warning; headings deeper thansecnumdepthdo not count; with--top-level-division=part, parts neither appear in nor restart a chapter’s number, and are Roman numerals when theorems are numbered within them. - In italic text, such as the body of a plain theorem or the note of a proof, a reference from
@idor\refis italic, and one from[@id]or\eqrefupright, as in LaTeX. - The end-of-proof symbol is
$\quad\Box$, amsthm’s\quad\openbox, which renders in every format and stays on the line of the text before it; the Unicode ◻ was missing from LaTeX’s default fonts. - More of amsthm, in LaTeX and in other output alike:
styles, your own styles, as\newtheoremstyle: heading and body fonts, punctuation, and the space after the heading;parent_counterper environment,{Theorem: section, Remark: chapter}, as\newtheoremtakes a parent each;swapnumbers, as\swapnumbers;qed_symbol, to set\qedsymbol;\qedhere, to put the symbol at the end of a display or list.
[@a; @b]refers to several environments:\eqref{a}, \eqref{b}in LaTeX, “(1), (2)” elsewhere. With a prefix or locator it is left to citeproc.name_to_text: {proof: ...}renames the proof, setting\proofnamein LaTeX.- A reference to an unnumbered environment gets a warning.
- LaTeX: a theorem note holding math, raw TeX, an image or a citation with a locator, such as
info="on $[0,1]$", no longer ends at its first]. - Markdown output: emphasis inside a plain theorem no longer leaves a stray
**. - An empty
amsthm:key no longer stops the filter with an error. - Documentation: examples, one short document per topic, each with its Markdown, its LaTeX and a PDF typeset by amsthm.
- README: a list of known limitations.
v3.0.0
Rewritten as a Pandoc Lua filter. The input syntax is unchanged.
- Breaking: run it with
pandoc -L amsthm.luainstead ofpandoc -F amsthm. Getamsthm.luafrom the GitHub releases; theamsthmPython package is deprecated. - Breaking: requires Pandoc 3.1.1 or later.
- Breaking: LaTeX output loads
amsthmitself and puts the environment definitions inheader-includesrather than at the start of the body, so it needs a standalone document (-s). - Breaking:
counter_depthdefaults to followparent_counterand--top-level-division, so LaTeX and other output number alike. Setcounter_depth: 0for the old default. - Breaking: in HTML and other non-LaTeX output, environments get the classes
amsthmandamsthm-<style>, the heading is wrapped in anamsthm-titlespan, and the end-of-proof symbol is anamsthm-qedspan, styled by CSS that the filter adds to HTML output. - Works as a Quarto extension:
quarto add ickc/pandoc-amsthm. Under Quarto the filter runs before Quarto’s own theorem processing and drops theproof,remarkandsolutionclasses it has handled, so Quarto does not add a second heading. - New
cssoption:falseleaves out the stylesheet added to HTML. - LaTeX output no longer defines each theorem label twice.
- Fixed, compared with v2: in LaTeX output, theorem bodies stay in the document instead of being rendered on their own, so citations (
--natbib,--biblatex, citeproc), writer options and later filters apply inside them. Nested environments are numbered in document order and keep their own style in other output. Headings marked.unnumberedno longer step the theorem numbers, which also follow--number-offset. A single value such asplain: Main Theoremis read as one environment rather than one per character, and an unsupportedparent_counteris dropped rather than passed to LaTeX. Plain-style theorems with long paragraphs are no longer slow. - Documentation moved to https://ickc.github.io/pandoc-amsthm.
v2.1.0
- Requires panflute 2.3.x, supporting pandoc 2.14.0.3–3.11.
- Requires Python 3.10 or later.
- Packaging: built with uv, developed with pixi, released to PyPI via trusted publishing with attestations.
v2.0.0
Python implementation built on panflute.
v1.2.3
First release, as a proof of concept.