Prepare for first upload

This commit is contained in:
Marcel Fabian Krüger 2024-08-14 20:10:21 +02:00
parent 1a19e3947a
commit bae4f782bb
15 changed files with 986 additions and 994 deletions

View File

@ -1,16 +1,14 @@
# Automated LuaLaTeX math to MathML conversion
**Highly experimental! At this point all interfaces may change without prior warning and many features aren't implemented yet. It is not ready for anything beyond simple experiments.**
# LuaMML: Automated LuaLaTeX math to MathML conversion
This is an attempt to implement automatic conversion of LuaLaTeX inline and display math expressions into MathML code to aid with tagging.
It works best with `unicode-math`, but it can also be used with traditional math fonts if mappings to Unicode are provided.
## Installation
Run `l3build install` to install `luamml` into your local `texmf` tree.
## Demo
Run `lualatex test_tex` to see all equations from [our example file](./test_tex.tex) converted into MathML.
## Usage
Add `\usepackage[tracing]{luamml-demo}` to print MathML to the terminal or `\usepackage[files]{luamml-demo}` to generate separate files with MathML output.
Alternatively it can be used with latex-lab to automatically integrate with tagging infrastucture.
To test it on your own files, add `\usepackage[tracing]{luamml-demo}` (to print MathML to the terminal) or `\usepackage[files]{luamml-demo}` to generate separate files with MathML output.
Also see a [`tagpdf` experiment using this to tag PDF formulas](https://github.com/u-fischer/tagpdf/blob/develop/experiments/exp-mathml-lua.tex).
<!-- Also see a [`tagpdf` experiment using this to tag PDF formulas](https://github.com/u-fischer/tagpdf/blob/develop/experiments/exp-mathml-lua.tex). -->
If you are very brave you can also try running `pdflatex test_pdf` and afterwards run `./pdfmml.lua test_pdf.lua` to get pdflatex formulas converted.
<!-- If you are very brave you can also try running `pdflatex test_pdf` and afterwards run `./pdfmml.lua test_pdf.lua` to get pdflatex formulas converted. -->

View File

@ -3,6 +3,8 @@ module = "luamml"
tdsroot = "lualatex"
installfiles = { "luamml-*.lua", "*.sty" }
sourcefiles = { "luamml-*.lua", "*.sty", "*.dtx" }
typesetsuppfiles = { "*.tex" }
typesetsourcefiles = { "*.tex" }
stdengine = "luatex"
unpackfiles = { "*.dtx" }
typesetexe = "lualatex"

View File

@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesExplPackage{luamml-demo}{2021-06-16}{v0.0.1}{Reasonable default definitions for luamml}
\ProvidesExplPackage{luamml-demo}{2024-08-14}{v0.1.0}{Reasonable default definitions for luamml}
\sys_if_engine_luatex:F {
\msg_new:nnn {luamml-demo} {pdftex-option-ignored} {Option~`#1'~is~being~ignored~in~pdfTeX~mode.}

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-amsmath} {2021-04-23} {0.0.1-alpha}
\ProvidesExplPackage {luamml-patches-amsmath} {2024-08-14} {0.1.0}
{Feel free to add a description here}
\lua_now:n { require'luamml-amsmath' }

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-amstext} {2021-04-23} {0.0.1-alpha}
\ProvidesExplPackage {luamml-patches-amstext} {2024-08-14} {0.1.0}
{Feel free to add a description here}
\int_new:N \g__luamml_amsmath_text_struct_int

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-array} {2021-04-23} {0.0.1-alpha}
\ProvidesExplPackage {luamml-patches-array} {2024-08-14} {0.1.0}
{Feel free to add a description here}
\lua_now:n { require'luamml-array' }

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-kernel} {2021-05-30} {0.0.1-alpha}
\ProvidesExplPackage {luamml-patches-kernel} {2024-08-14} {0.1.0}
{Feel free to add a description here}
\cs_new:Npn \__luamml_kernel_phantom:nnn #1#2#3 {

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-lab-math} {2021-05-30} {0.0.1-alpha}
\ProvidesExplPackage {luamml-patches-lab-math} {2024-08-14} {0.1.0}
{Feel free to add a description here}
\AddToHook{begindocument} {

View File

@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesExplPackage{luamml-pdf-demo}{2021-06-16}{v0.0.1}{Reasonable default definitions for luamml-pdf}
\ProvidesExplPackage{luamml-pdf-demo}{2024-08-14}{v0.1.0}{Reasonable default definitions for luamml-pdf}
\RequirePackage{luamml-pdf}% Loading luamml-pdf is pretty much the point
% \RequirePackage{amsmath,array}% May come back if the patches get ported

View File

@ -1,6 +1,6 @@
% \iffalse meta-comment
%
%% Copyright (C) 2020-2021 by Marcel Krueger
%% Copyright (C) 2020-2024 by Marcel Krueger
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@ -35,6 +35,7 @@
\documentclass{l3doc}
\usepackage{luamml}
\usepackage{csquotes,luacolor}
\MakeShortVerb{\|}
\RecordChanges
\begin{document}
\tracingmathml2
@ -48,13 +49,60 @@
%</gobble>
% \fi
%
% \title{The \pkg{luamml} package}
%
% \GetFileInfo{luamml.dtx}
% \title{The \pkg{luamml} package%
% \thanks{This doument corresponds to \pkg{luamml}~\fileversion, dated~\filedate.}%
% }
% \author{Marcel Krüger}
%
% \maketitle
%
% \begin{documentation}
% \section{Use case}
% When generating output for the web or tagged output, mathematical content should often be represented as MathML.
% This uses Lua\TeX~callbacks to automatically attempt to convert Lua\TeX~math mode output into MathML.
%
% \section{Usage}
% The \pkg{luamml} package is designed to be used in automated ways by other packages and usually should not be invoked directly by the end user.
% For experiments, \texttt{luamml-demo} is included which provides easier to use interfaces.
%
% Add in your preamble
% \begin{verbatim}
% \usepackage[files]{luamml-demo}
% \end{verbatim}
% This will trigger the output of individual files for each block of math output containing corresponding MathML.
%
% Alternatively
% \begin{verbatim}
% \usepackage[l3build]{luamml-demo}
% \end{verbatim}
% will generate a single file witha concatenation of all MathML blocks.
%
% For automated use, the \pkg{luamml} package can be included directly, followed by enclosing blocks which should generate files with \cmd{luamml_begin_single_file:} and \cmd{luamml_end_single_file:}.
% The filename can be set with \cmd{luamml_set_filename:n}.
%
% \section{Improving MathML conversion}
% When using constructs which do not automatically get converted in acceptable form, conversion hints can be provided with \cmd{luamml_annotate:en}.
% This allows to provide a replacement MathML structure in Lua table form, for example
% \begin{verbatim}
% \luamml_annotate:en {
% nucleus = true,
% core = {[0] = 'mi', 'TeX'},
% }{
% \hbox{\TeX}
% }
% \end{verbatim}
% produces a |<mi>TeX</mi>| element in the output instead of trying to import \TeX~as a mathematical expression.
% The table structure is explaned in an appendix.
%
% \section{Features \& Limitiations}
% Currently all mathematical expressions which purely contain Unicode encoded math mode material without embedded non-math should get converted successfully.
% Usage with non-Unicode math (\TeX's 8-bit math fonts) is highly experimental and undocumented.
% Any attempt to build complicated structures by embedding arbitrary \TeX\ code in the middle of math mode needs to have a MathML replacement specified.
% We try to automate more cases in the future.
%
% \appendix
% \input{luamml-algorithm}
% \end{documentation}
%
% \begin{implementation}
@ -66,11 +114,11 @@
% \begin{macrocode}
%<@@=luamml>
%<*luatex>
\ProvidesExplPackage {luamml} {2021-04-23} {0.0.1-alpha}
\ProvidesExplPackage {luamml} {2024-08-14} {0.1.0}
{Automatically generate presentational MathML from LuaTeX math expressions}
%</luatex>
%<*pdftex>
\ProvidesExplPackage {luamml-pdf} {2021-05-31} {0.0.1-alpha}
\ProvidesExplPackage {luamml-pdf} {2024-08-14} {0.1.0}
{MathML generation for L̶u̶a̶pdfLaTeX}
%</pdftex>
% \end{macrocode}

View File

@ -1,10 +1,7 @@
\documentclass{article}
\begin{document}
\title{From math lists to MathML}
\subtitle{The algorithm in luamml}
\author{Marcel}
\maketitle
\section{General concepts}
\newcommand\Luamml{\pkg{Luamml}}
\newcommand\luamml{\pkg{luamml}}
\newcommand\xmltag[1]{\texttt{<#1>}}
\section{\Luamml's representation of XML and MathML}
In the following I assume basic familiarity with both Lua\TeX's representation of math noads and MathML.
\subsection{Representation of XML elements}
@ -35,32 +32,32 @@ MathML knows the concept of \enquote{embellished operators}:
\begin{blockquote}
The precise definition of an \enquote{embellished operator} is:
\begin{itemize}
\item an \tag{mo} element;
\item or one of the elements \tag{msub}, \tag{msup}, \tag{msubsup}, \tag{munder}, \tag{mover}, \tag{munderover}, \tag{mmultiscripts}, \tag{mfrac}, or \tag{semantics} (§ 5.1 Annotation Framework), whose first argument exists and is an embellished operator;
\item or one of the elements \tag{mstyle}, \tag{mphantom}, or \tag{mpadded}, such that an mrow containing the same arguments would be an embellished operator;
\item or an \tag{maction} element whose selected sub-expression exists and is an embellished operator;
\item or an \tag{mrow} whose arguments consist (in any order) of one embellished operator and zero or more space-like elements.
\item an \xmltag{mo} element;
\item or one of the elements \xmltag{msub}, \xmltag{msup}, \xmltag{msubsup}, \xmltag{munder}, \xmltag{mover}, \xmltag{munderover}, \xmltag{mmultiscripts}, \xmltag{mfrac}, or \xmltag{semantics} (§ 5.1 Annotation Framework), whose first argument exists and is an embellished operator;
\item or one of the elements \xmltag{mstyle}, \xmltag{mphantom}, or \xmltag{mpadded}, such that an mrow containing the same arguments would be an embellished operator;
\item or an \xmltag{maction} element whose selected sub-expression exists and is an embellished operator;
\item or an \xmltag{mrow} whose arguments consist (in any order) of one embellished operator and zero or more space-like elements.
\end{itemize}
\end{blockquote}
For every embellished operator, MathML calls the \tag{mo} element defining the embellished operator the \enquote{core} of the embellished operator.
For every embellished operator, MathML calls the \xmltag{mo} element defining the embellished operator the \enquote{core} of the embellished operator.
\Luamml\ makes this slightly more general: Every expression is represented by a pair of two elements: The expression and it's core.
The core is always a \tag{mo}, \tag{mi}, or \tag{mn}, \texttt{nil} or s special marker for space like elements.
The core is always a \xmltag{mo}, \xmltag{mi}, or \xmltag{mn}, \texttt{nil} or s special marker for space like elements.
If and only if the element is a embellished operator the core is a \tag{mo} element representing the core of the embellished operator.
The core is a \tag{mi} or a \tag{mn} element if and only if the element would be an embellished operator with this core if this element where a \tag{mo} element.
If and only if the element is a embellished operator the core is a \xmltag{mo} element representing the core of the embellished operator.
The core is a \xmltag{mi} or a \xmltag{mn} element if and only if the element would be an embellished operator with this core if this element where a \xmltag{mo} element.
The core is the special space like marker for space like elements. Otherwise the core is \texttt{nil}.
\section{Translation of math noads}
\subsection{Translation of math noads}
A math lists can contain the following node types: noad, fence, fraction, radical, accent, style, choice, ins, mark, adjust, boundary, whatsit, penalty, disc, glue, and kern. The \enquote{noads}
\subsection{Translation of kernel noads}
\subsubsection{Translation of kernel noads}
The math noads of this list contain nested kernel noads. So in the first step, we look into how kernel nodes are translated to math nodes.
\subsubsection{\texttt{math_char} kernel noads}
\paragraph{\texttt{math_char} kernel noads}
First the family and character value in the \texttt{math_char} are used to lookup the Unicode character value of this \texttt{math_char}.
(For \textt{unicode-math}, this is usually just the character value. Legacy maths has to be remapped based on the family.)
Then there are two cases: The digits \texttt{0} to \texttt{9} are mapped to \tag{mn} elements, everything else becomes a \tag{mi} element with \texttt{mathvariant} set to \texttt{normal}.
(For \texttt{unicode-math}, this is usually just the character value. Legacy maths has to be remapped based on the family.)
Then there are two cases: The digits \texttt{0} to \texttt{9} are mapped to \xmltag{mn} elements, everything else becomes a \xmltag{mi} element with \texttt{mathvariant} set to \texttt{normal}.
(The \texttt{mathvariant} value might get suppressed if the character defaults to mathvariant \texttt{normal}.)
In either case, the \texttt{tex:family} attribute is set to the family number if it's not \texttt{0}.
@ -73,13 +70,13 @@ The core is always set to the expression itself. E.g.\ the \texttt{math_char} ke
}
\end{verbatim}
\subsection{\texttt{sub_box} kernel noads}
\subsubsection{\texttt{sub_box} kernel noads}
I am open to suggestions how to convert them properly.
\subsection{\texttt{sub_mlist} kernel noads}
The inner list is converted as a \tag{mrow} element, with the core being the core of the \tag{mrow} element. See the rules for this later.
\subsubsection{\texttt{sub_mlist} kernel noads}
The inner list is converted as a \xmltag{mrow} element, with the core being the core of the \xmltag{mrow} element. See the rules for this later.
\subsection{\texttt{delim} kernel noads}
\subsubsection{\texttt{delim} kernel noads}
If the \texttt{small_char} is zero, these get converted as space like elements of the form
\begin{verbatim}
{[0] = 'mspace',
@ -89,15 +86,13 @@ If the \texttt{small_char} is zero, these get converted as space like elements o
where 1.196 is replaced by the current value of \verb+\nulldelimiterspace+ converted to \texttt{bp}.
Otherwise the same rules as for \texttt{math_char} apply,
except that instead of \texttt{mi} or \tag{mn} elements,
except that instead of \texttt{mi} or \xmltag{mn} elements,
\texttt{mo} elements are generated,
\texttt{mathvariant} is never set,
\texttt{stretchy} is set to \texttt{true} if the operator is not on the list of default stretchy operators in the MathML specification
nd \texttt{lspace} and \texttt{rspace} attributes are set to zero.
\subsection{\texttt{acc} kernel noads}
\subsubsection{\texttt{acc} kernel noads}
Depending on the surrounding element containing the \texttt{acc} kernel noad, it is either stretchy or not.
If it's stretchy, the same rules as for \texttt{delim} apply, except that \texttt{lspace} and \texttt{rspace} are not set.
Otherwise the \textt{stretchy} attribute is set to false if the operator is on the list of default stretchy operators.
\end{document}
Otherwise the \texttt{stretchy} attribute is set to false if the operator is on the list of default stretchy operators.

View File

@ -1,10 +1,10 @@
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mi tex:family="1">𝑎</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mi tex:family="1">𝑏</mi>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑎</mi>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑏</mi>
</math>
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow tex:class="inner">
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mo fence="true" lspace="0" rspace="0" symmetric="true">(</mo>
<mspace width="-4.981pt" />
<mpadded lspace="+4.981pt" width="+9.963pt">
@ -47,9 +47,9 @@
<mspace width="-4.981pt" />
<mo fence="true" lspace="0" rspace="0" symmetric="true">)</mo>
</mrow>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mrow tex:class="inner">
<mo fence="true" lspace="0" rspace="0" symmetric="true" tex:family="2">{</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mrow>
<mo fence="true" lspace="0" rspace="0" symmetric="true">{</mo>
<mpadded lspace="+4.981pt" width="+9.963pt">
<mtable>
<mtr>
@ -58,10 +58,10 @@
</mtd>
<mtd columnalign="left">
<mtext>if&#160;
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mi tex:family="1">𝑎</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mi tex:family="1">𝑏</mi>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑎</mi>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑏</mi>
</math></mtext>
</mtd>
</mtr>
@ -78,76 +78,68 @@
<mspace width="1.196pt" />
</mrow>
</math>
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mi tex:family="1">𝑥</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑥</mi>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mfrac>
<mrow>
<mo lspace="0" rspace="0.222em" tex:class="bin" tex:family="2"></mo>
<mi tex:family="1">𝑏</mi>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin" tex:family="2">±</mo>
<mo lspace="0" rspace="0.222em"></mo>
<mi>𝑏</mi>
<mo lspace="0.222em" rspace="0.222em">±</mo>
<msqrt>
<mrow>
<msup>
<mi tex:family="1">𝑏</mi>
<mi>𝑏</mi>
<mn>2</mn>
</msup>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin" tex:family="2"></mo>
<mo lspace="0.222em" rspace="0.222em"></mo>
<mn>4</mn>
<mi tex:family="1">𝑎</mi>
<mi tex:family="1">𝑐</mi>
<mi>𝑎</mi>
<mi>𝑐</mi>
</mrow>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mi tex:family="1">𝑎</mi>
<mi>𝑎</mi>
</mrow>
</mfrac>
<mo lspace="0" rspace="0" tex:class="ord" tex:family="1">.</mo>
<mo lspace="0" rspace="0">.</mo>
</math>
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mi tex:family="1">𝑏</mi>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑏</mi>
</math>
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<munder>
<mo lspace="0" movablelimits="true" rspace="0.167em" tex:class="opdisplaylimits" tex:family="3">∑</mo>
<mi tex:family="1">𝑎</mi>
<mo lspace="0" movablelimits="true" rspace="0.167em">∑</mo>
<mi>𝑎</mi>
</munder>
<munder>
<mi tex:family="1">𝑐</mi>
<mi>𝑐</mi>
<mo>_</mo>
</munder>
<mover>
<mi tex:family="1">𝑏</mi>
<mi>𝑏</mi>
<mo stretchy="false">_</mo>
</mover>
<msup>
<mi tex:family="1">𝑐</mi>
<mi mathvariant="normal" tex:family="2"></mi>
<mi>𝑐</mi>
<mi mathvariant="normal"></mi>
</msup>
</math>
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow tex:class="opnolimits">
<mi mathvariant="normal">s</mi>
<mi mathvariant="normal">i</mi>
<mi mathvariant="normal">n</mi>
</mrow>
<mo lspace="0" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑥</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin" tex:family="2"></mo>
<mrow tex:class="opnolimits">
<mi mathvariant="normal">s</mi>
<mi mathvariant="normal">i</mi>
<mi mathvariant="normal">n</mi>
</mrow>
<mo lspace="0" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑥</mi>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin">+</mo>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi mathvariant="normal">sin</mi>
<mo lspace="0" rspace="0" stretchy="false">(</mo>
<mi>𝑥</mi>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.222em" rspace="0.222em"></mo>
<mi mathvariant="normal">sin</mi>
<mo lspace="0" rspace="0" stretchy="false">(</mo>
<mi>𝑥</mi>
<mo lspace="0.222em" rspace="0.222em">+</mo>
<mn>2</mn>
<mi tex:family="1">𝜋</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mi>𝜋</mi>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mn>0</mn>
</math>

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,27 @@
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle displaystyle="true" scriptlevel="0">
<mi>𝑎</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑏</mi>
</mstyle>
</math>
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑎</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑏</mi>
</math>
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑎</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑏</mi>
</math>
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑎</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑏</mi>
</math>
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow tex:class="inner">
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mo fence="true" lspace="0" rspace="0" symmetric="true">(</mo>
<mspace width="-4.981pt" />
<mpadded lspace="+4.981pt" width="+9.963pt">
@ -64,8 +64,8 @@
<mspace width="-4.981pt" />
<mo fence="true" lspace="0" rspace="0" symmetric="true">)</mo>
</mrow>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mrow tex:class="inner">
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mrow>
<mo fence="true" lspace="0" rspace="0" symmetric="true">{</mo>
<mpadded lspace="+4.981pt" width="+9.963pt">
<mtable>
@ -75,12 +75,12 @@
</mtd>
<mtd columnalign="left">
<mtext>if&#160;
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑎</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑏</mi>
</math></mtext>
<mi intent="@ignore" />
<mi />
</mtd>
</mtr>
<mtr>
@ -89,7 +89,7 @@
</mtd>
<mtd columnalign="left">
<mtext>else</mtext>
<mi intent="@ignore" />
<mi />
</mtd>
</mtr>
</mtable>
@ -97,21 +97,21 @@
<mspace width="1.196pt" />
</mrow>
</math>
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mi>𝑥</mi>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mfrac>
<mrow>
<mo lspace="0" rspace="0.222em" tex:class="bin"></mo>
<mo lspace="0" rspace="0.222em"></mo>
<mi>𝑏</mi>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin">±</mo>
<mo lspace="0.222em" rspace="0.222em">±</mo>
<msqrt>
<mrow>
<msup>
<mi>𝑏</mi>
<mn>2</mn>
</msup>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin"></mo>
<mo lspace="0.222em" rspace="0.222em"></mo>
<mn>4</mn>
<mi>𝑎</mi>
<mi>𝑐</mi>
@ -123,11 +123,11 @@
<mi>𝑎</mi>
</mrow>
</mfrac>
<mo lspace="0" rspace="0" tex:class="ord">.</mo>
<mo lspace="0" rspace="0">.</mo>
</math>
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<munder>
<mo lspace="0" movablelimits="true" rspace="0.167em" tex:class="opdisplaylimits">∑</mo>
<mo lspace="0" movablelimits="true" rspace="0.167em">∑</mo>
<mi>𝑎</mi>
</munder>
<munder>
@ -143,7 +143,7 @@
<mi mathvariant="normal"></mi>
</msup>
</math>
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mtable columnalign="right left right left" columnspacing="0 .8em 0" displaystyle="true">
<mlabeledtr>
<mtd>
@ -155,8 +155,8 @@
<mi>𝑐</mi>
</mtd>
<mtd>
<mi intent="@ignore" />
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mi />
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mi>𝑑</mi>
<mi>𝑒</mi>
<mi>𝑓</mi>
@ -165,15 +165,15 @@
<msup>
<mi>𝑒</mi>
<mrow>
<mi mathvariant="normal" tex:family="4">i</mi>
<mi mathvariant="normal">i</mi>
<mi>𝜋</mi>
</mrow>
</msup>
</mtd>
<mtd>
<mi intent="@ignore" />
<mo lspace="0.278em" rspace="0" tex:class="rel">=</mo>
<mo lspace="0.278em" rspace="0" tex:class="ord"></mo>
<mi />
<mo lspace="0.278em" rspace="0">=</mo>
<mo lspace="0.278em" rspace="0"></mo>
<mn>1</mn>
</mtd>
</mlabeledtr>
@ -184,20 +184,20 @@
<mtd>
<mo fence="true" lspace="0" maxsize="17.861pt" minsize="17.861pt" rspace="0" symmetric="true">(</mo>
<mn>1</mn>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin">+</mo>
<mo lspace="0.222em" rspace="0.222em">+</mo>
<mn>2</mn>
</mtd>
<mtd>
<mi intent="@ignore" />
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mi />
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mn>3</mn>
<mo fence="true" lspace="0" maxsize="17.861pt" minsize="17.861pt" rspace="0" symmetric="true">)</mo>
</mtd>
<mtd>
<mi intent="@ignore" />
<mi />
</mtd>
<mtd>
<mi intent="@ignore" />
<mi />
</mtd>
</mlabeledtr>
<mlabeledtr>
@ -208,38 +208,30 @@
<mn>5</mn>
</mtd>
<mtd>
<mi intent="@ignore" />
<mi />
</mtd>
<mtd>
<mi intent="@ignore" />
<mi />
</mtd>
<mtd>
<mi intent="@ignore" />
<mi />
</mtd>
</mlabeledtr>
</mtable>
</math>
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow tex:class="opnolimits">
<mi mathvariant="normal" tex:family="4">s</mi>
<mi mathvariant="normal" tex:family="4">i</mi>
<mi mathvariant="normal" tex:family="4">n</mi>
</mrow>
<mo lspace="0" rspace="0" stretchy="false" tex:class="open">(</mo>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi mathvariant="normal">sin</mi>
<mo lspace="0" rspace="0" stretchy="false">(</mo>
<mi>𝑥</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin"></mo>
<mrow tex:class="opnolimits">
<mi mathvariant="normal" tex:family="4">s</mi>
<mi mathvariant="normal" tex:family="4">i</mi>
<mi mathvariant="normal" tex:family="4">n</mi>
</mrow>
<mo lspace="0" rspace="0" stretchy="false" tex:class="open">(</mo>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.222em" rspace="0.222em"></mo>
<mi mathvariant="normal">sin</mi>
<mo lspace="0" rspace="0" stretchy="false">(</mo>
<mi>𝑥</mi>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin">+</mo>
<mo lspace="0.222em" rspace="0.222em">+</mo>
<mn>2</mn>
<mi>𝜋</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mn>0</mn>
</math>

View File

@ -1,51 +1,51 @@
<math display="block" xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mi mathvariant="normal" tex:family="2">∅</mi>
<mo lspace="0.278em" rspace="0" tex:class="rel">⊧</mo>
<mo lspace="0.278em" rspace="0" stretchy="false" tex:class="open">(</mo>
<mo lspace="0" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑝</mi>
<mo lspace="0.278em" rspace="0.278em" stretchy="false" tex:class="rel" tex:family="2">⇒</mo>
<mi tex:family="1">𝑞</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.278em" rspace="0" stretchy="false" tex:class="rel" tex:family="2">⇒</mo>
<mo lspace="0.278em" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑞</mi>
<mo lspace="0.278em" rspace="0.278em" stretchy="false" tex:class="rel" tex:family="2">⇒</mo>
<mi tex:family="1">𝑟</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.278em" rspace="0" stretchy="false" tex:class="rel" tex:family="2">⇒</mo>
<mo lspace="0.278em" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑝</mi>
<mo lspace="0.278em" rspace="0" stretchy="false" tex:class="rel" tex:family="2">⇒</mo>
<mo lspace="0.278em" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑞</mi>
<mo lspace="0.278em" rspace="0.278em" stretchy="false" tex:class="rel" tex:family="2">⇒</mo>
<mi tex:family="1">𝑟</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mi mathvariant="normal">∅</mi>
<mo lspace="0.278em" rspace="0">⊧</mo>
<mo lspace="0.278em" rspace="0" stretchy="false">(</mo>
<mo lspace="0" rspace="0" stretchy="false">(</mo>
<mi>𝑝</mi>
<mo lspace="0.278em" rspace="0.278em" stretchy="false">⇒</mo>
<mi>𝑞</mi>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.278em" rspace="0" stretchy="false">⇒</mo>
<mo lspace="0.278em" rspace="0" stretchy="false">(</mo>
<mi>𝑞</mi>
<mo lspace="0.278em" rspace="0.278em" stretchy="false">⇒</mo>
<mi>𝑟</mi>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.278em" rspace="0" stretchy="false">⇒</mo>
<mo lspace="0.278em" rspace="0" stretchy="false">(</mo>
<mi>𝑝</mi>
<mo lspace="0.278em" rspace="0" stretchy="false">⇒</mo>
<mo lspace="0.278em" rspace="0" stretchy="false">(</mo>
<mi>𝑞</mi>
<mo lspace="0.278em" rspace="0.278em" stretchy="false">⇒</mo>
<mi>𝑟</mi>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
</math>
<math xmlns:tex="http://typesetting.eu/2021/LuaMathML" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow tex:class="opnolimits">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi mathvariant="normal">s</mi>
<mi mathvariant="normal">i</mi>
<mi mathvariant="normal">n</mi>
</mrow>
<mo lspace="0" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑥</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin" tex:family="2"></mo>
<mrow tex:class="opnolimits">
<mo lspace="0" rspace="0" stretchy="false">(</mo>
<mi>𝑥</mi>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.222em" rspace="0.222em"></mo>
<mrow>
<mi mathvariant="normal">s</mi>
<mi mathvariant="normal">i</mi>
<mi mathvariant="normal">n</mi>
</mrow>
<mo lspace="0" rspace="0" stretchy="false" tex:class="open">(</mo>
<mi tex:family="1">𝑥</mi>
<mo lspace="0.222em" rspace="0.222em" tex:class="bin">+</mo>
<mo lspace="0" rspace="0" stretchy="false">(</mo>
<mi>𝑥</mi>
<mo lspace="0.222em" rspace="0.222em">+</mo>
<mn>2</mn>
<mi tex:family="1">𝜋</mi>
<mo lspace="0" rspace="0" stretchy="false" tex:class="close">)</mo>
<mo lspace="0.278em" rspace="0.278em" tex:class="rel">=</mo>
<mi>𝜋</mi>
<mo lspace="0" rspace="0" stretchy="false">)</mo>
<mo lspace="0.278em" rspace="0.278em">=</mo>
<mn>0</mn>
</math>