math_spec.typeset.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.
CASES_ROW = ' \\\\ '
module-attribute
#
LatexFormat
#
See :class:math_spec.typeset.format.Format.
dash = '---'
class-attribute
#
notation = 'latex'
class-attribute
#
operators = {'cdot': '\\cdot', 'plus': '+', 'minus': '-', 'equal': '=', 'le': '\\le', 'ge': '\\ge', 'lt': '<', 'gt': '>', 'ne': '\\neq', 'in': '\\in', 'and': '\\wedge', 'or': '\\vee', 'not': '\\neg', 'true': '\\top', 'false': '\\bot', 'forall': '\\forall\\,', 'such_that': '\\,:\\,', 'infinity': '\\infty', 'minus_infinity': '-\\infty', 'cyclic_minus': '\\ominus', 'cyclic_plus': '\\oplus', 'edge_minus': '\\boxminus', 'edge_plus': '\\boxplus', 'times': '\\times', 'maps_to': '\\to', 'reals': '\\mathbb{R}', 'integers': '\\mathbb{Z}', 'binary_set': '\\{0, 1\\}', 'sos_set': '\\mathrm{SOS}', 'position': '\\mathrm{pos}', 'minimize': '\\min', 'maximize': '\\max'}
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/typeset/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)
#
script(letter)
#
section(title, body)
#
subscript(base, indices)
#
summation(domain, body)
#
superscript(base, tail)
#
cases_block(arms, separator)
#
A cases environment, with separator between the rows.
The separator is a parameter rather than a fixed \\ because Markdown
needs a different one and rewriting this string afterwards would go quiet
the moment the spelling here changed.