/pandoc-amsthm

provide a syntax to use amsthm environments in pandoc, with output in LaTeX and HTML

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

amsthm—provide a syntax to use amsthm environments in pandoc, with output in LaTeX and HTML

Date: January 26, 2022

Documentation Status image1

GitHub Actions Coverage Status image2 Codacy Badge Scrutinizer Status CodeClimate Quality Status

Supported versions Supported implementations PyPI Wheel PyPI Package latest release GitHub Releases Development Status Downloads Commits since latest release License

Conda Recipe Conda Downloads Conda Version Conda Platforms

amsthm provide a syntax to use amsthm environments in pandoc, with output in LaTeX and HTML.

From makefile:

tests/model-target.md: tests/model-source.md
    pandoc -F amsthm $< -o $@
tests/model-latex.tex: tests/model-source.md
    pandoc -F amsthm $< -o $@ --top-level-division=chapter --toc -N
tests/model-latex.pdf: tests/model-source.md
    pandoc -F amsthm $< -o $@ --top-level-division=chapter --toc -N
tests/model-html.html: tests/model-source.md
    pandoc -F amsthm $< -o $@ --toc -N -s

See tests/model-source.md (or next page in documentation site) for an example.

  • Use -N, --number-sections to enable numbering in pandoc. This is mandatory for LaTeX output.
  • To match LaTeX and non-LaTeX output numbering scheme, match these 2 settings manually
    • LaTeX output: pandoc’s cli flag --top-level-division=[section|chapter|part] and the use of parent_counter in pandoc-amsthm
    • non-LaTeX output: counter_depth in pandoc-amsthm

pandoc versioning semantics is MAJOR.MAJOR.MINOR.PATCH and panflute’s is MAJOR.MINOR.PATCH. Below we shows matching versions of pandoc that panflute supports, in descending order. Only major version is shown as long as the minor versions doesn’t matter.

Version Matching [1]
pandoc-amsthm panflute version supported pandoc versions supported pandoc API versions
2.0.0 2.1.3 2.14.0.3–2.17.x 1.22–1.22.1
[1]For pandoc API verion, check https://hackage.haskell.org/package/pandoc for pandoc-types, which is the same thing.