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 # LuaMML: 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.**
This is an attempt to implement automatic conversion of LuaLaTeX inline and display math expressions into MathML code to aid with tagging. 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. It works best with `unicode-math`, but it can also be used with traditional math fonts if mappings to Unicode are provided.
## Installation ## Installation
Run `l3build install` to install `luamml` into your local `texmf` tree. Run `l3build install` to install `luamml` into your local `texmf` tree.
## Demo ## Usage
Run `lualatex test_tex` to see all equations from [our example file](./test_tex.tex) converted into MathML. 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" tdsroot = "lualatex"
installfiles = { "luamml-*.lua", "*.sty" } installfiles = { "luamml-*.lua", "*.sty" }
sourcefiles = { "luamml-*.lua", "*.sty", "*.dtx" } sourcefiles = { "luamml-*.lua", "*.sty", "*.dtx" }
typesetsuppfiles = { "*.tex" }
typesetsourcefiles = { "*.tex" }
stdengine = "luatex" stdengine = "luatex"
unpackfiles = { "*.dtx" } unpackfiles = { "*.dtx" }
typesetexe = "lualatex" typesetexe = "lualatex"

View File

@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e} \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 { \sys_if_engine_luatex:F {
\msg_new:nnn {luamml-demo} {pdftex-option-ignored} {Option~`#1'~is~being~ignored~in~pdfTeX~mode.} \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} {Feel free to add a description here}
\lua_now:n { require'luamml-amsmath' } \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} {Feel free to add a description here}
\int_new:N \g__luamml_amsmath_text_struct_int \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} {Feel free to add a description here}
\lua_now:n { require'luamml-array' } \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} {Feel free to add a description here}
\cs_new:Npn \__luamml_kernel_phantom:nnn #1#2#3 { \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} {Feel free to add a description here}
\AddToHook{begindocument} { \AddToHook{begindocument} {

View File

@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e} \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{luamml-pdf}% Loading luamml-pdf is pretty much the point
% \RequirePackage{amsmath,array}% May come back if the patches get ported % \RequirePackage{amsmath,array}% May come back if the patches get ported

View File

@ -1,6 +1,6 @@
% \iffalse meta-comment % \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 %% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either %% conditions of the LaTeX Project Public License, either
@ -35,6 +35,7 @@
\documentclass{l3doc} \documentclass{l3doc}
\usepackage{luamml} \usepackage{luamml}
\usepackage{csquotes,luacolor} \usepackage{csquotes,luacolor}
\MakeShortVerb{\|}
\RecordChanges \RecordChanges
\begin{document} \begin{document}
\tracingmathml2 \tracingmathml2
@ -48,13 +49,60 @@
%</gobble> %</gobble>
% \fi % \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} % \author{Marcel Krüger}
% %
% \maketitle % \maketitle
% %
% \begin{documentation} % \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} % \end{documentation}
% %
% \begin{implementation} % \begin{implementation}
@ -66,11 +114,11 @@
% \begin{macrocode} % \begin{macrocode}
%<@@=luamml> %<@@=luamml>
%<*luatex> %<*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} {Automatically generate presentational MathML from LuaTeX math expressions}
%</luatex> %</luatex>
%<*pdftex> %<*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} {MathML generation for L̶u̶a̶pdfLaTeX}
%</pdftex> %</pdftex>
% \end{macrocode} % \end{macrocode}

View File

@ -1,10 +1,7 @@
\documentclass{article} \newcommand\Luamml{\pkg{Luamml}}
\begin{document} \newcommand\luamml{\pkg{luamml}}
\title{From math lists to MathML} \newcommand\xmltag[1]{\texttt{<#1>}}
\subtitle{The algorithm in luamml} \section{\Luamml's representation of XML and MathML}
\author{Marcel}
\maketitle
\section{General concepts}
In the following I assume basic familiarity with both Lua\TeX's representation of math noads 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} \subsection{Representation of XML elements}
@ -35,32 +32,32 @@ MathML knows the concept of \enquote{embellished operators}:
\begin{blockquote} \begin{blockquote}
The precise definition of an \enquote{embellished operator} is: The precise definition of an \enquote{embellished operator} is:
\begin{itemize} \begin{itemize}
\item an \tag{mo} element; \item an \xmltag{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 \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 \tag{mstyle}, \tag{mphantom}, or \tag{mpadded}, such that an mrow containing the same arguments would be 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 \tag{maction} element whose selected sub-expression exists and is an embellished operator; \item or an \xmltag{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 or an \xmltag{mrow} whose arguments consist (in any order) of one embellished operator and zero or more space-like elements.
\end{itemize} \end{itemize}
\end{blockquote} \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. \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. 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 \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. 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}. 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} 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. 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}. 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.) (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 \tag{mn} elements, everything else becomes a \tag{mi} element with \texttt{mathvariant} set to \texttt{normal}. 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}.) (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}. 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} \end{verbatim}
\subsection{\texttt{sub_box} kernel noads} \subsubsection{\texttt{sub_box} kernel noads}
I am open to suggestions how to convert them properly. I am open to suggestions how to convert them properly.
\subsection{\texttt{sub_mlist} kernel noads} \subsubsection{\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. 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 If the \texttt{small_char} is zero, these get converted as space like elements of the form
\begin{verbatim} \begin{verbatim}
{[0] = 'mspace', {[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}. 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, 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{mo} elements are generated,
\texttt{mathvariant} is never set, \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 \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. 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. 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. 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. Otherwise the \texttt{stretchy} attribute is set to false if the operator is on the list of default stretchy operators.
\end{document}

View File

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