math_spec.typesetting.latex
LaTeX (amsmath). The format that lands in a journal.
Verbose source and a toolchain to compile it, in exchange for being the one target a paper actually accepts. CI compiles every example with a two-package TeX, which is also a check that the preamble stays installable from a small one.
LatexFormat
#
See :class:math_spec.typesetting.format.Format.
cases_row = ' \\\\ '
class-attribute
#
dash = '---'
class-attribute
#
notation = 'latex'
class-attribute
#
operators = {name: latex for name, (latex, _) in OPERATOR_SPELLINGS.items()}
class-attribute
#
suffix = '.tex'
class-attribute
#
apply(function, argument)
#
cardinality(inner)
#
cases(arms)
#
document(blocks, *, standalone)
#
equations(lines, *, numbered)
#
Source code in src/math_spec/typesetting/latex.py
escape(prose)
#
fraction(numerator, denominator)
#
glossary(title, entries)
#
greek(name)
#
italic(name)
#
joined(parts, operator)
#
math(expression)
#
mono(text)
#
note(text)
#
parenthesise(inner)
#
prose(text)
#
quoted(label)
#
The quotes in text mode, the label itself upright in math mode.
Not one \text{'label'}: MathJax renders \_ inside \text
as a literal backslash, and this format is what to_markdown inherits
— in math mode the escape works everywhere, which is how every name
already prints.