Convert LaTex maths code into presentational MathML. This module is provisional: the API is not settled and may change with any minor Docutils version.
Class | math |
Base class for MathML elements and root of MathML trees. |
Class |
|
Base class for elements treating content as a single inferred mrow. |
Class |
|
Base class for schemata expecting 2 or more children. |
Class |
|
Token Element: contains textual data instead of children. |
Class | menclose |
Undocumented |
Class | mfrac |
Undocumented |
Class | mi |
Undocumented |
Class | mn |
Undocumented |
Class | mo |
Undocumented |
Class | mover |
Undocumented |
Class | mphantom |
Undocumented |
Class | mroot |
Undocumented |
Class | mrow |
Group sub-expressions as a horizontal row. |
Class | mspace |
Undocumented |
Class | msqrt |
Undocumented |
Class | mstyle |
Undocumented |
Class | msub |
Undocumented |
Class | msubsup |
Undocumented |
Class | msup |
Undocumented |
Class | mtable |
Undocumented |
Class | mtd |
Undocumented |
Class | mtext |
Undocumented |
Class | mtr |
Undocumented |
Class | munder |
Undocumented |
Class | munderover |
Undocumented |
Function | align |
Undocumented |
Function | begin |
Undocumented |
Function | end |
Undocumented |
Function | handle |
Process LaTeX command `name` followed by `string`. |
Function | handle |
Append script or limit element to `node`. |
Function | parse |
Append MathML conversion of `string` to `node` and return it. |
Function | tex2mathml |
Return string with MathML code corresponding to `tex_math`. |
Function | tex |
Return leading TeX command name and remainder of `string`. |
Function | tex |
Undocumented |
Function | tex |
Return first TeX group or token and remainder of `string`. |
Function | tex |
Return leading number literal and remainder of `string`. |
Function | tex |
Return optional argument and remainder. |
Function | tex |
Return first simple TeX token and remainder of `string`. |
Function | tex |
Return first TeX group or token and remainder of `string`. |
Variable | accents |
Undocumented |
Variable | anomalous |
Undocumented |
Variable | bigdelimiters |
Undocumented |
Variable | delimiter |
Undocumented |
Variable | fractions |
Undocumented |
Variable | functions |
Undocumented |
Variable | greek |
Undocumented |
Variable | layout |
Undocumented |
Variable | math |
Undocumented |
Variable | mathbb |
Undocumented |
Variable | matrices |
Undocumented |
Variable | movablelimits |
Undocumented |
Variable | operators |
Undocumented |
Variable | over |
Undocumented |
Variable | small |
Undocumented |
Variable | spaces |
Undocumented |
Variable | stretchables |
Undocumented |
Variable | thick |
Undocumented |
Variable | under |
Undocumented |
Process LaTeX command `name` followed by `string`. Append result to `node`. If needed, parse `string` for command argument. Return new current node and remainder of `string`: >>> handle_cmd('hbar', math(), r' rac') (math(mi('ℏ')), ' \frac') >>> handle_cmd('hspace', math(), r'{1ex} (x)') (math(mspace(width='1ex')), ' (x)')
Append MathML conversion of `string` to `node` and return it. >>> parse_latex_math(math(), r'lpha') math(mi('α')) >>> parse_latex_math(mrow(), r'x_{n}') mrow(msub(mi('x'), mi('n')))
Return string with MathML code corresponding to `tex_math`. Set `inline` to False for displayed math.
Return leading TeX command name and remainder of `string`. >>> tex_cmdname('mymacro2') # up to first non-letter ('mymacro', '2') >>> tex_cmdname('name 2') # strip trailing whitespace ('name', '2') >>> tex_cmdname('_2') # single non-letter character ('_', '2')
Return first TeX group or token and remainder of `string`. >>> tex_group('{first group} returned without brackets') ('first group', ' returned without brackets')
Return optional argument and remainder. >>> tex_optarg('[optional argument] returned without brackets') ('optional argument', ' returned without brackets') >>> tex_optarg('{empty string, if there is no optional arg}') ('', '{empty string, if there is no optional arg}')
Return first simple TeX token and remainder of `string`. >>> tex_token('\command{without argument}') ('\command', '{without argument}') >>> tex_token('or first character') ('o', 'r first character')
Return first TeX group or token and remainder of `string`. >>> tex_token_or_group('\command{without argument}') ('\command', '{without argument}') >>> tex_token_or_group('first character') ('f', 'irst character') >>> tex_token_or_group(' also whitespace') (' ', 'also whitespace') >>> tex_token_or_group('{first group} keep rest') ('first group', ' keep rest')