math_spec.typesetting.markdown
GitHub-flavoured Markdown. The format that renders where the docs already live.
Markdown has no math of its own — GitHub delegates to MathJax, which reads
LaTeX — so the math is :class:LatexFormat's and only the document layer
differs. It exists so docs/examples/ does not write its math by hand with
nothing checking it against the model — see test_the_gallery_math_is_current.
MarkdownFormat
#
Bases: LatexFormat
See :class:math_spec.typesetting.format.Format. Math is LaTeX's; prose is not.
cases_row = ' \\cr '
class-attribute
#
dash = '—'
class-attribute
#
operators = {**LatexFormat.operators, 'forall': '\\forall\\thinspace', 'such_that': '\\thinspace:\\thinspace'}
class-attribute
#
suffix = '.md'
class-attribute
#
document(blocks, *, standalone)
#
No preamble: standalone adds the heading a fragment is pasted under.
Source code in src/math_spec/typesetting/markdown.py
equations(lines, *, numbered)
#
One display block per equation, with the name outside the math.
\text{total\_cost} renders its escape literally under MathJax, and
aligned has nothing to line up across one-equation blocks.
numbered is ignored: aligned cannot carry numbers.
Source code in src/math_spec/typesetting/markdown.py
escape(prose)
#
glossary(title, entries)
#
joined(parts, operator)
#
,\enspace as the bare separator: a letter-named macro, so visibly not a Markdown escape.