% \iffalse meta-comment
%
% Copyright (C) 2019-2026 by Antoine Missier <antoine.missier@ac-toulouse.fr>
%
% This file may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3 of this license
% or (at your option) any later version.  The latest version of this
% license is in:
%
%   http://www.latex-project.org/lppl.txt
%
% and version 1.3 or later is part of all distributions of LaTeX version
% 2005/12/01 or later.
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{mismath.dtx}
%</driver>
%<*package> 
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}   
    [2026/08/16 v3.3 Miscellaneous mathematical macros]
%</package>
%<*driver>
\documentclass{article}

\usepackage{hypdoc} % loads doc and hyperref
%\AtBeginDocument{\DeleteShortVerb{\"}} % if class l3doc is used
% from the ltxdoc class:
\AtBeginDocument{\MakeShortVerb{\|}}
\providecommand\marg[1]{{\ttfamily\{}\meta{#1}{\ttfamily\}}}
\providecommand\oarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%\usepackage{fontspec}
\usepackage{lmodern}
\usepackage[ibrackets,decimalcomma,lineargroups,textshortcuts]{mismath}
\usepackage{amssymb} % for \complement
\usepackage{stmaryrd} % for \integerint
%\usepackage{mathabx} % an alternative for \integerint
\usepackage{multicol}
\usepackage{xcolor}
%\usepackage[pifont]{spacingtricks}
\RequirePackage[pifont]{spacingtricks}[2026/08/01]
\usepackage{array}
\usepackage{metalogo} % for logos of XeLaTeX et LuaLaTeX
\usepackage[bb=fourier,cal=pxtx]{mathalpha}
%\usepackage{unicode-math} % must be loaded after mathalpha
\usepackage{sectsty}
\usepackage{tocloft}
\usepackage{geometry}

% page layout settings
\geometry{textwidth=355pt,textheight=600pt,vmarginratio=1:1,hmarginratio=3:2}
% very close from the default geometry used by ltxdoc

\definecolor{nicebrown}{rgb}{0.5,0.1,0.1}
\allsectionsfont{\color{nicebrown}}

% reduce spacing in toc
% \addtocontents{toc}{\protect\addvspace{-5pt}} % doesn't work
\setlength{\cftbeforesecskip}{7pt} % instead of 10pt
\renewcommand{\cfttoctitlefont}{\color{nicebrown}\Large\bfseries}
% tocloft changed the ``Contents'' title color to black

% settings for the new juxtapose environment in spacingtricks 1.9
\setlength{\juxtopskip}{\bigskipamount}
\setlength{\juxbottomskip}{\medskipamount}

% settings for doc and index
\NewDocElement[envlike,printtype=\textit{opt.},toplevel=false,%
    idxgroup=Options (package)]{Option}{option}
\newcommand\ShowMainMacroIndex[1]{\DescribeMacro[noindex]{#1}%
    \SpecialMainMacroIndex{#1}\ignorespaces}
% \SpecialMainMacroIndex produces unwanted spaces
\IndexPrologue{\section*{Index} Numbers written in italics refer to the page where the
    corresponding entry is described; numbers underlined refer to the code definition.}
\setlength\marginparsep{10pt} % doesn't work with \begin{macro} 
\setlength\labelsep{10pt} % for the macro environment

% The following commands provide several glyphs for upright special Greek letters:
% pi, phi, gamma, Delta, delta, Gamma, zeta, sigma, Phi

% 112,102,103,68,100,71,122,115,70
\DeclareFontEncoding{LGR}{}{}
\def\Alegreya#1{\text{\usefont{LGR}{Alegreya-LF}{m}{n}\symbol{#1}}\,}
\def\lmr#1{\text{\usefont{LGR}{lmr}{m}{n}\symbol{#1}}\,}
\def\Cochineal#1{\text{\usefont{LGR}{Cochineal-LF}{m}{n}\symbol{#1}}\,}
\def\LibSerif#1{\text{\usefont{LGR}{LibertinusSerif-LF}{m}{n}\symbol{#1}}\,}
\def\LibSans#1{\text{\usefont{LGR}{LibertinusSans-LF}{m}{n}\symbol{#1}}\,}
\def\lmss#1{\text{\usefont{LGR}{lmss}{m}{n}\symbol{#1}}\,}
\def\gentium#1{\text{\usefont{LGR}{gentium}{m}{n}\symbol{#1}}\,}
\def\noto#1{\text{\usefont{LGR}{NotoSerif-LF}{m}{n}\symbol{#1}}\,}

% `p,`f,`g,`D,`d,`G,`z,`s,`F
\def\Symbol#1{\text{\usefont{U}{psy}{m}{n}\symbol{#1}}\,}

% "19,"27,"0D,"01,"0E,"00,"10,"1B,"08
% caveat: l3doc defines " as shortverb; so I'm using decimals: 25,39,13,1,14,0,16,27,8
\def\Euler#1{\text{\usefont{U}{eur}{m}{n}\symbol{#1}}\,}
\def\Charter#1{\text{\usefont{OML}{mdbch}{m}{n}\symbol{#1}}\,}
\def\kp#1{\text{\usefont{U}{jkpmia}{m}{it}\symbol{#1}}\,}
%\def\four#1{\text{\usefont{U}{FML}{futm}{m}{it}\symbol{#1}}\,} % doesn't work
\def\px#1{\text{\usefont{U}{pxmia}{m}{it}\symbol{#1}}\,}
\def\tx#1{\text{\usefont{U}{txmia}{m}{it}\symbol{#1}}\,}

% fourier
\DeclareFontEncoding{FML}{}{}
\DeclareFontSubstitution{FML}{futm}{m}{it}
\DeclareSymbolFont{fourgr}{FML}{futm}{m}{it}
\DeclareMathSymbol{\pifour}{\mathalpha}{fourgr}{"19} % works
\DeclareMathSymbol{\phifour}{\mathalpha}{fourgr}{"27}
\DeclareMathSymbol{\gammafour}{\mathalpha}{fourgr}{"0D}
\DeclareMathSymbol{\Deltafour}{\mathalpha}{fourgr}{"01}
\DeclareMathSymbol{\deltafour}{\mathalpha}{fourgr}{"0E}
\DeclareMathSymbol{\Gammafour}{\mathalpha}{fourgr}{"00}
\DeclareMathSymbol{\zetafour}{\mathalpha}{fourgr}{"10}
\DeclareMathSymbol{\sigmafour}{\mathalpha}{fourgr}{"1B}
\DeclareMathSymbol{\Phifour}{\mathalpha}{fourgr}{"08}

\specialgreeksdef{lgrmath=lmr}
\specialgreeks{pi}
\def\itpi{\originalpi}

\DeclarePairedDelimiter{\absol}{\lvert}{\rvert} % for comparing with \abs

%\CodelineIndex
\PageIndex
%\RecordChanges
%\EnableCrossrefs
\DisableCrossrefs

%\usepackage{hyperref} % loaded by hypdoc
\hypersetup{%
    colorlinks, 
    linkcolor=blue,
    citecolor=red,   
    pdftitle={mismath}, 
    pdfsubject={LaTeX package}, 
    pdfauthor={Antoine Missier}
}

\begin{document}
  \DocInput{mismath.dtx}
  %\PrintChanges
  \PrintIndex
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{mismath.sty}
%
% \title{Miscellaneous mathematical macros \\The \textsf{mismath} package\thanks{This document
% corresponds to \textsf{mismath}~\fileversion, dated \filedate. 
% Thanks to François Bastouil for initial help in English translation
% and Romain Noël for his interest and relevant suggestions.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
% \date{August 16, 2026}
%
% \maketitle
%
% \tableofcontents
%
% \section{Introduction}
%
% According to the International Standards ISO~31-0:1992 to ISO~31-13:1992
% (superseded by ISO~80000-2:2009), mathematical \emph{constants} $\e$, $\i$, $\numpi$ 
% should be typeset in roman (\ie upright) and not in italics like
% variables (see~\cite{TYPMA}~\cite{NIST}~\cite{ICTNS}).
% This package provides some tools to achieve this automatically. 
%
% \medskip
% Even though it is recommended to typeset vector names 
% in bold italic style~\cite{NIST}~\cite{ICTNS}, 
% they are often represented with arrows,
% especially in school documents or in physics. 
% To draw nice arrows above vectors, we use the \textsf{esvect} package 
% by Eddie Saudrais~\cite{VECT}.
% Additionally, we provide a few more macros related to vectors with arrows, 
% particularly to improve the typesetting of the norm: $\norm{\vect{AB}}$ 
% instead of the \LaTeX\ version $\lVert\vect{AB}\rVert$, which is not vertically adjusted,
% or worse $\left\Vert \vect{AB} \right\Vert$ (when using |\left|\ldots |\right|).
% 
% \pagebreak
% The package also offers other macros for:
% \begin{itemize}
%     \item some standard operator names, including Greek letters,
%     \item several commands with useful aliases, including tensors 
%     in sans serif bold italic shape 
%     (ISO recommendation~\cite{TYPMA}~\cite{NIST}),
%     \item improved spacings in mathematical formulas,
%     \item systems of equations and small matrices,
%     \item displayed equations in two columns for lengthy calculations 
%     involving short expressions.
% \end{itemize}
%
% To avoid compatibility issues, most of our macros will only be defined 
% if there isn't already a command with the same name in the packages loaded 
% before \mbox{\textsf{mismath}}. If a macro is already defined,
% a warning message will be displayed and the \textsf{mismath} definition 
% will be ignored. If you wish to keep either the \textsf{mismath} definition 
% or the existing one, you can use |\let|\meta{command}|\relax| either before 
% or after loading \textsf{mismath}.
%
% \medskip
% \DescribeOption[noindex]{[...]}
% The \textsf{mismath} package loads the \textsf{mleftright}
% \footnote{The \textsf{mleftright} package defines variants \cs{mleft} 
% and \cs{mright} of \cs{left} and \cs{right}.} 
% package by Heiko Oberdiek~\cite{MLR} and also \textsf{mathtools}  
% \footnote{The \textsf{mathtools} package offers numerous helpful macros and improvements 
% of the \textsf{amsmath} package.}
% by Morten Høgholm and Lars Madsen~\cite{TOOL} which in turn loads
% the \mbox{\textsf{amsmath}} package~\cite{AMS}.
% If you wish to use \mbox{\textsf{amsmath}} or \textsf{mathtools} with specific options,
% \emph{you can include these options as options of \mbox{\textsf{mismath}}}, or 
% you can load \textsf{amsmath} or \textsf{mathtools}
% with the desired options before loading \mbox{\textsf{mismath}}.
% When using \mbox{\textsf{unicode-math}}~\cite{UNIC}, \textsf{mismath} 
% should be loaded before \textsf{unicode-math}, just like \textsf{amsmath}.
%
% \medskip
% An ISO recommendation, although rarely respected, is to typeset uppercase 
% Greek letters in italics,
% as for other variables~\cite{ICTNS}. This is automatically achieved,
% for some particular fonts, with packages 
% such as \textsf{fixmath} by Walter Schmidt~\cite{FIXM},
% \mbox{\textsf{isomath}} by Günter Milde~\cite{ISOM} 
% or \textsf{pm-isomath} by Claudio Beccari~\cite{PMISO} and optionally with many others
% (such as \textsf{mathpazo} or \textsf{mathptmx} with the option \texttt{slantedGreek}).
% When running through \LuaLaTeX\ or \XeLaTeX\ you can also get this result 
% with the option \mbox{\texttt{math-style=ISO}} provided 
% by the \textsf{unicode-math} package.
% We also have the \mbox{\textsf{mathgreeks}} package~\cite{MGREEK} which offers 
% a wide range of fonts and different settings with Greek letters.
% However this feature is not implemented here due to a conflicting rule in France,
% where all capital letters in mathematics
% are required to be typeset in upright shape
% \footnote{The \textsf{frenchmath} package~\cite{FR}
% ensures to follow the recommended French rules.}.
% The user is free to choose loading one of these packages or not.
% 
%
% \section{Usage}
%
% \subsection{Mathematical constants} 
%
% \DescribeMacro{\mathup} 
% As with standard mathematical functions, \emph{predefined} mathematical constants
% should be typeset in upright shape (typically in roman family), 
% but this practice is not sufficiently respected, probably because it's a bit tedious. 
% A first way is to use the |\mathup| macro, 
% which is generally preferable to |\mathrm|
% \footnote{The \cs{mathup} macro is based on \cs{operatorfont}, 
% which comes from the
% \textsf{amsopn} package, automatically loaded by \textsf{amsmath}. 
% In \textsf{beamer}, the default math font is sans serif, 
% but \cs{mathrm} produces a font with serifs, which might not match the 
% overall style of the presentation. Hence, using \cs{mathup} is indeed 
% a better choice in \textsf{beamer} presentations to ensure that mathematical 
% constants are typeset in upright shape and consistent 
% with the default sans serif math font.},
% for setting any group of letters in roman (upright font). For instance you can use
% |\mathup{e}| to get the Euler's number.
%
% \medskip
% \apply\DescribeMacro{\e,\i,\j} 
% To avoid cluttering a document that contains many occurrences of Euler's number
% or the imaginary unit with |\mathup{e}| or |\mathup{i}|, 
% the package provides the |\e| command for Euler's number 
% and |\i| or |\j| for imaginary numbers.
% Note that |\i| and |\j| already exist in \LaTeX. In LR (left-to-right) mode, 
% they produce \mbox{`\i,\ \j'} without the dot,  
% allowing you to place accents on them. 
% However, in mathematical mode, they produce the warning 
% ``\texttt{LaTeX Warning: Command \string \i\space invalid in math mode on input line}
% \meta{line}''. 
% With the new definition provided by the package, |\i| and |\j| will be redefined 
% specifically for mathematical mode without altering the behavior in text mode.
%
% \medskip
% \DescribeMacro{\MathUp} 
% Typing a lot of backslashes for constants like $\e$, $\i$, or $\j$
% in a document with numerous formulas using them can become tiresome and many authors
% will not do so.
% That's why the package proposes another convenient solution 
% with the macro |\MathUp|\marg{letter}.
% For example, when |\MathUp{e}| is called, any subsequent occurrence of $\e$
% will automatically be set in roman, 
% without the need to type |\e| explicitly. The effect of this macro 
% is either global or local, depending on whether it is used outside or inside an
% environment or a pair of braces.
% You can also call this macro in the preamble. This powerful command allows you 
% to bring a document into line with these typographic conventions
% effortlessly and without changing anything
% in your mathematical formulas. 
% In fact, |\MathUp| can be applied to any valid single Latin letter, 
% making it useful in a variety of situations
% \footnote{Another use of it to write probabilities
% will be presented in section \ref{operators}.}.
%
% \medskip
% \DescribeMacro{\MathIt}
% When there are other occurrences of $e$, $i$ or $j$ as variables, 
% you can still obtain italicized $e$, $i$ or $j$ using \LaTeX\
% commands |\mathit| and |\mathnormal|, which are convenient for occasional use. 
% However, you can also use the inverse switch |\MathIt|\marg{letter},
% which has a global effect when used outside environments or braces, 
% or a local effect when used inside them. 
% Just as for |\MathUp|, |\MathIt| can be applied to any single Latin letter.
%
% \medskip
% \DescribeMacro{\MathNumbers} \DescribeMacro{\MathNormal}
% These macros enable you to set roman or italic (the default) typesetting 
% for multiple letters in a single command. 
% For instance, |\MathNumbers{e,i}| is equivalent to |\MathUp{e}\MathUp{i}|.
% This macro only affects the letters e, i, or j; 
% it has no effect on other characters.
% On the other hand, |\MathNormal| accepts any comma-separated list of arguments.
% This means you can apply the normal italic math mode typesetting to various letters 
% at once using |\MathNormal|.
% 
% \medskip
% \apply\DescribeMacro{\enumber,\inumber,\jnumber}
% These three commands, used until version 2.2 but only functioning within the preamble, 
% now serve as aliases for the commands |\MathUp{e}|, |\MathUp{i}| or |\MathUp{j}|, 
% and can therefore be used anywhere in the document or preamble. 
% They also have an inverse switch, |\MathIt|.
% 
% \medskip
% The constant $\numpi$  should also be typeset in upright shape 
% (see~\cite{TYPMA}, \cite{NIST}, \cite{ICTNS}), which is different from italicized 
% $\originalpi$. 
% However, this recommendation is even less commonly followed compared to the one 
% concerning  $\e$ and $\i$~\cite{TYPMA}.
% The macros that implement this behavior and allow the automatic replacement of $\originalpi$ 
% by $\numpi$ when typing |\pi| will be presented in the section \ref{s:greek} dedicated
% to Greek letters for mathematical constants and operators.
%
%
% \subsection{Vectors}
%
% \DescribeMacro{\vect}
% By default, the |\vect| command
% typesets vectors with arrows
% (thanks to the \textsf{esvect} package by Eddie Saudrais
% \footnote{\textsf{esvect} provides the \cs{vv} macro 
% used by \cs{vect}.})
% which are more elegant than those produced by the standard \LaTeX\ command |\overrightarrow|,
% particularly with the default Compuler Modern or Latin Modern font: $\overrightarrow{AB}$.
% The \textsf{esvect} package has an option 
% (a single letter between \texttt{a} and \texttt{h}) to define 
% the desired type of arrow (see~\cite{VECT}).
% In \textsf{mismath}, \textsf{esvect} is loaded with the option \texttt{b}:
% |\vect{AB}| gives $\vect{AB}$.
% If you wish to use a different type of arrow, you must call \textsf{esvect}
% with the appropriate option \emph{before} loading \textsf{mismath}.  
% For example, using |\usepackage[d]{esvect}|
% will provide the same arrows that are used by default in~\cite{VECT}.
%
% \medskip 
% \DescribeMacro{\boldvect}
% The |\vect| macro allows vector names to be typeset using bold italic font,
% as recommended by ISO~\cite{NIST}, instead of using arrows. 
% To achieve this, call the |\boldvect| command, which modifies the behavior of |\vect|
% locally or globally, depending on its placement in the document (inside or outside
% a group or an environment):
% \begin{juxtapose}[0.6]
%     \begin{verbatim} 
%\[ \boldvect \vect{v}
%   =\lambda\vect{e}_x+\mu\vect{e}_y \]
%     \end{verbatim}
%     \otherside \vspace{-4ex}
%     \[ \boldvect \vect{v}=\lambda\vect{e}_x +\mu\vect{e}_y. \]
% \end{juxtapose}
%
% \DescribeMacro{\boldvectcommand}
% By default, |\boldvect| uses the |\boldsymbol| command
% \footnote{\cs{mathbf} produces upright bold font, 
% even when used in combination with \cs{mathit}.}
% from the \textsf{amsbsy} package, which is automatically loaded by \textsf{amsmath}.
% However, you may prefer other packages that produce bold italic fonts, 
% such as \textsf{fixmath} with the |\mathbold| command,
% \textsf{isomath} with |\mathbfit| 
% or \textsf{bm} with the |\bm| command;
% \textsf{unicode-math} provides the |\symbfit| command.
% To use an alternative command instead of |\boldsymbol| in \mbox{\textsf{mismath}}, 
% redefine |\boldvectcommand|, 
% for instance if \textsf{fixmath} is loaded:
%
% \smallskip
% \centeredline{|\renewcommand\boldvectcommand{\mathbold}|.}
%
% \medskip
% According to ISO rules, symbols that represent matrices are also in bold italic.
% Therefore you can also use |\vect| with |\boldvect| for matrices, or create another alias.
%
% \medskip
% \DescribeMacro{\arrowvect}
% At any time, you can revert to the default behavior using the inverse switch
% |\arrowvect|. 
% These switches may be used anywhere, whether
% inside mathematical mode or within an environment (with a local effect) or outside 
% (with a global effect).
%
% \medskip
% \DescribeMacro{\hvect}
% When vectors with arrows are typeset side by side,
% the arrows can be set up slightly higher using |\hvect|
% (which inserts a vertical phantom of `$t$') 
% to prevent inelegant effects. For example, writing
% \begin{itemize}
%     \item $\vect{AB}=\hvect{u} + \vect{AC}$, obtained with |\hvect{u}|,
%     looks better than $\vect{AB}=\vect{u}+ \vect{AC}$;
%     \item $\vect{F} = m \hvect{a}$, obtained with |\hvect{a}|,
%     looks better than $\vect{F} =m \vect{a}$.
% \end{itemize}
% This adjustment ensures a nicer appearance when vectors 
% with arrows are combined in an equation
% \footnote{For a fine tuning you can also use \cs{vstrut} or
% \cs{cstrut} from the \textsf{spacingtricks} package~\cite{SPA}.}.
% The |\boldvect| and |\arrowvect| switches affect |\hvect| in the same way as |\vect|.
%
% \medskip
% \DescribeMacro{\hvec}
% In a similar way, |\hvec| raises the little arrow produced by
% the \LaTeX\ command |\vec|, to the height of the letter `$t$'
% (but |\boldvect| has no effect on |\vec| nor |\hvec|):
% \begin{itemize}
%     \item $\hvec{a} \cdot \vec{b}=0$, obtained with |\hvec{a}|,
%     looks better than $\vec{a} \cdot \vec{b}=0$.
%     \item $P=\vect{F}\cdot\hvec{v}$, obtained with |\hvec{v}|,
%     looks better than $P=\vect{F}\cdot\vec{v}$.
%     ^^A (the result of |\vec| with \textsf{fourier} may be bad with high letters)
% \end{itemize}
%
% \DescribeMacro{\norm}\DescribeMacro[noindex]{\norm*}
% The norm of a vector is conventionally represented using the delimiters |\lVert| and |\rVert|
% (or |\|$\mid$ unless a plus (+) or minus (-) sign follows the opening delimiter)
% or |\left\Vert| and |\right\Vert| 
% for adaptive delimiters. Unfortunately, these delimiters 
% are always vertically centered, relative to the mathematical center line, 
% whereas vectors with arrows are asymmetric objects.
% The code |$\norm{\vec{h}}$| raises the double bar to produce $\norm{\vec{h}}$
% instead of $\Vert\vec{h}\Vert$ or $\left\Vert \vec{h} \right\Vert$.
% Note that the height of the bars doesn't adjust to content.
% However, it does adjust to the surrounding math style 
% (main text, subscripts, or superscripts),
% \eg $X^{\norm{\vec{h}}}$.
%
% Since version 3.3, this macro can also handle symmetric or small sized arguments, 
% \eg |\norm{a}| gives $\norm{a}$.
% The starred version |\norm*| forces the raising of the bars if necessary.
%
% \medskip
% \DescribeMacro{\innerprod}
% The inner product is typeset with the two-argument macro |\innerprod|,
% which is a shortcut for |\left\langle  ,  \right\rangle|, \eg |\innerprod{u}{v}| yields
% $\innerprod{u}{v}$.
%
%
% \subsection{Standard operator names}\label{operators}\label{s:op}
%
% \DescribeMacro{\di}
% The \emph{differential} operator should be typeset in roman, not in
% italics, to distinguish it from variables 
% (as mentioned in \cite{TYPMA}~\cite{NIST}~\cite{ICTNS}~\cite{LSHORT}).
% To achieve this, we provide the |\di| command.
% Several authors use |\ud| (meaning upright `d') for this purpose, 
% generally an alias for |\mathrm{d}|. It is not equivalent because
% the |\di| macro leaves a \emph{thin space before}  the `d' letter, 
% like any other operator (which |\mathrm{d}| does not do), but \emph{no space after}.
% Take a look at the following examples: 
% \begin{juxtapose}[0.6]
%     \begin{verbatim} 
%\[ \iint xy\di x\di y \]
%
%\[ m\frac{\di^2x}{\di t^2}
%   + h\frac{\di x}{\di t} + kx = 0 \]
%     \end{verbatim}
%     \otherside
%     \[ \iint xy\di x\di y, \]
%     \[ m\frac{\di^2x}{\di t^2}+h\frac{\di x}{\di t}+kx=0. \]
% \end{juxtapose}
%
% The command |\di| can also represent the \emph{distance}: $\di(x,y)$, hence its name.
%
% \medskip
% \DescribeMacro{\opDelta} \DescribeMacro{\opdelta}
% Two other `difference' operators allow for expressing variations ($\opDelta$)
% or small variations ($\opdelta$). 
% They are obtained using the |\opDelta| and |\opdelta| commands.
% \begin{align*}
%     \opDelta h \approx f'(x_0) \opDelta x, &&
%     \frac{\opdelta T}{T}=\frac{1}{2}\frac{\opdelta l}{l}, &&
%     \opdelta A = x \opdelta y + y \opdelta x + \opdelta x \opdelta y.
% \end{align*}
%
% Like |\di|, these operators use the same spacing and are typeset 
% using upright Greek letters from the selected font.
% A thin space is inserted before the operator, but none after it.
% The commands for choosing and managing Greek letters,
% in particular how to set the group of special lowercase upright Greek letters, 
% are explained in section \ref{s:greek}.
%
% \medskip
% \apply\DescribeMacro{\opGamma,\opzeta,\opsigma,\opPhi}
% We also provide classic functions that are
% represented by Greek letters: the Gamma function $\opGamma$ obtained with |\opGamma|, 
% the Riemann zeta function $\opzeta$ obtained with |\opzeta|,
% the Dirac function $\opdelta$, or Kronecker delta, which can also be obtained with |\opdelta|,
% the standard deviation $\opsigma$ obtained with |\opsigma|,
% the cumulative distribution function of the standard normal distribution $\opPhi$,
% obtained with |\opPhi|.
% For any of them, as for the previous difference operators,
% they have to be typeset in upright shape and with a thin spacing before and no space after
% \footnote{
% Unlike classic operators composed of multiple letters who can take a thin space after
% their name, \eg $\sin x$, but, if needed, $\opsigma X$ without space seems better.}.
% But they are operators not just letters. The following examples show that:
% \begin{equation*}
%     \Gamma (z)\opGamma \mleft(z+\frac{1}{m}\mright)
%     \opGamma \mleft(z+\frac{2}{m}\mright)\cdots
%     \opGamma \mleft(z+\frac{m-1}{m}\mright)=(2\numpi)^{\frac{m-1}{2}}m^{\frac{1}{2}-mz}
%     \opGamma (mz),
% \end{equation*}
% \begin{equation*}
%     \opGamma(s)\opzeta(s)=\int_{0}^{+\infty}\frac{t^{s-1}}{\e^{t}-1}\di t, \qquad 
%     \int_{-\infty}^{+\infty}\!f(t)\opdelta(t-T)=f(T),
% \end{equation*}
% \begin{equation*}
%     \opsigma(aX+b) = \abs{a}\opsigma(X), \qquad 
%     \opPhi^{(n)}(x_0) = -\mleft(x_0\opPhi^{(n-1)}(x_0)+(n-2)\opPhi^{(n-2)}(x_0)\mright).
% \end{equation*}
% \emph{However, these macros are not available by default, since an upright Greek font 
% must first be defined, see section \ref{s:greek}.}
%
% \medskip
% \DescribeMacro{\P} \DescribeMacro{\E}
% When representing a probability
% \footnote{\LaTeX\ provides also \cs{Pr} which gives $\Pr$.}
% or an expectation, the proper use is to typeset the capital letters $\P$, $\E$ 
% in roman, just like any standard function identifier.
% This can be achieved with the |\P| and |\E| commands.
%
% \medskip
% \DescribeMacro{\Par}
% The |\P| command already existed to refer to the `end of paragraph' symbol (\Par),
% in text mode. It has been redefined, but only for the math mode, in such a way that
% |\P| can still be used in text mode, or we can use an alias: |\Par|.
%
% \medskip
% \DescribeMacro{\V}
% Variance is generally denoted by $\var$ or $\Var$ (see the table below),
% but some authors prefer to use $\V$, which can be produced using |\V|.
%
% \medskip
% \DescribeMacro{\apply}
% As for $\e$, $\i$ or $\j$, you can use |\MathUp{P}|, |\MathUp{E}| 
% or |\MathUp{V}| to avoid typing many |\P|, |\E| or |\V|, 
% and you get the inverse toggle with
% |\MathIt| for any individual roman letter, or you can use
% |\apply\MathUp|\marg{mylist} 
% \footnote{
% Thanks to the \cs{apply} macro, developed by Petr Ol\v{s}ák.}
% or |\MathNormal| on a comma-separated list.
% Nevertheless you must be aware that spacing is better managed with the macros
% |\P|, |\E| or |\V| than with just roman letters that will not be considered as operators.
% For instance
% \apply\MathUp{P,E,V}
% \[ P(A \cap B) =  P_B(A)P(B),\quad  E(XY)-E(X)E(Y),\quad  V(aX)=a^2V(X), \]
% obtained with |\apply\MathUp{P,E,V}|, produces incorrect spacing before the letters
% $P$, $E$ and $V$
% when they follow another letter or a closing delimiter.
% This doesn't occur with |\P|, |\E| or |\V|, 
% which are operators and not just letters: \MathNormal{P,E,V}
% \[ \P(A \cap B) =  \P_B(A)\P(B), \quad \E(XY)-\E(X)\E(Y), \quad \V(a X)=a^2\V(X) .\]
%
% \DescribeMacro{\probastyle}
% Some authors use double-struck font shape to represent probability, expectation 
% and variance: $\mathbb{P}, \mathbb{E}, \mathbb{V}$.
% The |\probastyle| macro sets the appearance of |\P|, |\E| and |\V|.
% For instance |\renewcommand\probastyle{\mathbb}|
% \footnote{The effect of this redefinition is global or local when inside an environment.}
% switches to double-struck letters. It can be even used inside a formula to change
% dynamically the signification and behavior of |\P|, |\E| and |\V|, \eg
% \begin{juxtapose}[0.65]
%     \begin{verbatim}
%\[ \P_X(A) \renewcommand\probastyle{\mathbb}
%      \sum_{x \in A}\P(X=x) \]
%     \end{verbatim}
%     \otherside \vspace{-3ex}
%     \[ \P_X(A) = \renewcommand\probastyle{\mathbb}\sum_{x \in A}\P(X=x). \]
% \end{juxtapose}
%
% If you have to do many such changes, you can define switch aliases |\probbb| or |\probrm|.
% The |\mathbb| command is provided by \textsf{amsfonts} package
% (which is \emph{not} loaded by \mbox{\textsf{mismath}}), but also by other complete math font
% packages such as \mbox{\textsf{mathdesign}}, \textsf{kpfonts}, \textsf{fourier}, 
% \textsf{unicode-math}\ldots, or you get the convenient \mbox{\textsf{mathalpha}}~\cite{MATA}
% by Michael Sharpe, which lets you choose among many available fonts for the commands
% |\mathbb|
% \footnote{In the present document we have called \textsf{mathalpha} with
% the option \texttt{bb=fourier,cal=pxtx}.},
% but also |\mathcal|, |\mathfrak|, |\mathscr|\ldots
%
% \hypertarget{nofunction}{}
%
% \medskip
% \apply\SpecialMacroIndex{\adj,\Aut,\codim,\codom,\coker,\Conv,\Cov,\cov,\curl,\divg,\dom,
%     \End,\erf,\grad,\Hv,\id,\Id,\im,\lb,\lcm,\ord,\ran,
%     \rank,\Res,\rot,\sgn,\sinc,\spa,\supp,\tr,\Var,\var,\Zu}
% The following standard operator names are defined in \textsf{mismath}.
% \begin{center}\hfill
% \begin{tabular}{rl}
%     |\adj|   & $\adj$   \\
%     |\Aut|   & $\Aut$   \\
%     |\codim| & $\codim$ \\
%     |\codom| & $\codom$ \\
%     |\coker| & $\coker$ \\
%     |\Conv|  & $\Conv$  \\
%     |\Cov|   & $\Cov$   \\
%     |\cov|   & $\cov$   \\
%     |\curl|  & $\curl$  \\
%     |\divg|  & $\divg$  \\
%     |\dom|   & $\dom$
% \end{tabular}\hfill
% \begin{tabular}{rl}
%     |\End|   & $\End$   \\
%     |\erf|   & $\erf$   \\
%     |\grad|  & $\grad$  \\
%     |\Hv|    & $\Hv$    \\
%     |\id|    & $\id$    \\
%     |\Id|    & $\Id$    \\
%     |\im|    & $\im$    \\
%     |\lb|    & $\lb$    \\
%     |\lcm|   & $\lcm$   \\
%     |\ord|   & $\ord$   \\
%     |\ran|   & $\ran$  
% \end{tabular}\hfill
% \begin{tabular}{rl}
%     |\rank|  & $\rank$  \\
%     |\Res|   & $\Res$   \\
%     |\rot|   & $\rot$   \\
%     |\sgn|   & $\sgn$   \\
%     |\sinc|  & $\sinc$  \\
%     |\spa|   & $\spa$   \\
%     |\supp|  & $\supp$  \\
%     |\tr|    & $\tr$    \\
%     |\Var|   & $\Var$   \\
%     |\var|   & $\var$   \\
%     |\Zu|    & $\Zu$
% \end{tabular}\hfill \mbox{}
% \end{center}
%
% By default, operators returning vectors,  |\grad| and |\curl| (or its synonym |\rot|
% more commonly used in Europe), are written with an arrow on the top.
% When |\boldvect| is activated, they are typeset in bold style:
% $\boldvect \grad, \curl, \rot$.
% For the variance, the covariance and the identity function, 
% two notations are proposed, with or without a first capital letter, 
% because both are very common.
% Note that |\div| already exists ($\div$) and |\span| is a \TeX\ primitive;
% they have not been redefined. Therefore the provided macros are called |\divg| (divergence) 
% and |\spa| (span of a set of vectors).
% Furthermore |\Z| is used to denote the set of integers and |\H| the set of quaternions 
% (see \ref{aliases}), 
% We therefore use |\Zu| to denote the center of a group: $\Zu(G)$ (from German Zentrum),
% and |\Hv| for the Heaviside step function.
%
% \medskip
% The \textsf{mismath} package also provides some (inverse) trigonometric
% or hyperbolic functions, that are missing in \LaTeX.
% \apply\SpecialMacroIndex{\arccot,\sech,\csch,\arsinh,\arcosh,\artanh,\arcoth,\arsech,\arcsch}
% \begin{center}
% \begin{tabular}{rl!{\quad}rl!{\quad}rl}
%     |\arccot| & $\arccot$ & |\arsinh| & $\arsinh$ & |\arcoth| & $\arcoth$ \\
%     |\sech|   & $\sech$   & |\arcosh| & $\arcosh$ & |\arsech| & $\arsech$ \\
%     |\csch|   & $\csch$   & |\artanh| & $\artanh$ & |\arcsch| & $\arcsch$
% \end{tabular}
% \end{center}
%
% \DescribeMacro{\FT}\DescribeMacro{\LT}
% The Fourier and Laplace transforms are typeset with |\FT| and |\LT| respectively, 
% which are defined as operators, but typeset using |\mathcal|.
% \[  \FT\{f * g\}=\FT\{f\} \FT\{g\}, \quad \LT\{af+bg\} = a\LT\{f\}+b\LT\{g\}. \]
%
% \DescribeOption{nofunction}
% Some may find that the definition of all these operators and functions is not relevant 
% to their needs. So, the definitions of standard operators and functions in both
% previous tables, and also the |\FT| and |\LT| macros,
% can be disabled with the \texttt{nofunction} option.
% \hypertarget{classicReIm}{}
%
% \medskip
% \DescribeMacro{\Re}\DescribeMacro{\Im}
% \DescribeMacro[noprint]{\oldRe}\DescribeMacro[noprint]{\oldIm}
% The |\Re| and |\Im| macros refer to the real and imaginary parts 
% of a complex number. They have been redefined to produce `$\mathup{Re}$' 
% and `$\mathup{Im}$', in place of outdated symbols $\oldRe$ and $\oldIm$.
% Nevertheless, it is still possible to obtain the old symbols 
% with |\oldRe| and |\oldIm|.
%
% \medskip
% \DescribeOption{classicReIm}
% The \texttt{classicReIm} option deactivates these redefinitions.
%
% \medskip
% \DescribeMacro{\bigO}\DescribeMacro{\bigo} \DescribeMacro{\lito}
% Asymptotic comparison operators (in Bachmann-Landau notation) are obtained with
% |\bigO| or |\bigo| and |\lito| commands. |\bigO| uses |\mathcal| and the two others
% typeset the letter `O' or `o' in roman
% \footnote{Donald Knuth proposed to use the omicron letter which is similar to `O'.}, 
% as for any operator. \hypertarget{lineargroups}{} \vspace{-1ex}
% \[ n^2+\bigO(n\log n) \txt{or} n^2+\bigo(n\log n)\txt{and} 
%     \e^x=1+x+\frac{x^2}{2}+\lito\bigl(x^2\bigr).
% \] 
% 
% \DescribeOption{lineargroups}
% \apply\SpecialMacroIndex{\GL,\SL,\Sp,\O,\SO,\U,\SU}
% Macros for typesetting the general linear group and some of its classic subgroups 
% are available when activating the package option \texttt{lineargroups}.
% With this option, suggested by Romain Noël, \textsf{mismath} provides the following commands:
% \begin{center}
%     |\GL, \SL, \Sp, \O, \SO, \U, \SU|.
% \end{center}
% These macros typeset the group names as operators in the typographic sense
% (roman letters, \ie upright, with operator spacing).
% \[ \GL(n, \K),\; \SL(n, \K), \;\Sp(2n, \F),\; \O(n, \F),\; \SO(n),\; \U(n),\; \SU(n). \]
% The |\O| command was already defined and yields \O, but only in text mode.
% Thus, \textsf{mismath} redefines it only for math mode,
% the original macro being saved as |\oldO|.
%
%
% \subsection{A few useful aliases and small macros} \label{aliases}
% 
% In the tradition of Bourbaki~\cite{BOURB} and D.~Knuth himself, proper usage requires 
% that standard number sets be typeset in bold roman:
% $\R, \C, \Z, \N, \Q, \H$, 
% whereas double-struck letters 
% ($\mathbb{R}, \mathbb{C}, \mathbb{Z}, \mathbb{N}, \mathbb{Q}, \mathbb{H}$) 
% are traditionally reserved for blackboard writing~\cite{LSHORT}.
% Similarly, to designate a field we use $\F$ or $\K$ (Körper in German).
% We obtain these symbols with the following macros:
% \apply\SpecialMacroIndex{\R,\C,\Z,\N,\Q,\H,\F,\K}
% \begin{center}
%     |\R|, |\C|, |\Z|, |\N|, |\Q|, |\H|, |\F|, |\K|.
% \end{center}
%
% % The |\H| command was already defined and yields a long Hungarian umlaut in text mode, 
% \eg |\H{u}| gives \H{u}.
% Thus, \textsf{mismath} redefines it only for math mode,
% the original macro being saved as |\oldH|.
%
% \DescribeMacro{\mathset}
% The |\mathset| command enables you to change the behavior 
% of all these macros globally. 
% By default, |\mathset| is an alias for |\mathbf|, but if you prefer double-struck letters, 
% you can simply use |\renewcommand\mathset{\mathbb}| (with local effect within
% an environment or a pair of curly braces).
%
% \medskip
% \DescribeMacro{\ds}
% The |\displaystyle| command is very common, therefore the |\ds| alias is provided.
% It not only makes typing easier, but also makes the source code more readable.
%
% \medskip
% Symbols with limits behave differently for in-line formulas or for displayed equations. 
% In the latter case, `limits' are placed under or above the symbol 
% whereas for in-line math mode, 
% they are placed on the right, as a subscript or exponent. Compare
% $\opzeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}$ with
% \[\opzeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}.\]
%
% \apply\DescribeMacro{\dlim,\dsum,\dprod,\dcup,\dcap}
% With in-line math mode, display style can be forced with |\displaystyle|
% or its alias |\ds|. However, when using these commands, all the rest of the current
% mathematical environment will be set in display style 
% (as shown in the previous example, where the fraction is expanded).
% To limit the display style effect to the affected symbol only, 
% like the  \textsf{amsmath} command |\dfrac|, 
% we can use the following macros:
% |\dlim|, |\dsum|, |\dprod|, |\dcup|, |\dcap|.
% So 
% \begin{center}
%     |$\dlim_{x\to +\infty}\frac{1}{x}$|\quad  yields\quad $\dlim_{x \to +\infty}\frac{1}{x}$.
% \end{center}
%
% \DescribeMacro{\lbar} \DescribeMacro{\hlbar}
% Long bars over expressions are produced with |\overline|
% or its alias |\lbar|, to get for instance $\lbar{z_1z_2}$.
% Similar to vectors, you can raise the bar (from the height of `$t$') with
% the |\hlbar| command, to correct uneven bar heights.
% \begin{center}
%     $\lbar{z+z'}=\hlbar{z}+\lbar{z'}$, obtained with |\hlbar{z}|,
% looks better than $\lbar{z+z'}=\lbar{z}+\lbar{z'}$.
% \end{center}
%
% \DescribeMacro{\eqdef} \DescribeMacro[noindex]{\eqdef*} \SpecialMacroIndex{\upDelta}
% The |\eqdef| macro writes the equality symbol topped with `def',
% or with `$\scriptstyle \Delta$' for |\eqdef*|
% (using |\upDelta| if it exists, or |\Delta| if not):
% \begin{juxtapose}
%     \begin{verbatim} 
%\[ \e^{\i\theta} \eqdef 
%   \cos\theta + \i\sin\theta \]
%\[ \e^{\i\theta} \eqdef* 
%   \cos\theta + \i\sin\theta \]
%     \end{verbatim}
%     \otherside \vspace{-3ex}
%     \[\e^{\i\theta}\eqdef\cos\theta + \i\sin\theta, \]
%     \[\e^{\i\theta}\eqdef*\cos\theta + \i\sin\theta. \]
% \end{juxtapose}
%
% \DescribeMacro{\asympteq}
% The |\asympteq| macro is used to typeset the asymptotic equivalence. 
% It has an optional argument, set in |\scriptscriptstyle|, whose default value is empty.
% \begin{center}
%     |f(x) \asympteq[x\to+\infty] g(x)| yields $f(x) \asympteq[x\to+\infty] g(x)$.
% \end{center}
%
% \DescribeMacro{\unbr}
% |\unbr| is an alias for |\underbrace|
% \footnote{The \textsf{mathtools} package~\cite{TOOL} provides an improved version 
% of the \cs{underbrace} command.}, 
% making the source code more compact:
% \begin{juxtapose}[0.53]
%     \begin{verbatim}
%\[ (QAP)^n = \unbr{QAP\mul QAP\mul
%   \cdots\mul QAP}_{n\text{ times}} \]
%     \end{verbatim}
%     \otherside \vspace{-3ex}
%     \[ (QAP)^n = \unbr{QAP\mul QAP\mul\cdots\mul QAP}_{n\text{ times}}. \]
% \end{juxtapose}
%
% \DescribeMacro{\then} 
% This macro produces the symbol $\Longrightarrow$ surrounded by large spaces,
% just as the standard |\iff| macro does with $\Longleftrightarrow$.
% It's simply an alias of the \textsf{amsmath} |\implies| macro.
%
% \medskip
% \DescribeMacro{\compl}
% Following Bourbaki~\cite{BOURB}, we can write the complement of a set $A$ with
% the |\complement| command which is 
% provided by \textsf{amssymb}, \eg
% $ \complement(A \cup B) = \complement A \cap \complement B. $
% We can also use |\setminus|, which yields a backslash operator:
% $\complement_E A=E \setminus A$.
% But the letter `c' as exponent is also commonly used. To ensure a typographic
% distinction from variables, the |\compl| macro typesets `c' in roman: 
% \begin{center}
%     |\compl{(A \cup B)} = \compl{A} \cap \compl{B}| \qquad 
%     $\compl{(A \cup B)} = \compl{A} \cap \compl{B}.$
% \end{center}
%
% \pagebreak
% \DescribeMacro{\integerint}
% The integer interval $\integerint{a, b}$, 
% typeset with |\integerint{a,b}|, represents the set of all integers from $a$ to $b$.
% One of the \textsf{stmaryrd}, \textsf{unicode-math}, \textsf{fourier}
% or \textsf{mathabx} packages, 
% which provide these double brackets, must be loaded to use this command.
% Other common notations are $[a .. b]$ or just $a..b$.
%
% \medskip
% \DescribeMacro{\mathbfsfit}\DescribeMacro{\tensor}
% For tensor symbols, ISO conventions~\cite{TYPMA}~\cite{NIST} recommend using
% sans serif bold italic, but there
% is no such math alphabet in the default \LaTeX\  mathematical style.
% However, the \mbox{\textsf{mismath}} package defines this alphabet 
% (provided that the font encoding and package you use support it) 
% and provides the macro |\mathbfsfit| or its alias |\tensor|.
% By writing |\tensor{S}\otimes\tensor{T}|, you get $\tensor{S}\otimes\tensor{T}$.
% \hypertarget{textshortcuts}{}
%
% \DescribeOption{textshortcuts}
% The package option \texttt{texshortcuts}, 
% provides some text mode macros, suggested by Romain Noël, to reduce 
% typing of some often used sentence elements in mathematics,
% with a starred version producing an abbreviation
% \footnote{The usual abbreviations produced by the macros \cs{ie} and \cs{eg}, 
% whose scope extends far beyond mathematics, are provided by other packages 
% like \textsf{foreign}~\cite{FORGN} or \textsf{spacingtricks}~\cite{SPA}.}.
% \apply\SpecialMacroIndex{\QED,\ale,\cc,\iff,\st,\stp,\walog,\wma,\wrt}
%
% \begin{center}
% \setlength{\extrarowheight}{1pt}
% \begin{tabular}{ll!{\quad}ll} ^^A tabularray doesn't like verbatims
%     \hline
%     Command & Result & \multicolumn{2}{l}{Starred version} \\
%     \hline
%     |\QED|   & \QED   &\emph{none} \\
%     |\ale|   & \ale   & |\ale*|   & \ale* \\
%     |\cc|    & \cc    & |\cc*|    & \cc* \\
%     |\iff|   & \iff   & |\iff*|   & \iff* \\
%     |\st|    & \st    & |\st*|    & \st* \\
%     |\stp|   & \stp   & |\stp*|   & \stp* \\
%     |\walog| & \walog & |\walog*| & \walog* \\
%     |\wma|   & \wma   & |\wma*|   & \wma* \\
%     |\wrt|  & \wrt    & |\wrt*|   & \wrt* \\
% \hline
% \end{tabular}
% \end{center}
% \DescribeMacro[noprint]{\Walog}\DescribeMacro[noprint]{\Wma}\DescribeMacro[noprint]{\Wrt}
% \vspace{-2ex}
% \begin{itemize}
% \item When the abbreviation \ale*, \cc* or \walog* ends a sentence, 
% the space after the period should be a little bit longer. 
% To get that correct space, type a period after the command: 
% ``|\ale*. Now|'' yields ``\ale*. Now'' 
% \footnote{This feature is obtained by using \cs{xperiod} 
% from the \textsf{xpunctuate} package~\cite{XPUNC}.}.
% \item The |\iff| macro already exists in \LaTeX, but only in math mode. 
% It has therefore been redefined for use in text mode also.
% The abbreviation ``\iff*'' may or may not be followed by a period at the end, 
% depending on national abbreviation conventions, \eg vs in the UK, 
% but vs.\@ in the USA.
% Add `|.\@|' \iff*.\@ needed.
% \item Three of these expressions can also begin a sentence. For this purpose
% we provide |\Walog|, |\Wma|, |\Wrt| 
% and the equivalent starred versions.
% \end{itemize}
% 
%
% \subsection{Improved spacing in mathematical formulas}
%
% \DescribeMacro{\txt}
% The |\txt| macro, based on |\text| from the \textsf{amstext} package
% (loaded by \textsf{amsmath}),
% adds |\quad|spacing around the text. See the following example:
% \begin{center}
%     |\[ \ln x=a \then x=\e^a, \txt{rather than}| \\
%     |\ln x=a \Longrightarrow x=\e^a \]| \\[1ex]
%     $ \ln x=a \then x=\e^a, \txt{rather than} \ln x=a \Longrightarrow x=\e^a$.
% \end{center}
%
% \DescribeMacro{\mul}
% The multiplication symbol obtained with |\times| produces the same spacing as addition
% or subtraction operators, whereas division obtained with $/$ is closer to its operands.
% This makes the precedence of multiplication over addition and subtraction 
% less visually apparent.
% That's why we provide the |\mul| macro, to avoid the large space surrounding |\times|:
% \begin{center}
%     $\lambda+\alpha \mul b-\beta \mul c$, obtained with |\mul|,
% looks better than $\lambda+\alpha \times b-\beta \times c$.
% \end{center}
%
% Using |\mul| before a function name works also well (since v3.1) without the need 
% of curly braces to avoid the additional space before the operator name:
% |$x\mul\sin x$| yields $x\mul{\sin x}$.
%
% \medskip
% \DescribeMacro{\abs} \DeleteShortVerb{\|}
% The \cs{abs} command typesets the absolute value while properly handling spacing, 
% unlike \texttt{|}\ldots\texttt{|}. Compare $\abs{-x}$, 
% obtained with \cs{abs}, to $|-x|$ without. 
% Using the \cs{lvert} and \cs{rvert} delimiters presents another issue when 
% the absolute value follows a function name; for instance \verb@\ln\lvert x\rvert@ yields 
% $\ln \lvert x\rvert$
% instead of $\ln\abs{x}$ (with \verb@\ln\abs{x}@). 
% Moreover, with \cs{abs}, the delimiters automatically adapt to the content
% \footnote{You could also define \cs{abs} 
% using \cs{DeclarePairedDelimiter} 
% from the \mbox{\textsf{mathtools}} package~\cite{TOOL}, but you get the same bad result
% $\ln\absol{x}$.}. 
% \MakeShortVerb{\|}
%
% \medskip
% \DescribeMacro{\card}
% The cardinality of a set $S$ is most commonly denoted by $\card{S}$,
% though it may also be denoted by $\#S$, $n(S)$, $\lbar{S}$ or $\mathup{card}(S)$,
% the latter being commonly used in French mathematics
% \footnote{The \textsf{frenchmath} package~\cite{FR} defines \cs{card} this way,
% and \textsf{mismath} will not overwrite it.}.
% We define |\card| as an alias for |\abs| but, to prevent incompatibility, our definition
% is delayed until the beginning of the document,
% after checking whether |\card| is already defined.
% Thus, another definition made in the preamble will be preserved; for instance, you can use
% |\newcommand{\card}{\#}| in the preamble before or after loading \textsf{mismath}.
% 
%\medskip
% \DescribeMacro{\floor}
% The |\floor| macro is a substitute for |{\left\lfloor... \right\rfloor}|;
% compare $q=-\floor{-\frac{a}{b}}$ obtained with |\floor| with 
% $q=-\left\lfloor-\frac{a}{b}\right\rfloor$.
%
% \medskip
% \DescribeMacro{\pow}
% When typesetting an exponent after a closing \emph{big} 
% parenthesis produced by |\right)| but also |\mright)|,
% the exponent appears to be a little too far from the parenthesis.
% To address this issue, the |\pow|\marg{expr}\marg{pow} command is provided,
% which places \meta{expr} in a pair of parentheses and
% sets the exponent \meta{pow}
% slightly closer to the right parenthesis
% \footnote{Since version 3.3, the \cs{pow} macro works also with normal-sized arguments
% while keeping the exponent correctly positioned.}.
% Compare
% \[ \e^a =\!\lim_{n \to +\infty}\pow{1+\frac{a}{n}}{n}, 
%     \text{ obtained with \texttt{\string \pow}, with } 
%     \e^a =\!\lim_{n \to +\infty}\left(1+\frac{a}{n}\right)^{n}.
% \]
%
% \medskip
% When using a |\left| \ldots |\right| structure, 
% \TeX\ sets additional surrounding space in some situations.
% The \textsf{mleftright}~\cite{MLR} package, loaded by \textsf{mismath},
% offers the variants |\mleft| and |\mright|
% to address these spacing issues in inner formulas.
% It also provides the |\mleftright| macro, which redefines |\left| as |\mleft|
% and |\right| as |\mright|. Compare
% \begin{center}
%     $\sin\left(\frac{\pi}{3}\right)\mul 2$ with
%     $\sin\mleft(\frac{\pi}{3}\mright)\mul 2$ obtained with
%     |$\sin\mleft(\frac{\pi}{3}\mright)\mul 2$|.
% \end{center}
%
% \DescribeMacro{\lfrac}
% The |\lfrac| macro behaves like |\frac|
% but with additional spacing around the arguments,
% making the corresponding fraction bar slightly longer. 
% This macro has an optional parameter |\lfrac|\oarg{space}\marg{num}\marg{denom}
% to adjust the length of the fraction bar. The optional \meta{space} argument must be given
% with \emph{math units} (\texttt{mu}); 
% the default value is \texttt{7mu} (equivalent to |\:\,|).
% See the following examples,
% the last one is obtained with |\lfrac[4mu]{1}{\sqrt{x}}|: 
% \[ \lbar{Z} = \lfrac{\lbar{z_1-z_2}}{\lbar{z_1+z_2}}, \qquad
%     u(x)= \lfrac{\frac{1-2x}{5}}{x^2+1}, \qquad
%     y'+xy=\lfrac[4mu]{1}{\sqrt{x}}.
% \]
% \hypertarget{ibrackets}{}
%
% \DescribeOption{ibrackets}
% Open intervals are commonly represented with parenthesis, \eg $(0, +\infty)$,
% but several authors use square brackets, especially in French mathematics: $]0, +\infty[$.
% In that case, the space around the square brackets is generally inappropriate, 
% as in the expression $x \in \mathclose{]} 0, +\infty[$.
% To address this issue, you can use the \mbox{\textsf{ibrackets}}
% package~\cite{BRACKET}.
% It can also be loaded by \textsf{mismath} using the \texttt{ibrackets} package option.
% Thus |$x\in ]-\pi,0[ \cup ]2\pi,3\pi[$|
% \begin{align*}
%     \mbox{yields \ } 
%     x\in ]-\pi, 0[ \cup ]2\pi, 3\pi[ & \mbox{\ with \textsf{ibrackets}}, \\
%     \mbox{instead of \ }
%     x\in \mathclose{]}-\pi, 0 \mathopen{[} \cup \mathclose{]} 2\pi, 3\pi \mathopen{[} 
%     &\mbox{\ without \textsf{ibrackets}}.
% \end{align*}
%
% However, when the left bound is followed by an operator sign,
% \emph{you do not have to leave a space between the first bracket and the sign},
% otherwise, the spaces surrounding the operator will be too large.
% For example if you write |$x \in ] -\infty, 0]$|, it yields $x \in  ] -\infty, 0]$
% instead of $x \in  ]-\infty, 0]$.
% Conversely, when dealing with algebraic expressions involving intervals,
% \emph{you must leave a space between the second bracket and the} +/- 
% \emph{operation}.
% For instance |$[a,b] +[c,d]$| yields $[a,b] +[c,d]$
% but |$[a,b]+ [c,d]$| yields $[a, b]+ [c, d]$.
%
% \medskip
% Note that there are other ways to proceed,
% for example with |\interval|,
% from the \textsf{interval} package~\cite{INT},
% or with |\DeclarePairedDelimiter|
% \footnote{You cannot use \cs{DeclarePairedDelimiter} with square brackets 
% when \textsf{ibrackets} is loaded.}
% from \mbox{\textsf{mathtools}}~\cite{TOOL}.
% \hypertarget{decimalcomma}{}
%
% \medskip
% \DescribeOption{decimalcomma}
% In many countries, except, in particular, in English-speaking countries, 
% the comma is used as a decimal separator for numbers. 
% However, in the math mode of \LaTeX, the comma is always, by default, 
% treated as a punctuation symbol and therefore is followed by a space. 
% This is appropriate in intervals: |$[a,b]$| results in $[a,b]$,
% but not for numbers where the comma represents the decimal separator. 
% For example, |$12,5$| is displayed as $12, 5$ instead of $12{,}5$.
%
% Two very convenient packages allow handling the comma in math mode:
% \textsf{icomma} by Walter Schmidt~\cite{ICOMMA} and 
% \textsf{ncccomma} by Alexander I.~Rozhenko~\cite{NCC}.
% The latter package takes a more generic approach,
% however it poses several compatibility issues, 
% in particular when running through Lua\LaTeX, using \mbox{\textsf{unicode-math}}
% and calling |\setmathfont|.
% Therefore we propose the \textsf{decimalcomma} package~\cite{DEC},
% which is functionally equivalent to \textsf{ncccomma}, but 
% without the aforementioned incompatibility.
% It can be loaded by \textsf{mismath} using the \texttt{decimalcomma}
% package option.
%
%
% \subsection{Environments for systems of equations and small matrices}
%
% \DescribeEnv{system}
% The \texttt{system} environment, defined in the \textsf{mismath} package, 
% is intended for typesetting systems of equations:
% \begin{juxtapose}
%     \begin{verbatim}
%\[ \begin{system} 
%       x=1+2t \\ y=2-t \\ z=-3-t 
%   \end{system} \]
%     \end{verbatim}
%     \otherside \vspace{-3ex}
%     \[ \begin{system} x=1+2t \\ y=2-t \\z=-3-t \end{system}. \]
% \end{juxtapose}
%
% \DescribeMacro{\systemsep}
% This first example could also have been achieved using the \texttt{cases} environment
% from the \textsf{amsmath} package, although \texttt{cases} places mathematical expressions 
% closer to the opening brace.
% The |\systemsep| length can be used to adjust the gap between 
% the opening brace and the mathematical expressions. 
% By default, the gap is set to |\medspace|. You can reduce this gap by redefining 
% the command, \eg |\renewcommand{\systemsep}{\thinspace}|.
% Alternatively you can increase the gap using |\thickspace|;
% the same spacing as in the \texttt{cases} environment 
% being obtained with |\renewcommand{\systemsep}{}|.
%
% \medskip
% By default, a system is written like an \texttt{array} environment with only one column, 
% left aligned. However the \texttt{system} environment has an optional 
% argument for creating systems with multiple columns,
% specifying their alignment using the same syntax as the \texttt{array} environment in
% \LaTeX. For instance, using |\begin{system}[cl]| will produce a two-column system, 
% with the first column centered and
% the second column left-aligned, as shown in the following example:
% \begin{juxtapose}
%     \begin{verbatim}
%\[ \begin{system}[cl] 
%       y & =\dfrac{1}{2}x-2 \\[1ex] 
%       (x,y) & \neq (0,-2) 
%   \end{system} \]
%     \end{verbatim}
%     \otherside \vspace{-2ex}
%     \[ \begin{system}[cl] y&=\dfrac{1}{2}x-2 \\[1ex] (x,y)&\neq (0,-2) \end{system}.\]
% \end{juxtapose}
%
% \DescribeMacro{\systemstretch}
% The default row spacing in a \texttt{system} environment has been slightly 
% enlarged compared to the one used in \texttt{array} environments (using a factor of 1.2). 
% This can be adjusted by using
% |\renewcommand{\systemstretch}|\marg{stretch}, where \meta{stretch} is the desired factor
% for the spacing. You can place this command 
% inside the current mathematical environment for a local change, or outside 
% for a global change. The default value is 1.2.
% Furthermore you can use the optional argument of the line-break command, as 
% demonstrated above with |\\[1ex]|, to control the spacing between specific lines in
% the system.
%
% Another example with |\begin{system}[rl@{\quad}l]|
% \footnote{\texttt{@\{\ldots\}} sets inter-column space.}:
% \begin{equation*}
%     \begin{system}[rl@{\quad}l]
%         x+3y+5z&=0 & R_1\\ 2x+2y-z&=3 & R_2\\ 3x-y+z&=2 & R_3
%     \end{system}
%     \iff
%     \begin{system}[rl@{\quad}l]
%         x+3y+5z&=0 & R_1\\
%         4y+11z&=3 & R_2 \gets 2R_1-R_2 \\
%         5y+7z&=-1 & R_3 \gets \frac{1}{2}\left(3R_1-R_3\right)
%     \end{system}.
% \end{equation*}
% 
% We should also mention the \textsf{systeme} package~\cite{SYST}, which provides 
% a lighter syntax and automatic alignments for linear systems.
% Additionally, there is the \textsf{spalign} package~\cite{SPAL},
% which offers a convenient and easy syntax for systems and matrices with
% visually appealing alignments.
%
% \medskip
% \DescribeEnv{spmatrix}
% The \textsf{amsmath} package offers several environments to typeset matrices:
% for example, the \texttt{pmatrix} environment surrounds the matrix with parentheses,
% and the \texttt{smallmatrix} environment creates a smaller matrix suitable for insertion 
% within a text line. We provide the \texttt{spmatrix} environment 
% that combines these two features:
% |$\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$| yielding
% $\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$.
%
% The \textsf{mathtools} package enhances the \textsf{amsmath} matrix environments
% and also provides a small matrix environment with parentheses: \texttt{psmallmatrix}.
% Moreover, with the starred version |\begin{psmallmatrix*}|\oarg{col},
% you can choose the alignment inside the columns (\texttt{c}, \texttt{l} or \texttt{r}).
% However, the spacing before the opening parenthesis is unfortunately too narrow
% compared to the spacing inside the parentheses.
% To illustrate this, consider the following example:
% $\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$ (using \textsf{mismath}'s \texttt{spmatrix})
% vs.\@ $\vec{u}\begin{psmallmatrix}-1\\2\end{psmallmatrix}$ 
% (using \textsf{mathtools}' \texttt{psmallmatrix} environment).
%
% \medskip
% For more sophisticated  matrix layouts, let us mention the excellent 
% \textsf{nicematrix} package by François Pantigny~\cite{NMATX}.
%
%
% \subsection{Displaymath in double columns}
%
% \DescribeEnv{mathcols}
% The \texttt{mathcols} environment is particularly useful for long calculations whose 
% successive steps are short enough to fit comfortably in two columns 
% separated by a vertical rule, as shown in the following example
% \footnote{Unlike mathematical constants, physical constants (here $\varepsilon_0$
% and $c$) do not have to be typeset in upright shape, but in italics,
% roman being reserved for physical units~\cite{TYPMA}~\cite{NIST}~\cite{ICTNS}.}.
% To use this environment, the \textsf{multicol} package must be loaded in the preamble.
% The \texttt{mathcols} environment automatically enters display math mode
% and uses the \texttt{aligned} environment (from \textsf{amsmath}).
% \def\denom{4\pi\varepsilon_0 r^2}
% \begin{mathcols}
%     & \frac{\gamma e^2}{\denom}
%       - \frac{1}{\gamma}\frac{e^2}{\denom} \\
%  =\ & \frac{\gamma e^2}{\denom} \left(1-\frac{1}{\gamma^2}\right)\\
%     & (\text{with } \frac{1}{\gamma^2} = 1- \beta^2) \\
% \changecol
%     & = e(\beta c) \left(\frac{\beta}{c}\frac{\gamma e}{\denom}\right)\\
%     & = ev \frac{\beta}{c}\frac{\gamma e}{\denom} \\
%     & = ev \frac{\beta}{c}E.
% \end{mathcols}
%
% \DescribeMacro{\changecol}
% The |\changecol| macro is used to switch to the next column,
% and alignment within each column is achieved using the usual alignment markers |&| and |\\|.
% 
% \begin{verbatim}
% \def\denom{4\pi\varepsilon_0 r^2}
% \begin{mathcols}
%     & \frac{\gamma e^2}{\denom}
%       - \frac{1}{\gamma}\frac{e^2}{\denom} \\
%  =\ & \frac{\gamma e^2}{\denom} \left(1-\frac{1}{\gamma^2}\right)\\
%     & (\text{with } \frac{1}{\gamma^2} = 1- \beta^2) \\
% \changecol
%     & = e(\beta c) \left(\frac{\beta}{c}\frac{\gamma e}{\denom}\right)\\
%     & = ev \frac{\beta}{c}\frac{\gamma e}{\denom} \\
%     & = ev \frac{\beta}{c}E.
% \end{mathcols}
% \end{verbatim}
%
%
% \vspace{-5ex}
% \subsection{Greek letters for mathematical constants and operators} \label{s:greek}
%
% The main macro of this section is |\specialgreeks| which will be presented 
% after |\specialgreeksdef|.
% \apply\SpecialMacroIndex{\numpi,\numphi,\numgamma,\opDelta,\opdelta,\opGamma,%
%     \opzeta,\opsigma,\opPhi}
%
% \medskip
% \DescribeMacro{\specialgreeksdef}
% The macro |\specialgreeksdef|\marg{font} defines the following commands:
% \begin{center}
%     |\numpi, \numphi, \numgamma,| \\ 
%     |\opDelta, \opdelta, \opGamma, \opzeta, \opsigma, \opPhi|.
% \end{center}
% The first three are classic mathematical constants, |\numphi| represents the golden ratio
% and |\numgamma| the Euler-Mascheroni constant:
% \[ \numphi = \frac{1+\sqrt{5}}{2}, \quad 
%     \numgamma = \!\lim_{n \to +\infty} \left(\sum_{k=1}^{n}\frac{1}{k}-\ln n\right), \quad 
%     \opGamma(z)=\frac{\e^{\numgamma z}}{z}\prod_{n=1}^{\infty}\frac{n\e^{\frac{z}{n}}}{n+z}.
% \]
%
% They are typeset upright, as are the constants $\e$, $\i$, and $\j$.
% The six remaining commands, |\opDelta|, |\opdelta|, etc., concerning standard operators,
% have been presented in section \ref{s:op}.
% The special Greek letters defined as operators are also available 
% as ordinary mathematical symbols through commands prefixed with \texttt{spe} 
% instead of \texttt{op} : |\speDelta, \spedelta|\ldots
% \apply\SpecialMacroIndex{\speDelta,\spedelta,\speGamma,\spezeta,\spesigma,\spePhi}
%
% \medskip
% By default in \LaTeX, Greek lowercase letters are in italic type. 
% However many packages provide these letters in upright shape. 
% With |\specialgreeksdef|, you don't need to install such a package.
% It is possible to pick only the glyphs that correspond to the aforementioned commands
% without altering the default Greek letters.
% The \meta{font} argument of |\specialgreeksdef| is
% of the type \texttt{key=value}. The key name corresponds to a package
% providing the desired glyphs.
% The following table summarizes the available options.
% When a key is given without a value, a default value is associated,
% see the list following the table.
%
% \begin{center}
% \setlength{\extrarowheight}{1pt}
% \begin{tabular}{>{\ttfamily}l>{$}l<{$}@{}}
%     \hline
%     {\normalfont Option} lgrmath=... & \mbox{Result} \\
%     \hline
%     Alegreya-LF & \apply\Alegreya{112,102,103,68,100,71,122,115,70} \\
%     Cochineal-LF & \apply\Cochineal{112,102,103,68,100,71,122,115,70}\\
%     LibertinusSerif-LF & \apply\LibSerif{112,102,103,68,100,71,122,115,70} \\
%     LibertinusSans-LF & \apply\LibSans{112,102,103,68,100,71,122,115,70} \\
%     NotoSerif-LF & \apply\noto{112,102,103,68,100,71,122,115,70} \\
%     gentium & \apply\gentium{112,102,103,68,100,71,122,115,70} \\
%     lmr & \apply\lmr{112,102,103,68,100,71,122,115,70} \\
%     lmss & \apply\lmss{112,102,103,68,100,71,122,115,70} \\
%     \hline
% \end{tabular}
% \hfill
% \begin{tabular}{>{\ttfamily}l>{$}l<{$}@{}}
%     \hline
%     \normalfont Other options & \mbox{Result} \\
%     \hline
%     fontspec=\ldots & \ldots \\
%     upgreek=Symbol & \apply\Symbol{`p,`j,`g,`D,`d,`G,`z,`s,`F} \\
%     upgreek=Euler & \apply\Euler{25,39,13,1,14,0,16,27,8} \\
%     mathdesign & \apply\Charter{25,39,13,1,14,0,16,27,8} \\
%     kpfonts & \apply\kp{25,39,13,1,14,0,16,27,8} \\
%     fourier & \pifour\,\phifour\,\gammafour\,\Deltafour\,\deltafour\,%
%         \Gammafour\,\zetafour\,\sigmafour\,\Phifour \\
%     pxfonts & \apply\px{25,39,13,1,14,0,16,27,8} \\
%     txfonts & \apply\tx{25,39,13,1,14,0,16,27,8} \\
%     \hline
% \end{tabular}
% \end{center}
%
% \medskip
% \begin{itemize}
%
% \item With the \texttt{lgrmath} key, we actually have numerous possibilities 
% for values (any Greek letters math font in LGR encoding). 
% The documentation of the \textsf{lgrmath}
% package~\cite{LGR} by Jean-François Burnol explains how to check and visualize 
% all available LGR fonts on your distribution.
% We have only presented a few of them. The default value is \texttt{lmr}.
% It is well-suited for use with the Latin Modern roman font family
% \footnote{Glyphs look similar as those provided by \texttt{lgrmath=cmr}.}
% and has been used in the present document.
% When using \textsf{beamer}, you should invoke a sans-serif font family like \texttt{lmss}.
% Other interesting values are 
% \texttt{droidserif}, \texttt{fct}, \texttt{llcmss}, \texttt{Clara-TLF}\ldots
%
% \item Some sigma characters appearing in the previous table with the
% \texttt{lgrmath} option do not have the correct typeface. This is due to
% the commands used in the table but will not occur with normal use.
% For instance, the sigma produced by the current \texttt{lmr} key value is
% $\opsigma$ and not \lmr{115}.
% Conversely, phi has sometimes an alternative shape 
% that is noticeable and correct in the table, 
% \eg \Alegreya{102} with Alegreya-LF font, but it's a commonly used glyph.
%
% \item With the \texttt{fontspec} key, there are also many possible values,
% corresponding to the TrueType or OpenType fonts installed on your system
% (works with \LuaLaTeX\ or \XeLaTeX).
% See the \textsf{mathgreeks} documentation~\cite{MGREEK} for examples.
% The default value is \texttt{GFS Dido}.
% You can also use the \texttt{fontspec} key option,
% to obtain any font 
% that is supported by the \textsf{unicode-math}
% |\setmathfont| command,
% \eg |\specialgreeksdef{fontspec=STIX Two Math}|.
%
% \item With the \texttt{upgreek} key, the default value is \texttt{Symbol}. 
% There is a third possible value, \texttt{Symbolsmallscale}, 
% which provides the same characters as \texttt{Symbol} but reduced in size by 10\,\%.
%
% \item With the \texttt{mathdesign} key, there are actually 3 possible values: 
% \texttt{Utopia}, \texttt{Garamond} or \texttt{Charter} (the default value), 
% but the glyphs obtained look quite similar.
%
% \item With the \texttt{kpfonts} key, we have two possible values: 
% \texttt{normal} (default) and \texttt{light}. The option \texttt{kpfonts=light}
% provides slightly less bold characters.
%
% \item The last keys, \texttt{fourier} (based on Utopia), \texttt{pxfonts} 
% (based on Palatino),
% \texttt{txfonts} (based on Times)
% are booleans whose default value is \texttt{true} (when called).
% The \texttt{txfonts} key yields the same glyph as \texttt{lgrmath=txr}.
%
% \end{itemize}
% If your current math font already includes upright Greek letters,
% you can however call this font with |\specialgreeksdef| to produce the mentioned macros,
% provided this font is supported in any previous key option.
% This is interesting in particular to get the operators.
% 
% \medskip
% \DescribeMacro{\mmoperator}
% The symbol font declared in |\specialgreeksdef| is called \texttt{mmupgr}, 
% thus, you can pick another Greek letter 
% in the same font with the following syntax, \eg
% \begin{center}
%     |\DeclareMathSymbol{\spepsi}{\mathalpha}{mmupgr}{121}|. 
% \end{center}
% The argument number depends on the encoding scheme, here 121 is psi in LGR encoding.
% The previous command yields the psi character in upright shape: \lmr{121}.
% To create the corresponding operator, declare
% \footnote{The macro \cs{operatorname} gives
% no output with LGR encoded fonts nor with \texttt{fontspec}.}
% \begin{center}
%     |\newcommand\oppsi{\mmoperator{\spepsi}}|.
% \end{center}
%
% \DescribeMacro{\specialgreeks}
% The effect of this main macro is to replace |\pi| with |\numpi|,
% among other choices,
% or likewise with any other special Greek letter presented in this section.
% The syntax of the macro is
% \begin{center}
%     |\specialgreeks|\oarg{font}\marg{letters}.
% \end{center}
% The optional \meta{font} argument is passed to |\specialgreeksdef|
% and can be used only in the preamble.
%
% The mandatory argument \meta{letters} is a list of the type \texttt{key=value}.
% The possible keys are one of the letters 
% \begin{center}\ttfamily
%     pi, phi, gamma, Delta, delta, Gamma, zeta, sigma, Phi.
% \end{center}
% Each key has a default value which correspond to the \emph{characters} produced by
% |\specialgreeksdef|: \texttt{numpi, numphi, numgamma, speDelta,\ldots\ spePhi,}
% thus you can invoke only the key name. For instance
% \begin{center}
%     |\specialgreeks[lgrmath=gentium]{pi,delta,Gamma}|
% \end{center}
% will replace |\pi| with |\numpi|, |\delta| with |\opdelta| and |\Gamma| with |\opGamma|
% in the LGR encoding gentium font.
%
% Then, the italic type $\itpi$ will be replaced 
% with an upright gentium \gentium{112}
% each time |\pi| is called. \emph{Thus} |\specialgreeks| \emph{makes your document compliant 
% with standards without changing the source code of your mathematical formulas.}
%
% \medskip
% Why are the default values corresponding to operators be named as 
% \texttt{spedelta}, \texttt{speDelta}\ldots and not
% \texttt{opdelta}, \texttt{opDelta}\ldots?
% If you have loaded a package that already provides upright Greek letters,
% you can simply specify the name of the desired character to substitute,
% \eg 
% \begin{center}
%     |\usepackage{newtxmath}\specialgreeks{pi=piup,sigma=sigmaup}|.
% \end{center}
% In that case the command |\pi| will be defined as an alias for |\piup|,
% but |\sigma| will be defined as an operator based on |\sigmaup|
% not simply an alias,
% and no other special character macro will be created,
% except that the original |\pi| and |\sigma| will be saved as
% |\orginalpi| and |\originalsigma|.
%
% \medskip
% \DescribeMacro{\normalgreeks}
% Moreover |\specialgreeks| works as a switch,
% |\normalgreeks| being the inverse switch.
% It takes the same keys argument than |\specialgreeks| but any associated value
% is ignored.
% So you can use |\specialgreeks| and |\normalgreeks|
% in the document body, not only in the preamble.
%
% \medskip
% \DescribeMacro{\pinumber}\DescribeMacro{\pinormal}
% For compatibility reasons with versions prior to 3.3,
% these two macros are maintained for now, but 
% |\specialgreeks| and |\normalgreeks| are extended alternatives.
% The behavior of |\pinumber| and |\pinormal| is as follows:
% \begin{itemize}
%     \item You must first call |\pinumber| in the preamble with an optional argument which
%     is either a command name (without the backslash) to produce an upright pi, or it is
%     passed to |\specialgreeksdef| to define a Greek font. But unlike |\specialgreeks|,
%     when no optional argument is given, \texttt{lgrmath=lmr} is chosen by default.
%     Then |\pi| is replaced by |\numpi| and saved in |\savedpi|.
% \item |\pinormal| is the inverse switch which brings back |\pi| to |\originalpi|.
% \item When used again outside the preamble, |\pinumber| acts as a switch to restore
%     |\pi| as |\savedpi|.
% \end{itemize}
%
%
% \subsection{Summary of package options and comments on single-letter macros}
%
% The following table summarizes the possible package options. 
% You can add to them any option you want to pass to \textsf{amsmath} or \textsf{mathtools}.
% The hyperlinks (in blue) redirect to the paragraphs in the documentation 
% where these options are described.
% \begin{center}
% \setlength{\extrarowheight}{1pt}
% \begin{tabular}{>{\ttfamily}ll}
%     \hline
%     \normalfont Option & \mbox{Effect} \\
%     \hline
%     \hyperlink{nofunction}{nofunction} & don't load the additional function definitions \\
%     \hyperlink{classicReIm}{classicReIm} & preserves |\Re| and |\Im|
%         as $\oldRe$ and $\oldIm$ \\
%     \hyperlink{lineargroups}{lineargroups} & loads macros for classic linear group names \\
%     \hyperlink{textshortcuts}{textshortcuts} & loads macros for text shortcuts 
%         and abbreviations \\
%     \hyperlink{ibrackets}{ibrackets} & loads the \textsf{ibrackets} package\\
%     \hyperlink{decimalcomma}{decimalcomma} & loads the \textsf{decimalcomma} package \\
%     \hyperlink{nsletter}{nosingleletter} & don't load the single letter macros (see below) \\
%     \hline
% \end{tabular}
% \end{center}
% \hypertarget{nsletter}{}
%
% \bigskip
% \DescribeOption{nosingleletter}
% \apply\SpecialMacroIndex{\ee,\ii,\jj,\PP,\EE,\VV,\RR,\CC,\ZZ,\NN,\QQ,\HH,\FF,\KK,\OO,\UU}
% Defining single-letter \LaTeX\ macros may be regarded as a bad practice. Why is that? 
% If every package author defined their own single-letter macros, 
% we would soon end up with a maze of package incompatibilities, 
% since the Latin alphabet contains only $26 \mul 2$ letters. 
% First, let us note  that the \LaTeX\ kernel already defines a number of such macros: 
% \centeredline{|\a, \b, \c, \d, \i, \j, \k, \l, \o, \r, \t, \u, \v, \H, \L, \O, \P,|} 
% together with |\C| for Cyrillic typesetting, and probably a few others.
%
% Indeed, \textsf{mismath} does define quite a few single-letter macros: 
% \begin{center}
%     |\e, \i, \j, \P, \E, \V, \R, \C, \Z, \N, \Q, \H, \F, \K,| \\ and optionnaly |\U, \O|. 
% \end{center}
%
% First, the commands that already exist in LaTeX (|\i, \j, \P, \C, \H| and |\O|) are defined 
% specially for text mode, so defining them exclusively for math mode causes no conflict.
%
% Second, \textsf{mismath} always checks whether a macro is already defined 
% before attempting to define it. This does not completely rule out package 
% incompatibilities, but it makes them much less likely.
% In particular, loading \textsf{mismath} after another package with which it would 
% otherwise conflict is perfectly safe. 
% Conversely, if you wish to preserve a \textsf{mismath} macro that has already been defined
%  beforehand, simply write |\let\|\meta{macro}|\relax| before loading \textsf{mismath}, 
% as explained in the introduction.
%
% Finally the motivation for these single-letter macros is that they keep the 
% source code closer to standard mathematical notation, where variables, sets 
% and many mathematical objects are traditionally represented by single letters.
% This makes mathematical expressions easier to write in \LaTeX\ 
% and more natural for mathematicians.
% Moreover, such macros are already very common in users' preambles and personal macro files.
% Writing |\RR| for the set of real numbers may seem less elegant, 
% although this is ultimately a matter of taste.
%
% Nevertheless, for users who are reluctant to use such single-letter macros, 
% we provide the \texttt{nosingleletter} option, which disables all these
% single-letter macros. The corresponding double-letter commands will be defined instead:
% \begin{center}
%     |\ee, \ii, \jj, \PP, \EE, \VV, \RR, \CC, \ZZ, \NN, \QQ, \HH,| \\
%     |\FF, \KK,| and optionally |\UU, \OO.|
% \end{center}
%
% \StopEventually{}
%
%
% \section{Implementation}
%
% We load certain packages conditionally to avoid `option clash' errors in cases
% where these packages have been previously loaded with other options.
% The \textsf{amsmath} package is loaded by \textsf{mathtools}.
% The |\NewDocumentCommand| is provided by the \textsf{xparse} package, 
% but now integrated in \LaTeX3 kernel. 
% The \textsf{xparse} package is no longer needed, as its functionality 
% is now integrated into the \LaTeX\ kernel
% since the October 2020 \LaTeX\ release.
% \apply\SpecialMainOptionIndex{ibrackets,decimalcomma}
% ^^A \SpecialMainMacroIndex is placed at the end of paragraph to avoid unwanted spaces
%    \begin{macrocode}
\newif\ifmm@ibrackets % initialized to false
\DeclareOption{ibrackets}{\mm@ibracketstrue}
\newif\ifmm@decimalcomma
\DeclareOption{decimalcomma}{\mm@decimalcommatrue}
\newif\ifmm@nofunction
\DeclareOption{nofunction}{\mm@nofunctiontrue}
\DeclareOption{otherReIm}{\PackageWarningNoLine{mismath}
    {Option otherReIm is obsolete}}
\newif\ifmm@classicReIm
\DeclareOption{classicReIm}{\mm@classicReImtrue}
\newif\ifmm@lineargroups
\DeclareOption{lineargroups}{\mm@lineargroupstrue}
\newif\ifmm@textshortcuts
\DeclareOption{textshortcuts}{\mm@textshortcutstrue}
\newif\ifmm@singleletter\mm@singlelettertrue
\DeclareOption{nosingleletter}{\mm@singleletterfalse}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{mathtools}}
\ProcessOptions \relax

%\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
\@ifpackageloaded{mathtools}{}{\RequirePackage{mathtools}}
\@ifpackageloaded{esvect}{}{\RequirePackage[b]{esvect}}
\RequirePackage{mleftright}
\RequirePackage{ifthen}
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{2020-10-01}{}{\RequirePackage{xparse}}
% xparse provides \NewDocumentCommand, now in LaTeX3
\ifmm@textshortcuts
    \RequirePackage{xspace} % for textshortcuts commands
    \RequirePackage{xpunctuate} % provides \xperiod
\fi
\RequirePackage{etoolbox} % provides \AtEndPreamble and \AfterEndPreamble
\RequirePackage{xkeyval} % for \specialgreeksdef options

%    \end{macrocode}
%
% The package \textsf{unicode-math} causes some compatibility issues
% with \textsf{ibrackets} and \textsf{decimalcomma}: theses packages
% must be loaded \emph{after} \textsf{unicode-math},
% but \textsf{mismath} (like \textsf{amsmath}) should be loaded \emph{before} 
% \textsf{unicode-math}.
% And to complicate matters, \mbox{\textsf{unicode-math}} defines all its commands 
% by |\AtBeginDocument|.
% Therefore we used the command |\AtEndPreamble|, from the \textsf{etoolbox} package,
% which makes the job (because both \textsf{ibrackets} and \textsf{decimalcomma}
% work also in |\AtBeginDocument|).
%
%    \begin{macrocode}
\@ifpackageloaded{unicode-math}{
    \PackageWarningNoLine{mismath}{The package unicode-math\MessageBreak 
        should be loaded after mismath}
}{}
\newif\ifmm@multicol
\newif\ifmm@unicodemath
\AtEndPreamble{
    \ifmm@decimalcomma\RequirePackage{decimalcomma}\fi
    \ifmm@ibrackets\RequirePackage{ibrackets}\fi
    \@ifpackageloaded{multicol}{\mm@multicoltrue}{}
    \@ifpackageloaded{unicode-math}{\mm@unicodemathtrue}{}
    \@ifpackageloaded{lua-unicode-math}{\mm@unicodemathtrue}{}
}

%    \end{macrocode}
%
% \medskip
% \ShowMainMacroIndex{\bslash}
% The |\bslash| macro originates from Frank Mittelbach's \textsf{doc.sty} package. 
% It can be employed as an alternative to |\textbackslash|,
% especially in situations where |\textbackslash| does not work correctly, such as
% inside warning messages.
%    \begin{macrocode}
{\catcode`\|=\z@ \catcode`\\=12 |gdef|bslash{\}} % \bslash command

%    \end{macrocode}
%
% The next three internal macros are generic tools for conditionally defining macros 
% and issuing a warning if the macro already exists..
%
% \begin{macro}{\mm@warning}
%    \begin{macrocode}
\newcommand\mm@warning[1]{
    \PackageWarningNoLine{mismath}{Command \bslash #1 already exists 
        \MessageBreak and will not be redefined}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\mm@macro}
%    \begin{macrocode}
\newcommand\mm@macro[2]{
    \@ifundefined{#1}{
        \expandafter\def\csname #1\endcsname{#2}
    }{\mm@warning{#1}}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\mm@operator}
%    \begin{macrocode}
\NewDocumentCommand\mm@operator{O{#3}mm}{%
    \@ifundefined{#1}{
        \DeclareMathOperator{#2}{#3}
    }{\mm@warning{#1}}
}
    
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\mathup}
% To produce the correct upright shape font when working 
% with the \textsf{beamer} package, you don't have to use |\mathrm|
% but rather |\mathup| (based on |\operatorfont| from the \textsf{amsopn} package).
% This command also works fine with other sans serif fonts like \textsf{cmbright}.
%
% \DescribeMacro[noindex]{\e}% \DescribeMacro[noindex]{\i}% \DescribeMacro[noindex]{\j}
% Moreover for \textsf{beamer}, which changes the default font family (to sans serif),
% |\e|, |\i|, |\j| have no effect without |\AtBeginDocument| and
% |\AtBeginDocument| is also necessary to redefine |\i| when calling 
% the \textsf{hyperref} package which overwrites the |\i| definition.
% \SpecialMainMacroIndex{\e}\SpecialMainMacroIndex{\i}\SpecialMainMacroIndex{\j}
%
%    \begin{macrocode}
\@ifundefined{mathup}{
    \newcommand*{\mathup}[1]{{\operatorfont #1}}
    }{\mm@warning{mathup} } % also in kpfonts and unicode-math
    
\ifmm@singleletter
    \mm@macro{e}{\mathup{e}}
    \AtBeginDocument{\let\oldi\i \let\oldj\j
        \renewcommand{\i}{\TextOrMath{\oldi}{\mathup{i}}}
        \renewcommand{\j}{\TextOrMath{\oldj}{\mathup{j}}} }
\fi

%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\MathFamily}
% The following macros |\MathUp| and |\MathIt| are toggles that transform 
% any chosen letter in math mode to roman or italic style. 
% These switches can be used anywhere in the document or the preamble.
% They are based on the generic macro |\MathFamily|.
% To obtain a letter in roman style instead of italic, we need to change the 
% mathcode digit that represents the font family: 1 to 0.
%
% For example, except for \LuaLaTeX, mathcode of the `e' letter is:
% e="7165 (decimal 29029), with the second digit `1' indicating ``italic'' style.
% To get a roman `e', we need to change its mathcode to "7065.
%
% When used in the preamble, we call |\MathFamily| by |\AtBeginDocument|
% for working with the \textsf{beamer} package.
% Let's notice that |\MathFamily| has an erratic behavior when \textsf{unicode-math}
% is loaded, but fortunately, in that case, the |\DeclareMathSymbol| can be
% used instead, even outside the preamble.
%
% \medskip
%    \begin{macrocode}
\newcount\mm@charcode
\newcount\mm@charclass
\newcount\mm@charfam
\newcount\mm@charslot

\newcommand*\MathFamily[2]{%
    \mm@charfam=#2
    \ifluatex
        \mm@charclass=\Umathcharclass`#1
        %\mm@charfam=\Umathcharfam`#1
        \mm@charslot=\Umathcharslot`#1
        \Umathcode`#1= \mm@charclass \mm@charfam \mm@charslot
    \else
        \mm@charcode=\mathcode`#1
        % extract charclass
        \@tempcnta=\mm@charcode
        \divide\@tempcnta by "1000
        \multiply\@tempcnta by "1000 % charclass
        \mm@charclass=\@tempcnta
        % extract charslot
        \@tempcnta=\mm@charcode
        \@tempcntb=\mm@charcode
        \divide\@tempcnta by "100
        \multiply\@tempcnta by "100 % charclass + charfam
        \advance\@tempcntb by -\@tempcnta % charslot
        \mm@charslot=\@tempcntb
        % construct charcode
        \mm@charcode=\mm@charclass
        \multiply\mm@charfam by "100
        \advance\mm@charcode by \mm@charfam
        \advance\mm@charcode by \mm@charslot
        \mathcode`#1=\mm@charcode
    \fi
}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\MathUp}
%    \begin{macrocode}
\newcommand*\@MathUp[1]{
    \@ifpackageloaded{unicode-math}{
        \DeclareMathSymbol{#1}{\mathalpha}{operators}{`#1}
    }{
        \MathFamily{#1}{0}
    }
}

\newcommand*\MathUp[1]{%
    \ifx\@onlypreamble\@notprerr % not in preamble
        \@MathUp{#1}
    \else % in preamble
        \AtBeginDocument{\@MathUp{#1}}
    \fi
}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\MathIt}
%    \begin{macrocode}
\newcommand*\@MathIt[1]{
    \@ifpackageloaded{unicode-math}{
        \DeclareMathSymbol{#1}{\mathalpha}{letters}{`#1}
    }{
        \MathFamily{#1}{1}
    }
}

\newcommand*\MathIt[1]{%
    \ifx\@onlypreamble\@notprerr % not in preamble
        \@MathIt{#1}
    \else % in preamble
      \AtBeginDocument{\@MathIt{#1}}
    \fi
}

%    \end{macrocode}
% \end{macro}
% With a similar approach we could also create additional macros to set any letter
% in bold or sans serif. However, there is no default family number associated 
% with these typefaces. The family number depends on the font package being loaded and
% may vary depending on specific |\DeclareSymbolFont| used.
% Therefore, setting letters in bold or sans serif requires additional consideration 
% and may not have a straightforward solution.
%
% \medskip
% \begin{macro}{\MathNumbers}
% In addition to |\MathUp| and |\MathIt|, we also offer the following command
% to set a group of letters, among `e, i, j', in roman family.
%    \begin{macrocode}
\newcommand*\MathNumbers[1]{%
    \in@{e}{#1} \ifin@ \MathUp{e} \fi
    \in@{i}{#1} \ifin@ \MathUp{i} \fi
    \in@{j}{#1} \ifin@ \MathUp{j} \fi
}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\apply}
% With the inverse switch |\MathNormal|, you can apply the normal (italic) style 
% on any comma-separated list of characters. This is achieved using
% the powerful macro |\apply|, \eg |\apply\macro{arg1,arg2}|
% expands to |\macro{arg1}\macro{arg2}|.
% So |\apply\MathUp{e,i,j}| is equivalent to |\MathUp{e}\MathUp{i}\MathUp{j}|.
% I discovered this powerful macro on \texttt{iterate190.rssing.com} by searching for 
% ``TeX How to iterate over a comma separated list''.
% The answer was posted under the pseudonym `wipet' on 2021/02/26.
% Let its author, Petr Ol\v{s}ák, be thanked.
% This macro allows to accomplish tasks that
% usual loop instructions like |\@for| or |\foreach| cannot achieve due to
% errors like ``\texttt{!~Improper alphabetic constant}''.
% For example, if you try |\def\letter{A} \MathUp{\letter}| it will fail.
%
% \medskip
%    \begin{macrocode}
\def\apply#1#2{\apply@#1#2,\apply@,}
\def\apply@#1#2,{\ifx\apply@#2\empty
    \else #1{#2}\afterfi@{\apply@#1}\fi}
\def\afterfi@#1#2\fi{\fi#1}

%    \end{macrocode}
% \ShowMainMacroIndex{\MathNormal}
% Apply |\MathIt| on a list argument.
%    \begin{macrocode} 
\newcommand*\MathNormal[1]{\apply\MathIt{#1} }

%    \end{macrocode}
% \end{macro}
%
% \apply\ShowMainMacroIndex{\enumber,\inumber,\jnumber}
% The following commands were used originally (until version 2.2)
% to set the math letters e, i or j in upright shape,
% but only worked in the preamble.
% This is now handled by the more powerful |\MathUp| command, but
% the old commands are maintained as alias for |\MathUp|. 
%
%    \begin{macrocode}
\mm@macro{enumber}{\MathUp{e}}
\mm@macro{inumber}{\MathUp{i}}
\mm@macro{jnumber}{\MathUp{j}}

%    \end{macrocode}
%
% Commands for vectors and tensors follow.
%
% \apply\ShowMainMacroIndex{\arrowvect,\boldvect,\boldvectcommand}
%    \begin{macrocode}
\newboolean{arrowvect}
\setboolean{arrowvect}{true}
\newcommand{\arrowvect}{\setboolean{arrowvect}{true}} 
\newcommand{\boldvect}{\setboolean{arrowvect}{false}}
\newcommand{\boldvectcommand}{\boldsymbol} % from amsbsy package
%    \end{macrocode}
% \apply\ShowMainMacroIndex{\vect,\hvect,\hvec}
%    \begin{macrocode}
\mm@macro{vect}{\ifthenelse{\boolean{arrowvect}}{
    \vv}{\boldvectcommand}} % \if...\fi doesn't work reliably here
\newcommand*{\hvect}[1]{\vect{\vphantom{t}#1}}
\newcommand*{\hvec}[1]{\vec{\vphantom{t}#1}}

%    \end{macrocode}
% \begin{macro}{\norm}
% We first define the macro corresponding to |\norm*| with alternatives for
% the four math styles: displaystyle, textstyle, scriptstyle and scriptscriptstyle.
% Then the macro |\norm| chooses between the starred version and the
% classic |\left\Vert| \ldots |\right\Vert| structure, depending on the difference
% between the height and depth of the argument.
%    \begin{macrocode}
\newcommand*{\@norm}[1]{
    \mbox{\raisebox{1.75pt}{\small$\bigl\Vert$}} #1
    \mbox{\raisebox{1.75pt}{\small$\bigr\Vert$}} }
% Absolute lengths work better here than relative lengths
\newcommand*{\@@norm}[1]{
    \mbox{\footnotesize\raisebox{1pt}{$\Vert$}} #1
    \mbox{\footnotesize\raisebox{1pt}{$\Vert$}} }
\newcommand*{\@@@norm}[1]{
    \mbox{\tiny\raisebox{1pt}{$\Vert$}} #1
    \mbox{\tiny\raisebox{1pt}{$\Vert$}} }
\newcommand*{\norm@star}[1]{
    \mathchoice{\@norm{#1}}{\@norm{#1}}{\@@norm{#1}}{\@@@norm{#1}} }
\newcommand*{\mm@norm}[1]{
    \sbox\@tempboxa{$#1$}
    \@tempdima=\ht\@tempboxa
    \@tempdimb=\dp\@tempboxa
    \addtolength{\@tempdima}{-\@tempdimb}
    \ifdim \@tempdima < 1.85ex
        \left\lVert #1 \right\rVert
    \else
        \norm@star{#1}
    \fi
}
\mm@macro{norm}{\@ifstar{\norm@star}{\mm@norm}}   

%    \end{macrocode}
% \end{macro}
% \ShowMainMacroIndex{\innerprod}
%    \begin{macrocode}
\@ifundefined{innerprod}{
    \newcommand*\innerprod[2]{\left\langle #1, #2\right\rangle}}{
    \mm@warning{innerprod} }
    
%    \end{macrocode}
%
% \begin{macro}{\di}
% Operators, as for example common function names, are generally defined 
% using the |\DeclareMathOperator| command or |\operatorname| for occasional use. 
% Operators are then typeset in roman, thanks to |\operatorfont|,
% and with appropriate thin space before and after the operator name.
% However, for the `differential' operator d, no space should be left after it 
% to obtain, for example, `$\di x$' instead of `$\operatorname{d} x$'.
%
% \medskip
% Two other operators, suggested by `quark67', are provided to represent differences 
% or variations: |\opDelta| and |\opdelta|. 
% They use the Greek letters $\speDelta$ and $\spedelta$ with appropriate spacing, 
% similar to |\di|. Romain Noël suggested to enhance \textsf{mismath}
% with other special functions usually represented by Greek letters: $\opGamma, \opzeta$.
% Since this involves more sophisticated code and usage, 
% the handling of Greek letters is deferred to the end.
%
%    \begin{macrocode}
\mm@macro{di}{\operatorname{d}\mathopen{}}

%    \end{macrocode}
% \end{macro}
%
% \apply\ShowMainMacroIndex{\P,\E,\V}
% For the domain of probability, we provide the macros |\P|, |\E|, and |\V|, 
% which are defined as operators. They are typeset in roman, as for any operator, 
% but this can be changed to double-struck style (or another style) if desired.
% \apply\SpecialMainMacroIndex{\probastyle,\Par}
%
%    \begin{macrocode}
\newcommand\probastyle{}
\ifmm@singleletter
    \let\Par\P % end of paragraph symbol
    \renewcommand{\P}{\TextOrMath{\Par}{\operatorname{\probastyle{P}}}}
    \mm@macro{E}{\operatorname{\probastyle{E}}}
    \mm@macro{V}{\operatorname{\probastyle{V}}}
\fi

\newcommand*\MathProba[1]{%
    \PackageWarning{mismath}{The macro \string\MathProba\space
    is obsolete \MessageBreak and no longer supported}
}

%    \end{macrocode}
% \DescribeOption[noindex]{nofunction}
% Standard operators and function identifiers are presented below. They are defined only
% if the option \texttt{nofunction} has not been enabled.
% \SpecialMainOptionIndex{nofunction}
% \apply\SpecialMainMacroIndex{\adj,\Aut,\codim,\codom,\coker,\Conv,\Cov,\cov,\curl,\divg,\dom,
%     \End,\erf,\grad,\Hv,\id,\Id,\im,\lb,\lcm,\ord,\ran,
%     \rank,\Res,\rot,\sgn,\sinc,\spa,\supp,\tr,\Var,\var,\Zu}
% \apply\SpecialMainMacroIndex{\arccot,\sech,\csch,\arsinh,\arcosh,\artanh,%
%     \arcoth,\arsech,\arcsch}
% \apply\SpecialMainMacroIndex{\FT,\LT}
% \medskip
%    \begin{macrocode}
\ifmm@nofunction\else
    \mm@operator{\adj}{adj}
    \mm@operator{\Aut}{Aut}
    \mm@operator{\codim}{codim}
    \mm@operator{\codom}{codom}
    \mm@operator{\coker}{coker}
    \mm@operator{\Conv}{Conv}
    \mm@operator{\cov}{cov}
    \mm@operator{\Cov}{Cov}
    \mm@macro{curl}{\operatorname{\vect{\mathup{curl}}}}
    \mm@operator[divg]{\divg}{div}
    \mm@operator{\dom}{dom}
    
    \mm@operator{\End}{End}    
    \mm@operator{\erf}{erf}
    \mm@macro{grad}{\operatorname{\vect{\mathup{grad}}}}
    \mm@operator[Hv]{\Hv}{H}
    \mm@operator{\id}{id} % mathop or mathord?
    \mm@operator{\Id}{Id}
    \mm@operator{\im}{im}
    \mm@operator{\lb}{lb}
    \mm@operator{\lcm}{lcm}
    \mm@operator{\ord}{ord}
    \mm@operator{\ran}{ran}  
     
    \mm@operator{\rank}{rank}   
    \mm@operator{\Res}{Res}
    \mm@macro{rot}{\operatorname{\vect{\mathup{rot}}}}
    \mm@operator{\sgn}{sgn}
    \mm@operator{\sinc}{sinc}
    \mm@operator[spa]{\spa}{span}
    \mm@operator{\supp}{supp}
    \mm@operator{\tr}{tr}
    \mm@operator{\var}{var}
    \mm@operator{\Var}{Var}
    \mm@operator[Zu]{\Zu}{Z}
    
    \mm@operator{\arccot}{arccot}
    \mm@operator{\sech}{sech}
    \mm@operator{\csch}{csch}
    \mm@operator{\arsinh}{arsinh}
    \mm@operator{\arcosh}{arcosh}
    \mm@operator{\artanh}{artanh}
    \mm@operator{\arcoth}{arcoth}
    \mm@operator{\arsech}{arsech}
    \mm@operator{\arcsch}{arcsch}

    \mm@operator[FT]{\FT}{\mathcal{F}}
    \mm@operator[LT]{\LT}{\mathcal{L}}
\fi

%    \end{macrocode}
% \apply\ShowMainMacroIndex{\Re,\Im}
% If \textsf{unicode-math} is loaded, it will redefine the commands |\Re| and |\Im|
% in |\AtBeginDocument|. Hence |\AfterEndPreamble|\ldots
% is used to ensure that the \textsf{mismath} redefinitions occur 
% after those made by \textsf{unicode-math}.
% \apply\SpecialMainMacroIndex{\oldRe,\oldIm}
% \SpecialMainOptionIndex{classicReIm}
%
%    \begin{macrocode}
\AtEndPreamble{\AtBeginDocument{% cannot be replaced by \AfterEndPreamble
    \ifmm@classicReIm\else
        \let\oldRe\Re \let\oldIm\Im
        \let\Re\relax \let\Im\relax
        \DeclareMathOperator{\Re}{Re} % only in preamble
        \DeclareMathOperator{\Im}{Im}
    \fi
}}

%    \end{macrocode}
% \apply\ShowMainMacroIndex{\bigO,\bigo,\lito}
% The following operators are easily defined thanks to |\mm@operator|.
%    \begin{macrocode}
\mm@operator[bigO]{\bigO}{\mathcal{O}} 
\mm@operator[bigo]{\bigo}{O}
\mm@operator[lito]{\lito}{o}

%    \end{macrocode}
% \DescribeOption[noindex]{lineargroups}
% The redefinition of |\O| is specific to math mode. It is not overwritten by \textsf{beamer}
% or \textsf{unicode-math}.
%\SpecialMainOptionIndex{lineargroups}
% \apply\SpecialMainMacroIndex{\GL,\SL,\Sp,\O,\SO,\U,\SU}
%    \begin{macrocode}
\ifmm@lineargroups
    \mm@operator{\GL}{GL}
    \mm@operator{\SL}{SL}
    \mm@operator{\Sp}{Sp}
    \ifmm@singleletter   
        \let\oldO\O
        \renewcommand{\O}{\TextOrMath{\oldO}{\operatorname{O}}}
        \mm@operator{\U}{U}
    \fi
    \mm@operator{\SO}{SO}
    \mm@operator{\SU}{SU}
\fi

%    \end{macrocode}
%
% \DescribeMacro[noindex]{\C}
% When using a Cyrillic language, the command |\C| may already be defined, 
% but only for use in text mode.
% In that case, \textsf{mismath} redefines |\C| to be used in math mode 
% without interfering with its existing text-mode definition.
% The test is delayed with |\AfterEndPreamble|.
% The redefinition of |\H| concerns only math mode. It is not overwritten by \textsf{beamer}
% or \textsf{unicode-math}.
% \apply\SpecialMainMacroIndex{\mathset,\R,\C,\Z,\N,\Q,\H,\F,\K}
% 
% \medskip
%    \begin{macrocode}
\mm@macro{mathset}{\mathbf}
\ifmm@singleletter
    \mm@macro{R}{\mathset{R}}
    \AfterEndPreamble{%
        \@ifundefined{C}{\newcommand{\C}{\mathset{C}}}{
            \let\oldC\C
            \renewcommand{\C}{\TextOrMath{\oldC}{\mathset{C}}}
        }
    }
    \providecommand\onlymathC{\PackageWarning{mismath}{The macro
        \string\onlymathC\space is obsolete and no longer useful
        \MessageBreak} }
    \mm@macro{N}{\mathset{N}}
    \mm@macro{Z}{\mathset{Z}}
    \mm@macro{Q}{\mathset{Q}}
    \let\oldH\H
    \renewcommand{\H}{\TextOrMath{\oldH}{\mathset{H}}}
    \mm@macro{F}{\mathset{F}}
    \mm@macro{K}{\mathset{K}}
\fi

%    \end{macrocode}
% \apply\ShowMainMacroIndex{\ds,\dlim,\dsum,\dprod,\dcup,\dcap}
%    \begin{macrocode}
\mm@macro{ds}{\displaystyle}
\mm@macro{dlim}{\lim\limits}
\mm@macro{dsum}{\sum\limits}
\mm@macro{dprod}{\prod\limits}
\mm@macro{dcup}{\bigcup\limits}
\mm@macro{dcap}{\bigcap\limits}
%    \end{macrocode}
% \apply\ShowMainMacroIndex{\lbar,\hlbar}
% \SpecialMainMacroIndex{\upDelta}
%    \begin{macrocode}
\mm@macro{lbar}{\overline}
\@ifundefined{hlbar}{
    \newcommand*{\hlbar}[1]{\overline{\vphantom{t}#1}}}{
    \mm@warning{hlbar} }
%    \end{macrocode}
% \begin{macro}{\eqdef}
% The |\eqdef| macro also exists in the package \textsf{libertinust1math}, 
% but with {\tiny def} written very small.
% If you want to preserve the \textsf{mismath} macro, load \textsf{libertinust1math} first
% and call |\let\eqdef\relax| after it.
%    \begin{macrocode}
\newcommand\@eqdef{\stackrel{\mathup{def}}{=}}
\newcommand\@@eqdef{\@ifundefined{upDelta}{\PackageInfo{mismath}{%
    Command \string\upDelta\space is undefined in \string\eqdef*, 
    \MessageBreak
    I use \string\Delta\space instead}\stackrel{\Delta}{=}
}{\stackrel{\upDelta}{=}}}
\mm@macro{eqdef}{\@ifstar{\@@eqdef}{\@eqdef}}
%    \end{macrocode}
% \end{macro}
%
% \apply\ShowMainMacroIndex{\asympteq,\unbr,\then,\compl}
% The command |\mathclap|, used in |\asympteq|, puts its argument in a zero width box 
% and centers it, to avoid a lot of white space around the $\sim$ symbol.
%    \begin{macrocode}
\@ifundefined{asympteq}{
    \newcommand*{\asympteq}[1][]{%
        \underset{\scriptscriptstyle\mathclap{#1}}{\sim}}}{
    \mm@warning{asympteq} }
\mm@macro{unbr}{\underbrace}
\mm@macro{then}{\implies}
\@ifundefined{compl}{
    \newcommand*{\compl}[1]{#1^{\mathup{c}}} }{
    \mm@warning{compl} }

%    \end{macrocode}
%
% \begin{macro}{\integerint}
% The definition of |\integerint| is delayed with |\AtBeginDocument| to check 
% whether |\llbracket|\footnote{\cs{llbracket} and \cs{rrbracket} are provided by
% \textsf{stmaryrd} or \textsf{fourier} package.} exist, 
% or whether \mbox{\textsf{unicode-math}} or \textsf{mathabx} package 
% is loaded after \textsf{mismath}. The |\left..\right| structure may be
% useful to get the correct size with big arguments like $\integerint{2^n, 2^{2^n}}$.
% Why did this macro take only one argument and not two? This permits
% conveniently choosing another separator, \eg $\integerint{a;b}$,
% and the typing of |{a,b}| instead of |{a}{b}| is easier (I know it's a bad argument :).
%    \begin{macrocode}
\AtBeginDocument{\@ifundefined{integerint}{
    \@ifundefined{llbracket}{
        \ifmm@unicodemath
            \newcommand*\integerint[1]{\left\lBrack #1\right\rBrack}
        \else\@ifpackageloaded{mathabx}{
            \newcommand*\integerint[1]{\left\ldbrack #1\right\rdbrack}
            }{
            \newcommand\integerint{\PackageError{mismath}{The 
            \string\integerint\space macro requires either stmaryrd
            or fourier or unicode-math or mathabx package}{Load stmaryrd
            or fourier or unicode-math or mathabx in your preamble.} }
            }
        \fi
        }{\newcommand*\integerint[1]{\left\llbracket #1\right\rrbracket}}
    }{\mm@warning{integerint} }
}

%    \end{macrocode}
% \end{macro}
%
% \ShowMainMacroIndex{\tensor}
% The command |\mathbfsfit| (used for tensors) is already defined
% in \textsf{unicode-math} or \textsf{lua-unicode-math} and will not be redefined if
% these packages are loaded even after \textsf{mismath}.
% \SpecialMainMacroIndex{\mathbfsfit}
%    \begin{macrocode}
\AtBeginDocument{
    \@ifundefined{mathbfsfit}{% used by unicode-math and lua-unicode-math
        \DeclareMathAlphabet{\mathbfsfit}{\encodingdefault}%
            {\sfdefault}{bx}{it}
    }{\mm@warning{mathbfsfit}} % isomath uses \mathsfbfit
}
\mm@macro{tensor}{\mathbfsfit} 

%    \end{macrocode}
%
% \DescribeOption[noindex]{textshortcuts}\SpecialMainOptionIndex{textshortcuts}
% The following text shortcuts have a starred version (except |\QED|), 
% which generally produces an abbreviation with periods.
% When the abbreviation is not followed by a character, 
% the last period must be followed by a normal space by using |\@|.
% But when there is a punctuation symbol immediately after, for example a comma,
% |\@| causes an issue.  This is why we used |\xspace| from the eponym package.
% For abbreviations that may end a sentence, the spacing may be larger.
% Then put |\@| after the macro.
% The ``iff'' abbreviation does not correspond to the initial letters of the expression,
% thus we didn't put any period in it. It is possible to place a period at the end
% as is customary in the US. The macro |\iff| already existed and had to be redefined,
% to be used in math or in text mode.
% \apply\SpecialMainMacroIndex{\QED,\ale,\cc,\iff,\st,\stp,\walog,\wma,\wrt}
% \apply\SpecialMainMacroIndex{\Walog,\Wma,\Wrt}
%    \begin{macrocode}
\ifmm@textshortcuts
    \mm@macro{QED}{Q.E.D.}
    \@ifundefined{ale}{
        \NewDocumentCommand{\ale}{s}{\IfBooleanTF#1{a.e\xperiod}%
            {almost everywhere\xspace}}
    }{\mm@warning{ale}}
    \@ifundefined{cc}{
        \NewDocumentCommand{\cc}{s}{\IfBooleanTF#1{c.c\xperiod}%
            {complex conjugate\xspace}}
    }{\mm@warning{cc}}
    \let\iffmath\iff
        \RenewDocumentCommand{\iff}{s}{\IfBooleanTF#1{iff\xspace}%
            {\TextOrMath{if and only if\xspace}{\iffmath}}}
    \@ifundefined{st}{
        \NewDocumentCommand{\st}{s}{\IfBooleanTF#1{s.t.\@\xspace}%
            {such that\xspace}}
    }{\mm@warning{st}}
    \@ifundefined{stp}{
    \NewDocumentCommand{\stp}{s}{\IfBooleanTF#1{s.t.p.\@\xspace}%
        {sufficient to prove\xspace}}
    }{\mm@warning{stp}}
    \@ifundefined{walog}{
        \NewDocumentCommand{\walog}{s}{\IfBooleanTF#1{w.a.l.o.g\xperiod}%
        {without any loss of generality\xspace}}
    }{\mm@warning{walog}}
    \@ifundefined{wma}{
        \NewDocumentCommand{\wma}{s}{\IfBooleanTF#1{w.m.a.\@\xspace}%
            {we may assume\xspace}}
    }{\mm@warning{wma}}
    \@ifundefined{wrt}{
        \NewDocumentCommand{\wrt}{s}{\IfBooleanTF#1{w.r.t.\@\xspace}%
            {with respect to\xspace}}
    }{\mm@warning{wrt}}
    \@ifundefined{Walog}{
        \NewDocumentCommand{\Walog}{s}{\IfBooleanTF#1{W.a.l.o.g.%
            \@\xspace}{Without any loss of generality\xspace}}
    }{\mm@warning{Walog}}
    \@ifundefined{Wma}{
        \NewDocumentCommand{\Wma}{s}{\IfBooleanTF#1{W.m.a.\@\xspace}%
            {We may assume\xspace}}
    }{\mm@warning{Wma}}
    \@ifundefined{Wrt}{
        \NewDocumentCommand{\Wrt}{s}{\IfBooleanTF#1{W.r.t.\@\xspace}%
            {With respect to\xspace}}
    }{\mm@warning{Wrt}}
\fi

%    \end{macrocode}
%
% \apply\ShowMainMacroIndex{\txt,\mul,\abs,\card,\floor,\pow,\lfrac}
% The |\mul| macro has better spacing when |\mathclose{}| comes first 
% and |\mathopen{}| comes last.
% Compare $\sin\!\left(\frac{\pi}{3}\right)\mul 2$ with
% $\sin\!\left(\frac{\pi}{3}\right)\mathopen{}\mathord{\times}\mathclose{} 2$.
% For |\abs| and |\floor|, the |\left...\right| structure is inserted 
% within a pair of curly braces
% to prevent incorrect spacing before the first delimiter when it follows a function name,
% in cases where the package \textsf{mleftright} is used 
% with the command |\mleftright| activated.
% Compare $\ln \abs{x}$ with $\ln\mleft\vert x \mright\vert$.
% This issue was pointed out by `quark67'.
% The |\card| definition is delayed with |\AtBeginDocument| in case another package 
% or the user has provided its own definition in the preamble.
%    \begin{macrocode}
\@ifundefined{txt}{
    \newcommand*{\txt}[1]{\quad\text{#1}\quad} }{
    \mm@warning{txt} }
\mm@macro{mul}{\mathclose{}\mathord{\times}\mathopen{}}
\@ifundefined{abs}{
    \newcommand*{\abs}[1]{{\left\vert#1\right\vert}} }{
    \mm@warning{abs} }
\AtBeginDocument{\mm@macro{card}{\abs}}
\@ifundefined{floor}{
    \newcommand*{\floor}[1]{{\left\lfloor #1 \right\rfloor}} }{
    \mm@warning{floor} }
\@ifundefined{pow}{\newcommand*{\pow}[2]{%
    \sbox\@tempboxa{$#1$}
    \@tempdima=\ht\@tempboxa
    \addtolength{\@tempdima}{-0.5ex}
    \@tempdimb=\dp\@tempboxa
    \addtolength{\@tempdimb}{0.5ex}
    \ifdim \@tempdima > \@tempdimb
        \@tempdimc=\@tempdima
    \else
        \@tempdimc=\@tempdimb
    \fi
    \ifdim \@tempdimc < 1.27ex
        \left(#1 \right)^{#2}
    \else
        \left(#1 \right)^{\!#2}
    \fi}
    }{\mm@warning{pow} }
\@ifundefined{lfrac}{
    \newcommand*{\lfrac}[3][7mu]{%
        \frac{\mkern#1#2\mkern#1}{\mkern#1#3\mkern#1}} }{
    \mm@warning{lfrac} }

%    \end{macrocode}
% \apply\SpecialMainMacroIndex{\systemstretch,\systemsep}
% \begin{environment}{system}
%    \begin{macrocode}
\newcommand{\systemstretch}{1.2}
\newcommand{\systemsep}{\medspace}
\newenvironment{system}[1][l]{
    \renewcommand{\arraystretch}{\systemstretch}
    \setlength{\arraycolsep}{0.15em}
    \left\{\begin{array}{@{\systemsep}#1@{}} %
}{\end{array}\right.}

%    \end{macrocode}
% \end{environment}
% \begin{environment}{spmatrix}
%    \begin{macrocode}
\newenvironment{spmatrix}{
    \left(\begin{smallmatrix}
}{\end{smallmatrix}\right)}

%    \end{macrocode}
% \end{environment}
% \begin{environment}{mathcols}
%    \begin{macrocode}
\newenvironment{mathcols}{% requires multicol to be loaded
  \ifmm@multicol
    \renewcommand{\columnseprule}{0.1pt}
    \begin{multicols}{2}
        \par\noindent\hfill
        \begin{math}\begin{aligned}\displaystyle
  \else
    \PackageError{mismath}{The mathcols environment
        requires the multicol package}{Load the multicol package
        in your preamble.}
  \fi
}{       \end{aligned}\end{math} \hfill\mbox{}
    \end{multicols}
}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\changecol}
%    \begin{macrocode}
\newcommand{\changecol}{%
    \end{aligned}\end{math} \hfill\mbox{}
    \par\noindent\hfill
    \begin{math}\begin{aligned}\displaystyle}
     
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\specialgreeksdef}
% |\specialgreeksdef| takes key-value options to 
% choose a Greek letter font without loading
% an entire package, thus without altering the other (italic) Greek letters. 
% We achieve this with |\DeclareSymbolFont| and |\DeclareMathSymbol|.
% We simply have to know the name of the desired symbol font
% and the codes of the desired letters.
% \apply\SpecialMainMacroIndex{\numpi,\numgamma,\numphi,\spedelta,\speDelta,\speGamma,%
%     \spezeta,\spesigma,\spePhi}
% 
% \medskip
%    \begin{macrocode}
\newif\ifmm@lgrmath
\define@cmdkey{specialgreeksdef}[mm@]{lgrmath}[lmr]{\mm@lgrmathtrue}
\newif\ifmm@upgreek \newif\ifmm@upgreekSymbol
\define@choicekey{specialgreeksdef}{upgreek}[\mm@upgreek@option]%
    {Euler,Symbol,Symbolsmallscale}[Symbol]{\mm@upgreektrue}
\newif\ifmm@mathdesign
\define@choicekey{specialgreeksdef}{mathdesign}[\mm@mathdesign@option]%
    {Utopia,Garamond,Charter}[Charter]{\mm@mathdesigntrue}
\newif\ifmm@kpfonts
\define@choicekey{specialgreeksdef}{kpfonts}[\mm@kp@option]%
    {normal,light}[normal]{\mm@kpfontstrue}
\define@boolkeys{specialgreeksdef}[mm@]{fourier,pxfonts,txfonts}[true]
\newif\ifmm@fontspec
\define@cmdkey{specialgreeksdef}[mm@]{fontspec}[GFS Didot]%
    {\mm@fontspectrue}
  
\newcommand*\specialgreeksdef[1]{%
    \setkeys{specialgreeksdef}{#1}

    \ifmm@lgrmath
        \DeclareFontEncoding{LGR}{}{}
        \DeclareSymbolFont{mmupgr}{LGR}{\mm@lgrmath}{m}{n}
        \DeclareMathSymbol{\numpi}{\mathalpha}{mmupgr}{112}
        \DeclareMathSymbol{\numgamma}{\mathalpha}{mmupgr}{103}
        \DeclareMathSymbol{\numphi}{\mathalpha}{mmupgr}{102}
        \DeclareMathSymbol{\spedelta}{\mathalpha}{mmupgr}{100}
        \DeclareMathSymbol{\speDelta}{\mathalpha}{mmupgr}{68}
        \DeclareMathSymbol{\speGamma}{\mathalpha}{mmupgr}{71}
        \DeclareMathSymbol{\spezeta}{\mathalpha}{mmupgr}{122}
        \DeclareMathSymbol{\spesigma}{\mathalpha}{mmupgr}{115}
        \DeclareMathSymbol{\spePhi}{\mathalpha}{mmupgr}{70}

    \else\ifmm@fontspec
        \@ifpackageloaded{fontspec}{}{% unicode-math loads fontspec
            \PackageError{mismath}{\string\specialgreeksdef\space with
                the `fontspec' option\MessageBreak
                needs the fontspec or unicode-math package,\MessageBreak
                which must be run with XeLaTeX or LuaLaTeX}{}
        }
        \newfontfamily\mismathgreekfont{\mm@fontspec}[NFSSFamily=mgr]
        \DeclareSymbolFont{mmupgr}{TU}{mgr}{m}{n}
        \Umathchardef\numpi="7 \symmmupgr "03C0
        \Umathchardef\numgamma="7 \symmmupgr "03B3
        \Umathchardef\numphi="7 \symmmupgr "03C6
        \Umathchardef\spedelta="7 \symmmupgr "03B4
        \Umathchardef\speDelta="7 \symmmupgr "0394
        \Umathchardef\speGamma="7 \symmmupgr "0393
        \Umathchardef\spezeta="7 \symmmupgr "03B6
        \Umathchardef\spesigma="7 \symmmupgr "03C3
        \Umathchardef\spePhi="7 \symmmupgr "03A6

    \else\ifmm@upgreek
        \ifdefstring{\mm@upgreek@option}{Euler}{
            \DeclareFontFamily{U}{eur}{\skewchar\font'177}
            \DeclareFontShape{U}{eur}{m}{n}{%
              <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
            \DeclareSymbolFont{mmupgr}{U}{eur}{m}{n}
        }{
        \ifdefstring{\mm@upgreek@option}{Symbol}{
            \DeclareSymbolFont{mmupgr}{U}{psy}{m}{n}
            \mm@upgreekSymboltrue
        }{
        \ifdefstring{\mm@upgreek@option}{Symbolsmallscale}{
            \DeclareFontFamily{U}{fsy}{}
            \DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
            \DeclareSymbolFont{mmupgr}{U}{fsy}{m}{n}
            \mm@upgreekSymboltrue
        }{}}}
        \fi
    \ifmm@upgreekSymbol
        \DeclareMathSymbol{\numpi}{\mathalpha}{mmupgr}{`p}
        \DeclareMathSymbol{\numgamma}{\mathalpha}{mmupgr}{`g}
        \DeclareMathSymbol{\numphi}{\mathalpha}{mmupgr}{`j} % varphi
        \DeclareMathSymbol{\spedelta}{\mathalpha}{mmupgr}{`d}
        \DeclareMathSymbol{\speDelta}{\mathalpha}{mmupgr}{`D}
        \DeclareMathSymbol{\speGamma}{\mathalpha}{mmupgr}{`G}
        \DeclareMathSymbol{\spezeta}{\mathalpha}{mmupgr}{`z}
        \DeclareMathSymbol{\spesigma}{\mathalpha}{mmupgr}{`s}
        \DeclareMathSymbol{\spePhi}{\mathalpha}{mmupgr}{`F}
    
    \else\ifmm@mathdesign
        \ifdefstring{\mm@mathdesign@option}{Utopia}{
            \DeclareSymbolFont{mmupgr}{OML}{mdput}{m}{n}
        }{
        \ifdefstring{\mm@mathdesign@option}{Garamond}{
            \DeclareSymbolFont{mmupgr}{OML}{mdugm}{m}{n}
        }{
        \ifdefstring{\mm@mathdesign@option}{Charter}{
            \DeclareSymbolFont{mmupgr}{OML}{mdbch}{m}{n}
        }{}}}

    \else\ifmm@fourier
        \DeclareFontEncoding{FML}{}{}
        \DeclareFontSubstitution{FML}{futm}{m}{it}
        \DeclareSymbolFont{mmupgr}{FML}{futm}{m}{it}

    \else\ifmm@kpfonts
        \ifdefstring{\mm@kp@option}{normal}{
            \DeclareSymbolFont{mmupgr}{U}{jkpmia}{m}{it}
        }{
        \ifdefstring{\mm@kp@option}{light}{
            \DeclareSymbolFont{mmupgr}{U}{jkplmia}{m}{it}
        }{}}

    \else\ifmm@pxfonts
        \DeclareSymbolFont{mmupgr}{U}{pxmia}{m}{it}

    \else\ifmm@txfonts
        \DeclareSymbolFont{mmupgr}{U}{txmia}{m}{it}

    \fi\fi\fi\fi\fi
    % The following codes are common to the OML-based symbol fonts
        \DeclareMathSymbol{\numpi}{\mathalpha}{mmupgr}{"19}
        \DeclareMathSymbol{\numgamma}{\mathalpha}{mmupgr}{"0D}
        \DeclareMathSymbol{\numphi}{\mathalpha}{mmupgr}{"27} % varphi
        \DeclareMathSymbol{\spedelta}{\mathalpha}{mmupgr}{"0E}
        \DeclareMathSymbol{\speDelta}{\mathalpha}{mmupgr}{"01}
        \DeclareMathSymbol{\speGamma}{\mathalpha}{mmupgr}{"00}
        \DeclareMathSymbol{\spezeta}{\mathalpha}{mmupgr}{"10}
        \DeclareMathSymbol{\spesigma}{\mathalpha}{mmupgr}{"1B}
        \DeclareMathSymbol{\spePhi}{\mathalpha}{mmupgr}{"08}
    \fi\fi\fi
%    \end{macrocode}
% \apply\ShowMainMacroIndex{\opDelta,\opdelta,\opGamma,\opzeta,\opsigma,\opPhi}
% Operators |\opDelta|, |\opdelta|\ldots are defined at the end using |\mmoperator|.
%    \begin{macrocode}
    % \operatorname (and \DeclareMathOperator) do not work correctly.
    \mm@macro{opDelta}{\mmoperator{\speDelta}}
    \mm@macro{opdelta}{\mmoperator{\spedelta}}
    \mm@macro{opGamma}{\mmoperator{\speGamma}}
    \mm@macro{opzeta}{\mmoperator{\spezeta}}
    \mm@macro{opsigma}{\mmoperator{\spesigma}}
    \mm@macro{opPhi}{\mmoperator{\spePhi}}
}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\mmoperator}
% This macro is inspired by \textsf{amsmath}'s |\operatorname|, but without |\operatorfont|, 
% which is not supported by some Greek-letter fonts.
%    \begin{macrocode}
\newcommand*{\mmoperator}[1]{\mathop{\newmcodes@\kern\z@#1}\nolimits%
    \mathclose{}}
    
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setspecialgreeks}
% First we define booleans, keys and values for |\setspecialgreeks|.
% Compatibility with \textsf{unicode-math} is a bit tricky!
%    \begin{macrocode}
\newif\ifmm@setpi
\define@cmdkey{specialgreeks}[mm@]{pi}[numpi]{\mm@setpitrue}
\newif\ifmm@setphi
\define@cmdkey{specialgreeks}[mm@]{phi}[numphi]{\mm@setphitrue}
\newif\ifmm@setgamma
\define@cmdkey{specialgreeks}[mm@]{gamma}[numgamma]{\mm@setgammatrue}
\newif\ifmm@setDelta
\define@cmdkey{specialgreeks}[mm@]{Delta}[speDelta]{\mm@setDeltatrue}
\newif\ifmm@setdelta
\define@cmdkey{specialgreeks}[mm@]{delta}[spedelta]{\mm@setdeltatrue}
\newif\ifmm@setGamma
\define@cmdkey{specialgreeks}[mm@]{Gamma}[speGamma]{\mm@setGammatrue}
\newif\ifmm@setzeta
\define@cmdkey{specialgreeks}[mm@]{zeta}[spezeta]{\mm@setzetatrue}
\newif\ifmm@setsigma
\define@cmdkey{specialgreeks}[mm@]{sigma}[spesigma]{\mm@setsigmatrue}
\newif\ifmm@setPhi
\define@cmdkey{specialgreeks}[mm@]{Phi}[spePhi]{\mm@setPhitrue}

\newcommand*\mm@specialgreeks@err[1]{\PackageError{mismath}{Command
    \bslash #1 is unknown, \MessageBreak
    you can't use #1 as key value \MessageBreak
    in \string\specialgreeks\space argument}{See documentation}
}

\newcommand*\mm@setgreeknumber[3]{%
    \@ifundefined{#2}{
        \mm@specialgreeks@err{#2}
    }{
        \@ifundefined{original#1}{%
            \expandafter\let\csname original#1\expandafter\endcsname
                \csname#1\endcsname
        }{}
        \ifthenelse{\boolean{mm@unicodemath}\AND\equal{#2}{up#1}}{%
            \expandafter\renewcommand\csname#1\endcsname{%
                \symup{\symbol{#3}}}
        }{%
            \expandafter\renewcommand\csname#1\endcsname{%
                \csname#2\endcsname}
        }
    }
}

\newcommand*\mm@setgreekoperator[3]{%
    \@ifundefined{#2}{
        \mm@specialgreeks@err{#2}
    }{
        \@ifundefined{original#1}{%
            \expandafter\let\csname original#1\expandafter\endcsname
                \csname#1\endcsname
        }{}
        \ifthenelse{\boolean{mm@unicodemath}\AND\equal{#2}{up#1}}{%
            \expandafter\def\csname mm@#1\endcsname{%
                \symup{\symbol{#3}}}%
            \expandafter\renewcommand\csname#1\endcsname{%
                \expandafter\mmoperator\csname mm@#1\endcsname}
        }{%
            \expandafter\renewcommand\csname#1\endcsname{%
                \expandafter\mmoperator\csname#2\endcsname}
        }
    }
}

\newcommand*\setspecialgreeks[1]{
    \setkeys{specialgreeks}{#1}
     \@ifpackageloaded{unicode-math}{\mm@unicodemathtrue}{}
     
	\ifmm@setpi
	    \mm@setgreeknumber{pi}{\mm@pi}{"03C0}
	    \mm@setpifalse
	\fi
	\ifmm@setphi
	    \mm@setgreeknumber{phi}{\mm@phi}{"03C6}
	    \mm@setphifalse
	\fi
	\ifmm@setgamma
	    \mm@setgreeknumber{gamma}{\mm@gamma}{"03B3}
	    \mm@setgammafalse
	\fi
	\ifmm@setDelta
	    \mm@setgreekoperator{Delta}{\mm@Delta}{"0394}
	    \mm@setDeltafalse
	\fi
	\ifmm@setdelta
	    \mm@setgreekoperator{delta}{\mm@delta}{"03B4}
	    \mm@setdeltafalse
	\fi
	\ifmm@setGamma
	    \mm@setgreekoperator{Gamma}{\mm@Gamma}{"0393}
	    \mm@setGammafalse
	\fi
	\ifmm@setzeta
	    \mm@setgreekoperator{zeta}{\mm@zeta}{"03B6}
	    \mm@setzetafalse
	\fi
	\ifmm@setsigma
	    \mm@setgreekoperator{sigma}{\mm@sigma}{"03C3}
	    \mm@setsigmafalse
	\fi
	\ifmm@setPhi
	    \mm@setgreekoperator{Phi}{\mm@Phi}{"03A6}
	    \mm@setPhifalse
	\fi
}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{specialgreeks}
% Command substitutions are delayed within
% |\AfterEndPreamble| when \textsf{unicode-math} or \textsf{mathgreeks} is loaded, 
% to avoid being overwritten by these packages, which also make delayed redefinitions.
%    \begin{macrocode}
\newif\ifspecialgreeks@delayed

\newcommand*\specialgreeks[2][]{%
    \ifx\@onlypreamble\@notprerr % not in preamble
        \ifthenelse{\equal{#1}{}}{}{\PackageWarning{mismath}{The 
            optional argument of \string\specialgreeks\space is ignored
            \MessageBreak out of the preamble}
        }
        \setspecialgreeks{#2}  
    \else % in the preamble
        \ifthenelse{\equal{#1}{}}{}{\specialgreeksdef{#1}}        
        \@ifpackageloaded{unicode-math}{\specialgreeks@delayedtrue}{}
        \@ifpackageloaded{mathgreeks}{\specialgreeks@delayedtrue}{}
        \ifspecialgreeks@delayed
            \AfterEndPreamble{\setspecialgreeks{#2}}
        \else
            \setspecialgreeks{#2}
        \fi
    \fi
}

%    \end{macrocode}
% \end{macro}
% \begin{macro}{\normalgreeks}
%    \begin{macrocode}
\newcommand*\mm@normalgreeks[1]{%
    \@ifundefined{original#1}{\PackageWarning{mismath}{Command
    \bslash original#1 is undefined, I'll do nothing\MessageBreak}
        }{\expandafter\let\csname #1\expandafter\endcsname
            \csname original#1\endcsname}
}

\newcommand*\normalgreeks[1]{%
    \setkeys{specialgreeks}{#1}
    \ifmm@setpi \mm@normalgreeks{pi}\mm@setpifalse \fi
    \ifmm@setphi \mm@normalgreeks{phi}\mm@setphifalse \fi
    \ifmm@setgamma \mm@normalgreeks{gamma}\mm@setgammafalse \fi
    \ifmm@setDelta \mm@normalgreeks{Delta}\mm@setDeltafalse \fi
    \ifmm@setdelta \mm@normalgreeks{delta}\mm@setdeltafalse \fi
    \ifmm@setGamma \mm@normalgreeks{Gamma}\mm@setGammafalse \fi
    \ifmm@setzeta \mm@normalgreeks{zeta}\mm@setzetafalse \fi
    \ifmm@setsigma \mm@normalgreeks{sigma}\mm@setsigmafalse \fi
    \ifmm@setPhi \mm@normalgreeks{Phi}\mm@setPhifalse \fi
}
  
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\pinumber}
%    \begin{macrocode} 
\newcommand*\pinumber[1][]{% kept for compatibility
    \ifthenelse{\equal{#1}{}}{% no optional argument
        \ifx\@onlypreamble\@notprerr % not in preamble
            \@ifundefined{savedpi}{
                \PackageWarning{mismath}{%
                    \string\pinumber\space
                    must be used in the preamble first\MessageBreak}
            }{\let\pi\savedpi}
        \else % in the preamble, \AfterEndPreamble doesn't work
            \AtEndPreamble{\AtBeginDocument{
                \let\originalpi\pi
                \specialgreeksdef{lgrmath}
                \let\savedpi\pi
            }}
        \fi
    }{% command name or keyval option, necessarily in the preamble
        \AtEndPreamble{\AtBeginDocument{% could be \AfterEndPreamble
            \let\originalpi\pi
            \@ifundefined{#1}{\specialgreeksdef{#1} % keyval option
                \renewcommand{\pi}{\numpi}
            }{% known command name
            \@ifpackageloaded{unicode-math}{\mm@unicodemathtrue}{}
            \ifthenelse{\boolean{mm@unicodemath}\AND\equal{#1}{uppi}}{%
                \renewcommand\pi{\symup{\symbol{"03C0}}}
            }{\renewcommand{\pi}{\csname #1\endcsname}} 
            }
            \let\savedpi\pi
        }}
      }
}

%    \end{macrocode}
% \end{macro}
% \ShowMainMacroIndex{\pinormal}
%    \begin{macrocode}
\newcommand{\pinormal}{\normalgreeks{pi}}

%    \end{macrocode}
% 
% \DescribeOption[noindex]{nosingleletter}
% If the option \texttt{nosingleletter} is passed to the package,
% the single-letter macros will not be defined. 
% Instead, the corresponding double-letter commands will be defined.
% \SpecialMainOptionIndex{nosingleletter}
% \apply\SpecialMainMacroIndex{\ee,\ii,\jj,\PP,\EE,\VV,\RR,\CC,\ZZ,\NN,\QQ,\HH,\FF,\KK,\OO,\UU}
%    \begin{macrocode}
\ifmm@singleletter\else
    \mm@macro{ee}{\mathup{e}}
    \mm@macro{ii}{\mathup{i}}
    \mm@macro{jj}{\mathup{j}}
    \mm@macro{PP}{\operatorname{\probastyle{P}}}
    \mm@macro{EE}{\operatorname{\probastyle{E}}}
    \mm@macro{VV}{\operatorname{\probastyle{V}}}
    \mm@macro{RR}{\mathset{R}}
    \mm@macro{CC}{\mathset{C}}
    \mm@macro{NN}{\mathset{N}}
    \mm@macro{ZZ}{\mathset{Z}}
    \mm@macro{QQ}{\mathset{Q}}
    \mm@macro{HH}{\mathset{H}}    
    \mm@macro{FF}{\mathset{F}}
    \mm@macro{KK}{\mathset{K}} 
    \ifmm@lineargroups
        \mm@operator[OO]{\OO}{O}
        \mm@operator[UU]{\UU}{U}
    \fi   
\fi
%    \end{macrocode}
%
% \pagebreak
% \section[Change history, references, index]{Change history}
% ^^A\section*{Annexes}\addcontentsline{toc}{section}{\protect\numberline{}Annexes}
%
%
% \begin{multicols}{2}\begin{raggedright}
% \renewcommand\changes[3]{\item[#1 \ (#2)] \mbox{}\\ #3}
% \setlength{\compactlistindent}{-1em}
% \begin{list}{}{\setlength\labelwidth{1.4em}\setlength{\leftmargin}{2em}
%     \setlength{\parsep}{0pt}}
%
% \changes{v0.1}{2011/12/27}{First personal version.}
%
% \changes{v1.0}{2019/04/11}{Initial published version.}
%
% \changes{v1.1}{2019/04/20}{
%    Changing the default font for \cs{pinumber} from Euler to Symbol.}
%
% \changes{v1.2}{2019/04/27}{
%  \begin{compactlist}
%    \item placing commands \cs{enumber}, \cs{inumber}, \cs{jnumber} in \cs{AtBeginDocument}
%    \hand works fine with \textsf{beamer} now, 
%    \item new general \cs{mm@operator} macro, 
%    \item using \cs{mathup} instead of \cs{mathrm},
%    \item including \textsf{mathtools}, 
%    \item changing `Roman' to `up' in \cs{DeclareSymbolFont}, 
%    \item changes in the documentation, 
%    \item replacing \cs{PEroman} by \cs{PEupright}.
%  \end{compactlist}}
%
% \changes{v1.3}{2019/05/08}{
%  \begin{compactlist}
%    \item using \cs{bslash} in the internal \cs{mm@warning} macro
%    to type out a control sequence whose name is given as a parameter, 
%    \item including the \textsf{mathfixs} package,
%    \item many corrections in the documentation.
%  \end{compactlist}}
%
% \changes{v1.4}{2019/05/22}{
%    Changing `up' to `UpSh' in \cs{DeclareSymbolFont} 
%        to prevent incompatibility with \textsf{unicode-math}.}
%
% \changes{v1.5}{2019/05/30}{
%  \begin{compactlist}
%    \item a solution for using \cs{mul} with \cs{frac} \hand use braces, 
%    \item adding the \cs{paren} macro.
%  \end{compactlist}}
%
% \changes{v1.6}{2019/09/06}{
%    Removing the \textsf{mathfixs} package because of problems with fractions.}
%
% \changes{v1.7}{2019/12/27}{
%    Adding a table of contents to the documentation.}
%
% \changes{v1.8}{2020/11/15}{
%    Small changes in the documentation, in particular mentioning
%    an incompatibility when using `i' with accent in \textsf{beamer} titles: 
%        (use \texttt{\textbackslash\textasciicircum i} instead of î).}
%
% \changes{v1.9}{2022/10/17}{
%  \begin{compactlist}
%    \item replacing `UpSh' with `operators' in \cs{DeclareSymbolFont},
%    \item \cs{PackageWarning} replaced by \cs{PackageWarningNoLine} for existing macros,
%    \item replacing \cs{medspace} with \cs{thickspace}  in \cs{lfrac},
%    \item changing the documentation font: from lmodern to Palatino (\textsf{mathpazo}).
%  \end{compactlist}}
%
% \changes{v1.10}{2022/10/25}{
%    Updating the \cs{pinumber} code to prevent incompatibility 
%        with the new version of the \textsf{frenchmath} package
%        (in which the default `upgreek' option has been changed from Symbol to Euler).}
%
% \changes{v2.0}{2022/11/11}{
%  \begin{compactlist}
%    \item enhancing \cs{pinumber} to use other Greek-letter packages
%        (it is no longer compatible with the previous version), 
%    \item removing \cs{paren} (useless), 
%    \item slightly modifying \cs{hvect} and \cs{hlbar} (\cs{phantom}\texttt{\{t\}}
%        instead of \cs{phantom}\texttt{\{h\}}),
%    \item several changes in the documentation 
%    (now the Charter font is used, with the \textsf{mathdesign} package).
%  \end{compactlist}}
%
% \changes{v2.1}{2022/12/26}{
%  \begin{compactlist}
%    \item including the \textsf{ibrackets} package to improve 
%    the management of square brackets,
%    \item new macros \cs{codim}, \cs{sinc}, \cs{var}, \cs{eqdef*}, 
%    \item removing the warning for the obsolete \cs{paren} command,
%    \item a small change in the \cs{norm} command (using \cs{small} for the bars),
%    \item several changes in documentation.
%  \end{compactlist}}
%
% \changes{v2.2}{2023/01/06}{
%    New option \texttt{ibrackets} to optionally load the \textsf{ibrackets} package
%    because of errors
%    when using \cs{DeclarePairedDelimiter} with square brackets.}
%
% \changes{v2.3}{2023/02/09}{
%    Introducing keyval options as alternatives to \cs{enumber}, 
%    \cs{inumber}, \cs{jnumber}, \cs{PEupright},
%    and for \textsf{ibrackets}, \cs{boldvect} and \cs{arrowvect}.}
%
% \changes{v2.4}{2023/02/18}{
%  \begin{compactlist}
%    \item new powerful macros \cs{MathUp}, \cs{MathIt} and also
%    \cs{MathNumbers}, \cs{MathProba}, \cs{MathNormal},
%    \item keyval options are no longer useful and have been removed,
%    \item forgotten loading the package \textsf{ifthen} in v2.3 
%    (causing possible issues),
%    \item no more incompatibility when using `i' with an accent in \textsf{beamer} titles.
%  \end{compactlist}}
%
% \changes{v2.5}{2023/02/23}{
%  \begin{compactlist}
%    \item unification of the code of \cs{MathUp} and \cs{MathIt},
%    \item using the new powerful macro \cs{apply} in \cs{MathNormal} to act on a list,
%    \item new \cs{tensor} command.
%  \end{compactlist}}
%
% \changes{v2.6}{2023/03/01}{
%  \begin{compactlist}
%    \item bug fix in \cs{mm@macro},
%    \item solving the incompatibility of the \cs{C} macro when using \textsf{babel} 
%        with Russian
%        (thanks to Murray Eisenberg for this bug report on TeX StackExchange),
%    \item \cs{mathrm} added in the macro \cs{eqdef*}.
%  \end{compactlist}}
%
% \changes{v2.7}{2023/03/05}{
%  \begin{compactlist}
%    \item macros for sets of numbers (\cs{R}, \cs{C}\ldots) now available only in math mode
%        (following remarks by David Carlisle and Enrico Gregorio),
%    \item special warning when loading \textsf{babel} with Russian
%        (\cs{C} will not be defined in that case).
%  \end{compactlist}}
%
% \changes{v2.8}{2023/07/26}{
%    New macro \cs{onlymathC} designed for using \cs{C} in math mode
%    when Russian language is loaded.}
%
% \changes{v2.9}{2023/12/19}{
%    New option \texttt{decimalcomma}.}
%
% \changes{v2.10}{2024/02/20}{
%  \begin{compactlist}
%    \item better compatibility with \textsf{unicode-math}
%        for the options \texttt{ibrackets}, \texttt{decimalcomma}
%        and the commands \cs{MathUp}, \cs{MathIt},
%    \item explicit error message when using \texttt{mathcols}
%        without loading the \textsf{multicol} package.
%  \end{compactlist}} 
%
% \changes{v2.11}{2024/02/26}{
%  \begin{compactlist}\setlength\compactlistindent{-0.5em}
%    \item enhancements of the \cs{pinumber} macro with keyval options:       
%        \begin{compactlist}[\dash]
%        \item no necessity to load a Greek letters package,
%        \item improvements of compatibility with \textsf{unicode-math};
%        \end{compactlist}
%    \item changing the font to Adobe Utopia with the package \textsf{fourier}.
%  \end{compactlist}}
%
% \changes{v2.12}{2024/02/29}{
%  \begin{compactlist}
%    \item the \textsf{xparse} package has been removed by mistake in v2.11,
%        causing some compatibility issues, it is loaded again by \textsf{mismath},
%    \item improvements to make \cs{pinumber} work better with \textsf{unicode-math}.
%  \end{compactlist}}
%
% \changes{v3.0}{2024/03/15}{
%  \begin{compactlist}
%    \item rewriting the \cs{pinumber} command with a new \cs{pifonts} macro,
%    \item presenting other \texttt{lgrmath} values for \cs{pinumber} in the doc,
%    \item The \cs{C} macro is now inside \cs{AtBeginDocument},
%    \item \textsf{amsmath} isn't loaded explicitly because \textsf{mathtools} loads it,
%    \item bug fix with options \texttt{decimalcomma} and \texttt{ibrackets},
%    \item new option \texttt{nofunction} to lighten the package loading,
%    \item adding macros \cs{coker} and \cs{Res} as standard operator names,
%    \item new option \texttt{classicReIm} to deactivate \cs{Im} and \cs{Re} redefinition,
%    \item new option \texttt{otherReIm} to provide an alternative writing 
%        with \texttt{cmsy} font,
%    \item removing  the \cs{PEupright} command,
%    \item default space in the \cs{lfrac} macro increased from \texttt{\textbackslash:}
%        (5mu) to 7mu,
%    \item new optional parameter for adjusting the space in \cs{lfrac},
%    \item changing the \cs{vphantom} argument in \cs{hvect}, \cs{hvec} and \cs{lbar} 
%        from `t' to `A'.
%  \end{compactlist}}
%
% \changes{v3.1}{2024/06/16}{
%  \begin{compactlist}\setlength\compactlistindent{-0.5em}
%    \item adding a change history,
%    \item bug fix with the \cs{C} macro when using \textsf{hyperref} with 
%        \LuaTeX{} or \XeTeX{} engines,
%    \item the $\Delta$ produced in \cs{eqdef*} is now obtained with \cs{upDelta}
%         (\cs{mathrm}, used before, doesn't work generally),
%    \item several relevant suggestions and remarks by `quark67':
%        \begin{compactlist}[\dash]
%            \item new macros for variations: \cs{opDelta} and \cs{opdelta},
%            \item redefinition of \cs{then} as an alias for \cs{implies},
%            \item improvement of the \cs{abs} macro,
%            \item including the \textsf{mleftright} package;
%        \end{compactlist}
%    \item new implementation of \cs{di},
%    \item improvement of the \cs{mul} macro.
%  \end{compactlist}}
%
% \changes{v3.2}{2025/10/08}{
%  \begin{compactlist}
%    \item conditional loading of the \textsf{xparse} package since it is obsolete
%        with the October 2020 \LaTeX\ release,
%    \item when used in the preamble, \cs{pinumber} in now called within \cs{AtEndPreamble}
%        to preserve its effect when used in combination with the \textsf{mathgreeks} package.
%  \end{compactlist}}
%
% \changes{v3.3}{2026/08/16}{
%  \begin{compactlist}
%    \item handling Greek letters other than pi to represent special constants or operators,
%    \item improving the \cs{norm} and \cs{pow} macros to work with normal-sized arguments,
%    \item \cs{hvect}, \cs{hvec} and \cs{hlbar} use a phantom `t' again, instead of phantom `A',
%    \item alternatives for single-letter macros (with \texttt{nosingleletter}),
%    \item removing \cs{Mathproba} and \cs{onlymathC} \hand changing in \cs{C},
%    \item new example of use of \cs{probastyle} inside a math formula,
%    \item removing the option \texttt{otherReIm},
%    \item new options \texttt{lineargroups}, \texttt{textshortcuts}, 
%      following suggestions by Romain Noël,
%    \item \cs{iif} now obsolete, replaced by \cs{iff} in text mode only,
%    \item new commands \cs{innerprod}, \cs{FT}, \cs{LT}, \cs{asympteq}, \cs{compl}, 
%        \cs{integerint}, \cs{H}, \cs{Hv}, \cs{dom}, \cs{codom}, \cs{ran}, 
%        \cs{ord}, \cs{supp}, \cs{card}, \cs{floor},
%    \item changing the definition of \cs{eqdef*} to use \cs{Delta} when \cs{upDelta}
%        is not defined,
%    \item a few new references: Bourbaki, \textsf{mathalpha}, \textsf{xpunctuate},
%        \textsf{foreign},
%    \item other changes in the doc: 
%        \begin{compactlist}[\dash]
%            \item explanations about \textsf{ibrackets} have been lightened, 
%            \item new example with \texttt{mathcols},
%            \item turning back to the \texttt{lmodern} font to get a better contrast,
%            \item providing an index,
%            \item considerations on single-letter macros,
%            \item English revision.          
%        \end{compactlist}
%  \end{compactlist}}
%
% \end{list}\end{raggedright}
% \end{multicols}
%
% \begin{thebibliography}{39}
% \begin{raggedright}
% \bibitem{TYPMA} \emph{Typesetting mathematics for science and technology according 
%     to ISO 31/XI}, Claudio Beccari, TUGboat Volume 18 (1997), No.~1.
%     \url{http://www.tug.org/TUGboat/tb18-1/tb54becc.pdf}.
% \bibitem{NIST} \emph{Guide for the Use of the International System of Units (SI)},
%     NIST (National Institute of Standards and Technology), updated March 4, 2020 
%     \url{https://www.nist.gov/pml/special-publication-811}.
% \bibitem{ICTNS} \emph{On the Use of Italic and up Fonts for Symbols in Scientific Text},
%     I.M.~Mills and W.V.~Metanomski, ICTNS (Interdivisional Committee 
%     on Terminology, Nomenclature and Symbols), dec 1999,
%     \url{https://old.iupac.org/standing/idcns/italic-roman_dec99.pdf}.
% \bibitem{BOURB} \emph{\textsc{Éléments de mathématiques, Livre III, Topologie générale}},
%     N.~Bourbaki, Hermann 1960.
% \bibitem{VECT} \emph{\textsf{esvect}  -- Typesetting vectors with beautiful 
%     arrow with \LaTeXe}, Eddie Saudrais, CTAN, v1.3 2013/07/11.
% \bibitem{MLR} \emph{The \textsf{mleftright} package}, Heiko Oberdiek, CTAN, v1.2 2019/12/03.
% \bibitem{TOOL} \emph{The \textsf{mathtools} package}, Morten Høgholm, Lars Madsen, CTAN,
%     v1.29 2022/06/29.
% \bibitem{AMS} \emph{\textsf{amsmath} -- \AmS\ mathmatical facilities for \LaTeX},
%     Frank Mittelbach, Rainer Schöpf, Michael Downes, Davis M.~Jones, David Carlisle, 
%     CTAN, v2.17n 2022/04/08.
% \bibitem{UNIC} \emph{Experimental Unicode mathematical typesetting: 
%     The \textsf{unicode-math} package}, Will Robertson, Philipp Stephani, Joseph Wright, 
%     Khaled Hosny, and others, CTAN, v0.8r 2023/08/13.
% \bibitem{MATA} \emph{The \textsf{mathalpha}, \textsc{aka} \textsf{mathalfa} package}, 
%     Michael Sharpe, CTAN, v1.145 2025/01/17.
% \bibitem{FIXM} \emph{The \textsf{fixmath} package for \LaTeXe}, Walter Schmidt, 
%     CTAN, v0.9 2000/04/11.
% \bibitem{ISOM} \emph{\textsf{isomath} -- Mathematical style for science and technology},
%     Günter Milde, CTAN, v0.6.1 2012/09/04.
% \bibitem{PMISO} \emph{\textsf{PM-ISOmath}, The Poor Man ISO math bundle}, 
%     the \textsf{pm-isomath} package by Claudio Beccari, CTAN, v1.2.00 2021/08/04.
% \bibitem{MGREEK} \emph{The \textsf{mathgreeks} package}, Antoine Missier, CTAN,
%     v1.2 2024/05/07.
% \bibitem{GREEK} \emph{The \textsf{upgreek} package for \LaTeXe}, Walter Schmidt,
%     CTAN, v2.0 2003/02/12.
% \bibitem{DESIGN} \emph{The \textsf{mathdesign} package},
%     Paul Pichaureau, CTAN, v2.31 2013/08/29.
% \bibitem{KPF} \emph{\textsf{Kp-Fonts} -- The Johannes Kepler project},
%     Christophe Caignaert, CTAN, v3.34 20/09/2022.
% \bibitem{FOUR} \textsf{Fourier-GUT\hspace{-0.1em}\emph{enberg}},
%     Michel Bovani, CTAN, v1.3 2005/01/30.
% \bibitem{PX} \emph{\textsf{PX Fonts} -- Palatino-like fonts in support of mathematics}, 
%     Young Ryu, CTAN, 2000/12/14.
% \bibitem{TX} \emph{\textsf{TX Fonts} -- Times-like fonts in support of mathematics}, 
%     Young Ryu, CTAN, 2000/12/15.
% \bibitem{LIB} \emph{The LibertinusT1 Math Package}, Michael Sharpe, CTAN, v2.0.4 2024/01/14.
% \bibitem{LGR} \emph{The \textsf{lgrmath} package}, Jean-François B., CTAN, v1.0 2022/11/16.
% \bibitem{NTX} \emph{New TX font package}, Michael Sharpe, CTAN, v1.735 2024/03/01.
% \bibitem{STM} \emph{The St Mary’s Road symbol font}, Jeremy Gibbons, Alan Jeffrey, 
% CTAN, v2.02a march 2004.
% \bibitem{MBX} \emph{\textsf{Mathabx} -- Three series of mathematical symbols}, Anthony Phan, 
% CTAN, 2005/05/18.
% \bibitem{FORGN} \emph{The \textsf{foreign} package for \LaTeXe}, Philip G.~Ratcliffe, 
%     CTAN, v2.7 2012/09/25.
% \bibitem{XPUNC} \emph{The \textsf{xpunctuate} package for \LaTeX2e}, Philip G.~Ratcliffe,
%     CTAN, v2.0 2023/08/13.
% \bibitem{SPA} \emph{The \textsf{spacingtricks} package}, Antoine Missier, CTAN,
%     v1.9 2026/08/02.
% \bibitem{BRACKET} \emph{Intelligent brackets -- The \textsf{ibrackets} package},
%     Antoine Missier, CTAN, v1.2, 2023/07/26.
% \bibitem{INT} \emph{The \textsf{interval} package}, Lars Madsen, CTAN,
%     v0.4 2019/03/06.
% \bibitem{ICOMMA} \emph{The \textsf{icomma} package for \LaTeXe},
%     Walter Schmidt, CTAN, v2.0 2002/03/10.
% \bibitem{NCC} \emph{The \textsf{ncccomma} package}, Alexander I.~Rozhenko, 
%     CTAN, v1.0 2005/02/10.
% \bibitem{DEC} \emph{The \textsf{decimalcomma} package}, Antoine Missier,
%     CTAN, v1.4 2023/12/30.
% \bibitem{SYST} \emph{L'extension pour \TeX\ et \LaTeX\ \textsf{systeme}},
%     Christian Tellechea, CTAN, v0.32 2019/01/13.
% \bibitem{SPAL} \emph{The \textsf{spalign} package}, Joseph Rabinoff, CTAN, 2016/10/05.
% \bibitem{NMATX} \emph{The package \textsf{nicematrix}}, François Pantigny, CTAN,
%     v6.14 2023/02/18.
% \bibitem{FR} \emph{L'extension \textsf{frenchmath}}, Antoine Missier, CTAN, v3.1 2024/05/07.
% \bibitem{LSHORT} \emph{The Not So Short Introduction to \LaTeXe}, 
%     the \textsf{lshort} package by
%     Tobias Oetiker, Hubert Partl, Irene Hyna and Elisabeth Schlegl, CTAN, v6.4 2021/04/09.
%     \url{http://tug.ctan.org/info/lshort/english/lshort.pdf}.
% \bibitem{COMP} \emph{The \LaTeX\ Companion}, Frank Mittelbach, Michel Goossens, 
%     Johannes Braams, David Carlisle, Chris Rowley, 2nd edition, Pearson Education, 2004.
% \end{raggedright}
% \end{thebibliography}

% \Finale
\endinput
