summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-09 21:22:38 +0000
committerKarl Berry <karl@freefriends.org>2019-05-09 21:22:38 +0000
commit77f661c409d3236073d4796d376ecf1ad412be49 (patch)
treebbc02feba89e061d42ca89e332bc3212f1335ada /Master/texmf-dist/source
parentb861fecdf19a61679a351bf9620bc69fb74f2e92 (diff)
mismath (9may19)
git-svn-id: svn://tug.org/texlive/trunk@51062 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/mismath/mismath.dtx452
1 files changed, 250 insertions, 202 deletions
diff --git a/Master/texmf-dist/source/latex/mismath/mismath.dtx b/Master/texmf-dist/source/latex/mismath/mismath.dtx
index e9920909957..222a1b0cc70 100644
--- a/Master/texmf-dist/source/latex/mismath/mismath.dtx
+++ b/Master/texmf-dist/source/latex/mismath/mismath.dtx
@@ -2,8 +2,8 @@
%
% Copyright (C) 2019 by Antoine Missier <antoine.missier@ac-toulouse.fr>
%
-% Version 0.1 : 27/12/2011
-% Version 1.0 : dtx and ins files
+% Version 0.1 : 2011/12/27
+% Version 1.0 : 2019/04/11 dtx and ins files
% 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
@@ -22,7 +22,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}
- [2019/04/27 v1.2 .dtx mismath file]
+ [2019/05/08 v1.3 .dtx mismath file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -33,7 +33,7 @@
\usepackage{mismath}
\usepackage{amssymb}
\usepackage{multicol}
-\enumber
+%\enumber
\inumber
\pinumber
% for an example in this doc we substitute [ and ] by \OB and \CB
@@ -60,7 +60,7 @@
%</driver>
% \fi
%
-% \CheckSum{1764}
+% \CheckSum{1836}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -85,29 +85,32 @@
% \changes{v1.2}{2019/04/26}{works fine with beamer now: mathrm -> mathup,
% AtBeginDocument for enumber, inumber, junmber, more general @moperator macro}
% \changes{v1.2}{2019/04/27}{added mathtools package, font definition Roman -> up,
-% changes in documentation}
+% changes in documentation, removing PEroman macro}
+% \changes{v1.3}{2019/05/05}{a small bug correction in the internal @mwarning macro}
+% \changes{v1.3}{2019/05/08}{many corrections in documentation}
%
% \GetFileInfo{mismath.sty}
%
% \title{\textsf{mismath}\\ Miscellaneous mathematical macros\thanks{This document
-% corresponds to \textsf{mismath}~\fileversion, dated \filedate,
-% thanks to François Bastouil for help in English translation.}}
+% corresponds to \textsf{mismath}~\fileversion, dated \filedate.
+% Thanks to François Bastouil for help in English translation.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{April 27, 2019}
+% \date{May 8, 2019}
% \maketitle
%
% \section{Introduction}
%
-% This package provides some tools to get (automatically)
-% mathematical constants $\e$, $\i$, $\uppi$
-% in upright shape and not in italic (sloping shape) like
-% variables, according to the International Standards ISO~31-0:1992 to ISO~31-13:1992,
-% superseded by ISO~80000-2:2009 (see~\cite{TYPMA}~\cite{NIST}~\cite{ICTNS}~\cite{ISO}).
+% According to the International Standards ISO~31-0:1992 to ISO~31-13:1992,
+% superseded by ISO~80000-2:2009, mathematical constants $\e$, $\i$, $\pi$
+% sould be typeset in upright shape and not in italic (sloping shape) like
+% variables (see~\cite{TYPMA}~\cite{NIST}~\cite{ICTNS}~\cite{ISO}).
+% This package provides some tools to achieve this (automatically).
%
+% \medskip
% Even if it is recommended to typeset vectors names
% in bold italic style~\cite{NIST}~\cite{ICTNS},
% they are often represented with arrows
-% (particularly in scholar documents or in physics).
+% (particularly in school documents or in physics).
% To draw pretty arrows above vectors, we use \textsf{esvect} package
% by Eddie Saudrais~\cite{VECT}
% and we provide a few more macros related to vectors with arrows,
@@ -120,9 +123,9 @@
% \begin{itemize}
% \item some standard operator names,
% \item a few useful aliases,
-% \item improving some spacing in mathematical mode,
-% \item systems of equations and matrices,
-% \item displaymath layout in two columns.
+% \item improving some spacings in mathematical formulas,
+% \item systems of equations and small matrices,
+% \item displaymath in double columns for long calculation.
% \end{itemize}
%
% To avoid incompatibility,
@@ -136,18 +139,24 @@
% (assuming the other package supports it), or use
% |\let\|\meta{command}|\relax| before loading \textsf{mismath}.
%
+% \medskip
% \DescribeEnv{\oarg{options}\{mismath\}}
-% The \textsf{amsmath} package is automatically loaded by \textsf{mismath} without option,
-% and \textsf{mathtools} package also.
+% The \textsf{amsmath} package is loaded by \textsf{mismath} without option.
% For using \textsf{amsmath} with options (see~\cite{AMS}),
-% these options can be added to \textsf{mismath}, or
+% these options can be added when calling \textsf{mismath}, or
% \textsf{amsmath} has to be loaded
% with the required options before \textsf{mismath}.
%
+% Two other usefull packages are loaded:
+% \textsf{mathtools} by Morten Høgholm and Lars Madsen~\cite{TOOL}
+% and \textsf{mathfixs} by Niklas Beiser with \texttt{frac} and \texttt{root} options~\cite{MFIX}.
+%
+% \medskip
% A recommendation, seldom observed, is to typeset uppercase Greek letters in italic shape
% like other variables~\cite{ICTNS}. This is automatically done with \textsf{fixmath} package
-% by Walter Schmidt~\cite{FIXM} or \textsf{isomath} by Günter Milde~\cite{ISOM},
-% but is not implemented in \textsf{mismath} because this rule is conflicting
+% by Walter Schmidt~\cite{FIXM} or \textsf{isomath} by Günter Milde~\cite{ISOM}
+% or you can do |\ProvideMathFix{greekcaps}| in the preamble, thanks to \textsf{mathfixs} package.
+% But this feature is not implemented in \textsf{mismath} because this rule is conflicting
% to the one used for instance in France where all mathematics capitals
% have to be typeset in upright shape\footnote{The package \textsf{frenchmath}~\cite{FR}
% takes this rule into account.}.
@@ -166,65 +175,68 @@
% is based on \texttt{\bslash operatorfont}
% (from \textsf{amsopn} package, automatically loaded by \textsf{amsmath}).
% The \textsf{beamer}
-% package uses sans serif as default math font, but \texttt{\bslash mathrm}
+% package uses a default sans serif math font, but \texttt{\bslash mathrm}
% produces a font with serif in \textsf{beamer}. This problem is solved by
% using \texttt{\bslash mathup} instead
% of \texttt{\bslash mathrm}.}),
% \DescribeMacro{\e} \DescribeMacro{\i} \DescribeMacro{\j}
-% \textsf{mismath} package provides |\e| command for the base of natural logarithm
+% the package provides |\e| command for the base of natural logarithm
% and |\i| or |\j| for imaginary numbers.
% One can notice that |\i| and |\j| already exist in \LaTeX:
% using in LR mode, they produce ``\i'' and ``\j'' without the point
% so one can place accents on them, and in mathematical mode they produce
% ``Latex warning: Command invalid in math mode''.
-% Redefining |\i| and |\j| by \textsf{mismath} only concerns mathematical mode.
+% Redefining |\i| and |\j| only concerns mathematical mode.
%
+% \medskip
% \DescribeMacro{\enumber} \DescribeMacro{\inumber} \DescribeMacro{\jnumber}
% Nevertheless, it can be tiresome to type a lot of backslashes in a document with many formulas
-% with $\e$ or $\i$.
+% containing $\e$ or $\i$.
% So a way is proposed here to free of it by placing |\enumber|, |\inumber| or |\jnumber|
% in the preamble:
-% $e$, $i$ or $\j$ will then automatically be set in upright shape
-% in the whole document,
-% no need to type |\e|, |\i| or |\j|. However, we can still get italicized
+% $\e$, $i$ or $\j$ will then automatically be set in upright shape
+% in the whole document, no need to type |\e|, |\i| or |\j|,
+% let's hope that there are not many other $\mathit{e}$, $\mathit{i}$ or $j$ as variables.
+% However, one can still get italicized
% $\mathit{e}$, $\mathit{i}$ or $\mathit{j}$ with \LaTeX\ command
% |\mathit| or |\mathnormal|. Of course, this does not fully comply with \LaTeX\ philosophy:
-% in the document, objects have to be pointed out
+% in the document body, objects should be pointed out
% by their nature rather than their typographical characteristics,
% defined in the preamble. But these macros are really handy and
-% thanks to them it is possible to put in the standards a document
-% afterwards; moreover anyone is free to use them or not.
+% thanks to them it is possible to bring a document up to the standards
+% afterwards; besides anyone is free to use them or not.
%
+% \medskip
% \DescribeMacro{\pinumber\oarg{font}}
-% Mathematical constant $\pi$ should also be typeset in upright shape
+% Mathematical constant $\pi$ should also be typeset in upright shape,
% which differs from italicized $\itpi$ (see~\cite{ICTNS} and~\cite{ISO}).
% This recommendation is even less observed than the one concerning $\e$ and $\i$~\cite{TYPMA}.
% The \textsf{upgreek} package by Walter Schmidt~\cite{GREEK} makes it possible to typeset
-% greek letters in upright font with commands such as |\upalpha|, |\upbeta|,\ldots\@
-% To avoid typing a lot of |\uppi|, \textsf{mismath} offers |\pinumber| macro,
+% greek letters in upright font by using commands such as |\upalpha|, |\upbeta|,\ldots\@
+% To avoid typing a lot of |\uppi|, one can use the |\pinumber| macro,
% which has to be put in the preamble. This command loads the \textsf{upgreek} package
% with an optional \meta{font} argument: \texttt{Symbol} (by default), \texttt{Euler}
-% or \texttt{Symbolsmallscale} (see~\cite{GREEK}). It also redefines |\pi| command to typeset
-% all the |\pi| in the selected upright font.
+% or \texttt{Symbolsmallscale} (see~\cite{GREEK}). It also redefines the |\pi|
+% command to typeset all |\pi| in the selected upright font.
% By activating |\enumer|, |\inumber| and |\pinumber|
-% in the preamble, you get the following example:
+% in the preamble, you can get for instance:
% \begin{center}
-% |$e^{i\pi} = -1$| \hspace{6em} $e^{i\pi}=-1$
+% |$e^{i\pi} = -1$| \hspace{6em} $\e^{i\pi}=-1$
% \end{center}
%
% \DescribeMacro{\itpi}
-% When |\pinumber| is activated, the original italic $\itpi$ can be produced with |\itpi|.
+% When |\pinumber| is activated, the original italic $\itpi$ is still available with |\itpi|.
%
% \subsection{Vectors}
%
% \DescribeMacro{\vect}
-% By default, |\vect| command\footnote{As for many macros of this package,
+% By default, the |\vect| command\footnote{As for many macros of this package,
% the definition will take effect only if this macro is not defined before
% by another package.},
% produces vectors with arrows
% (thanks to \textsf{esvect} package by Eddie Saudrais\footnote{\textsf{esvect}
-% provides \texttt{\bslash vv} macro used in \texttt{\bslash vect}.})
+% provides \texttt{\bslash vv} macro used by \texttt{\bslash vect}.})
% which are much more elegant than those produced by \LaTeX\ |\overrightarrow| command
% (giving $\overrightarrow{AB}$).
% The \textsf{esvect} package has an optional argument
@@ -236,9 +248,10 @@
% with the required option \emph{before} \textsf{mismath}, for instance |\usepackage[d]{esvect}|
% will give the arrows produced by default in~\cite{VECT}.
%
+% \medskip
% \DescribeMacro{\boldvect}
-% With |\vect| it is also possible to typeset vector's names using bold italic,
-% according to ISO recommendation~\cite{ISO}, rather than arrows.
+% |\vect| makes also possible to typeset vector's names using bold italic
+% (according to ISO recommendation~\cite{ISO}) rather than arrows.
% For this, calling |\boldvect| will modify the behavior of |\vect|:\\[1ex]
% \begin{minipage}{8cm}
% \begin{verbatim}
@@ -247,54 +260,61 @@
% \end{verbatim}
% \end{minipage}
% \begin{minipage}{6cm}
-% $\boldvect \vect{v}=\lambda\vect{\mathit e}_x +\mu\vect{\mathit e}_y$.
+% $\boldvect \vect{v}=\lambda\vect{e}_x +\mu\vect{e}_y$.
% \end{minipage}
+%
% \DescribeMacro{\boldvectcommand}
-% By default \textsf{mismath} uses |\boldsymbol|
-% command\footnote{\texttt{\bslash mathbf} gives upright bold style,
+% By default |\boldvect| uses the |\boldsymbol|
+% command\footnote{\texttt{\bslash mathbf} gives upright bold font,
% even if used in combination with \texttt{\bslash mathit}.}
-% from \textsf{amsbsy} package, automatically loaded by \textsf{amsmath}.
-% But other packages producing better bold italic can be preferred, for instance
-% \texttt{\bslash bm} from \textsf{bm} package or |\mathbold| from \textsf{fixmath} package
-% or also |\mathbfit| from \textsf{isomath} package.
-% To achieve this, |\boldvectcommand| can be redefined:
-% for instance |\renewcommand{\boldvectcommand}{\mathbold}|.
-% By redefining |\boldvectcommand| to |\mathbf|, |\vect| produces vectors
-% in bold \emph{upright} style,
+% from \textsf{amsbsy} package, loaded by \textsf{amsmath}.
+% But other packages producing bold italic can be preferred, e.g.\@
+% \texttt{\bslash bm} from \textsf{bm} package or |\mathbold| from \textsf{fixmath}
+% package (also implemented in \textsf{mathfixs}\footnote{To activate a feature
+% of \textsf{mathfix} like \texttt{mathbold}, do \texttt{\bslash ProvideMathFix\{mathbold\}}.})
+% or |\mathbfit| from \textsf{isomath}.
+% For that, redefine |\boldvectcommand|:
+% for instance |\renewcommand\boldvectcommand{\mathbold}|.
+%
+% By setting |\boldvectcommand| to |\mathbf|, |\vect| produces vectors
+% in bold \emph{upright} shape,
% which tends to be used instead of bold \emph{italic}
-% (but probably for bad reasons), .
+% (but probably for bad reasons).
%
+% \medskip
% \DescribeMacro{\arrowvect}
-% It is possible at any moment to get back to default behavior with inverse switch
+% At any moment, you can get back to the default behavior with the inverse switch
% |\arrowvect|. These switches can be placed anywhere:
% inside mathematical mode or inside an environment (with local effect) or outside
% (with global effect).
%
+% \medskip
% \DescribeMacro{\hvect}
% When vectors with arrows are typeset side by side,
-% the arrows can be set up a bit higher (with a phantom box containing $h$)
+% arrows can be set up a bit higher (with a vertical phantom box containing $h$)
% to avoid inelegants effects:
% \begin{itemize}
% \item $\vect{AB}=\vect{u}+ \vect{AC}$ is less than $\vect{AB}=\hvect{u}+ \vect{AC}$,
-% produced by |\hvect{u}|;
+% obtained with |\hvect{u}|;
% \item $\vect{a} \cdot \vect{b}=0$ is less than $\hvect{a} \cdot \vect{b}=0$,
-% produced by |\hvect{a}|.
+% obtained with |\hvect{a}|.
% \end{itemize}
-% The |\boldvect| switch has no effect on |\hvect| macro which always typesets
-% arrows on vectors (with |\vv| command from \textsf{esvect} package).
-%
+% The |\boldvect| switch has no effect on the |\hvect| macro which always typesets
+% arrows on vectors (with the |\vv| command from \textsf{esvect} package).
+%
+% \medskip
% \DescribeMacro{\hvec}
% In a similar way, |\hvec| raises the little arrow produced by
% \LaTeX\ command |\vec| (but only from height of $t$ letter):
% \begin{itemize}
% \item $\mathcal{P}=\vec{f}\cdot\vec{v}$ is less than
-% $\mathcal{P}=\vec{f}\cdot\hvec{v}$, produced by |\hvec{v}|;
+% $\mathcal{P}=\vec{f}\cdot\hvec{v}$, obtained with |\hvec{v}|;
% \item $\vec{f} =m \vec{a}$ is less than $\vec{f} =m \hvec{a}$,
-% produced by |\hvec{a}|.
+% obtained with |\hvec{a}|.
% \end{itemize}
%
% \DescribeMacro{\norm}
-% The norm of a vector is classically produced with delimiters |\lVert| and |\rVert|
+% The norm of a vector is classically produced by delimiters |\lVert| and |\rVert|
% (rather than \texttt{\bslash}$\mid$) or |\left\Vert| and |\right\Vert|
% for delimiters adapting to the content. Unfortunately, these delimiters
% are always vertically centred, relatively to the middle of the base line,
@@ -302,7 +322,7 @@
% being superior to the depth under it.
% The code |$\norm{\vec{h}}$| raises the double bar to produce $\norm{\vec{h}}$.
% Let's notice that the height of the bars don't adjust to content,
-% but however to context: main text, indexes or exponents.
+% but however to context: main text, subscripts or exponents.
%
% \subsection{Standard operator names}
%
@@ -310,10 +330,10 @@
% The \emph{differential} operator should be typeset in upright shape and not in
% italic, to make it different from variables
% (as mentioned in \cite{TYPMA}~\cite{NIST}~\cite{ICTNS}~\cite{LSHORT}).
-% To achieve this, \textsf{mismath} provides |\di| command\footnote{\texttt{\bslash d}
-% is already used in \LaTeX\ to put a dot under a symbol and
-% it seemed not a good idea to redefine this command.}.
-% See the following examples (notice thin space before the d, as for classic function's names): \\
+% To get this, use the |\di| command.
+% In the first following example, notice the thin spaces before the d,
+% as for classic function's names; in the second one,
+% spaces before fractions have been enlarged by the \textsf{mathfixs} package: \\
% \begin{minipage}[t]{7cm}
% \begin{verbatim}
%\[ \iint xy\di x\di y \]
@@ -333,32 +353,34 @@
% \[m\frac{\di^2x}{\di t^2}+h\frac{\di x}{\di t}+kx=0\]
% \end{minipage}
%
-% This command can also stand for \emph{distance}:
+% This command can also stand for \emph{distance} (hence its name):
% \[\lambda\di(A,\mathcal{F})+\mu\di(B,\mathcal{H}).\]
%
% \DescribeMacro{\P} \DescribeMacro{\E} \DescribeMacro{\V}
-% In probability field, the proper use is to typeset capital letters $\P$, $\E$
-% in upright shape to refer to probability and expectation\footnote{Upright shape
-% must be used for any standard function identifier.
-% \LaTeX\ provides also \texttt{\bslash Pr} which gives $\Pr$.}.
-% To achieve this \textsf{mismath} provides |\P| and |\E|.
-% Variance is normally denoted by $\Var$ (see later),
-% but in some countries we can find $\V$ produced here by |\V|.
+% To refer to probability\footnote{\LaTeX\ provides
+% also \texttt{\bslash Pr} which gives $\Pr$.}
+% and expectation the proper use is to typeset capital letters $\P$, $\E$
+% in upright shape as for any standard function identifier.
+% This is obtained with |\P| and |\E|.
+% Variance is normally denoted by $\Var$ (see further),
+% but in some countries we can find $\V$ produced by |\V|.
%
+% \medskip
% \DescribeMacro{\Par}
-% |\P| command already existed to refer to the end of paragraph symbol \Par\
+% The |\P| command already existed to refer to the end of paragraph symbol \Par\
% and has been redefined, but this symbol can still be obtained with |\Par|.
%
+% \medskip
% \DescribeMacro{\probastyle}
-% Some authors use also ``blackbord bold'' font
-% to represent probability, expectation (and variance): $\mathbb{P}, \mathbb{E}, \mathbb{V}$.
-% To get these ``openwork'' letters,
-% use |\probastyle| macro to change appearance of |\P|, |\E| and |\V|:
-% |\renewcommand\probastyle{\mathbb}|\footnote{As for
+% Some authors use ``blackboard bold'' font
+% 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{As for
% \texttt{\bslash boldvect} and \texttt{\bslash arrowvect},
-% effect is local to container environment.}.
+% effect is local to the container environment.}
+% brings the previous ``openwork'' letters.
% |\mathbb| comes from \textsf{amsfonts} package
-% (automatically loaded by \textsf{amssymb}
+% (loaded by \textsf{amssymb}
% but also available standalone)
% which has to be called in the preamble.
%
@@ -379,22 +401,25 @@
%
% By default, operators returning vectors, |\grad| and |\curl| (or its synonym |\rot|
% rather used in Europe), are written with an arrow on the top.
-% When |\boldvect| is activated, they are typeset in bold font:
+% When |\boldvect| is activated, they are typeset in bold style:
% $\boldvect \grad, \curl, \rot$.
-% For covariance and identity function, \textsf{mismath}
-% provides two notations, with or without a first capital letter,
+% For the covariance and the identity function,
+% two notations are provided, with or without a first capital letter,
% because they are both very frequent.
-% On the other hand, $\im$ stands for the image of a linear transformation
-% (like $\ker$ for the kernel)
-% and $\Im$ is the imaginary part of a complex number.
+% On the other hand, ``$\im$'' stands for the image of a linear transformation
+% (like ``$\ker$'' for the kernel)
+% but ``$\Im$'' is the imaginary part of a complex number.
+% Notice that |\div| and |\span| already exist
+% and haven't been redefined, therefore |\divg| and |\spa| macros;
+% |\Z| is used otherwise (see further), therefore |\Zu|,
+% to designate the center of a group: $\Zu(G)$ (from German Zentrum).
%
+%\medskip
% \DescribeMacro{\oldRe} \DescribeMacro{\oldIm}
-% |\Re| and |\Im| macros already existed, to refer to real and imaginary part
+% The |\Re| and |\Im| macros already existed, to refer to real and imaginary part
% of a complex number, producing outdated symbols $\oldRe$ and $\oldIm$.
% They have been redefined according to actual use, as mentionned in the above table,
-% but it is still possible to get old symbols with |\oldRe| and |\oldIm|.
-% Notice that |\div| and |\span| already exist
-% and haven't been redefined, therefore |\divg| and |\spa| macros.
+% but it's still possible to get old symbols with |\oldRe| and |\oldIm|.
%
% \medskip
% Some (inverse) circular or hyperbolic fonctions, missing
@@ -410,15 +435,15 @@
% \DescribeMacro{\bigO} \DescribeMacro{\bigo} \DescribeMacro{\lito}
% Asymptotic comparison operators (in Landau notation) are obtained with
% |\bigO| or |\bigo| and |\lito| commands:
-% \[ n^2+\bigO(n\log n) \txt{or} n^2+\bigo(n\log n)\txt{and} e^x=1+x+\lito(x^2).\]
+% \[ n^2+\bigO(n\log n) \txt{or} n^2+\bigo(n\log n)\txt{and} \e^x=1+x+\lito(x^2).\]
%
% \subsection{A few useful aliases}
%
% In the tradition of Bourbaki and D.~Knuth, proper use requires
% that classics sets of numbers are typeset in bold roman:
% $\R, \C, \Z, \N, \Q$,
-% openwork letters ($\mathbb{R}, \mathbb{Z}, \ldots$)
-% being restricted to writing at blakbord~\cite{LSHORT};
+% ``openwork'' letters ($\mathbb{R}, \mathbb{Z}, \ldots$)
+% being restricted to writing at blakboard~\cite{LSHORT};
% and likewise to designate a field: $\F$ or $\K$ (Körper in German).
% We get these symbols with the following macros:
% \begin{center}
@@ -426,39 +451,40 @@
% \end{center}
%
% \DescribeMacro{\mathset}
-% |\mathset| command enables to change in a global way the behavior of all these macros:
-% by default, |\mathset| is an alias for |\mathbf|, but if you prefer openwork letters,
-% you just have to place |\renewcommand\mathset{\mathbb}| in the preamble,
-% after loading \textsf{amsfonts} package (which provides the blackboard bold typeface).
+% The |\mathset| command enables to change in a global way the behavior of all these macros:
+% by default, |\mathset| is an alias for |\mathbf|, but if one prefer openwork letters,
+% just place |\renewcommand\mathset{\mathbb}| in the preamble,
+% after loading \textsf{amsfonts} package (which provides the ``blackboard bold'' typeface,
+% also loaded by \textsf{amssymb}).
%
% \medskip
% \DescribeMacro{\ds}
-% |\displaystyle| command being very frequent, current alias |\ds| is proposed.
-% Not only it eases typing but also it makes source code formulas more readable.
-
-% Symbols with limits behave differently in in-line math mode or in displaymath mode.
-% In this last case, ``limits'' are put under or above whereas in in-line math mode,
-% they are put on the right side, in subscript or exponent. Compare:
+% The |\displaystyle| command being very frequent, common alias |\ds| is provided.
+% Not only it eases typing but also it makes source code more readable.
+%
+% \medskip
+% Symbols with limits behave differently for in-line formulas or for displayed equations.
+% In the latter case, ``limits'' are put under or above whereas for in-line math mode,
+% they are placed on the right, as subscript or exponent. Compare:
% $\upzeta(s)=\sum_{n=1}^{\infty }\frac{1}{n^s}$ with
% \[\upzeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}.\]
-% \DescribeMacro{\dlim} \DescribeMacro{\dsum} \DescribeMacro{\dcup} \DescribeMacro{\dcap}
-% In in-line mode, it is possible to force displaymath behavior with |\displaystyle|
-% command or its alias |\ds|, but then all the rest of the current mathematical
-% environment will be set in displaymath mode too (in our example, the fraction will be expanded).
-% Just like classic command |\dfrac|
-% only transforms the required fraction in displaymath, if we want to limit
-% displaymath effect to the affected symbol, it is possible to make
-% it followed by |\limits| command or use the following macros:
-% |\dlim|, |\dsum|, |\dcup|, |\dcap|.
+% \DescribeMacro{\dlim} \DescribeMacro{\dsum} \DescribeMacro{\dprod}
+% \DescribeMacro{\dcup} \DescribeMacro{\dcap}
+% With in-line math mode, displaymath behavior can be forced with |\displaystyle|
+% or its alias |\ds|, but then, all the rest of the current mathematical
+% environment will be set in displaymath mode too (in the previous example,
+% the fraction will be expanded).
+% Just like the \textsf{amsmath} command |\dfrac|
+% only transforms the required fraction in display style, to limit
+% display style effect to the affected symbol, one can use the following macros:
+% |\dlim|, |\dsum|, |\dprod|, |\dcup|, |\dcap|.
% So |$\dlim_{x\to +\infty}\frac{1}{x}$| gives $\dlim_{x \to +\infty}\frac{1}{x}$.
%
% \medskip
% \DescribeMacro{\lbar} \DescribeMacro{\hlbar}
-% \LaTeX\ provides |\bar| macro to draw a little bar above a symbol,
-% for instance for the conjugate of a complex number $z$, typing |\bar{z}| produces $\bar{z}$.
-% However for larger bars, we have to use |\overline| to get for instance
-% $\lbar{z_1z_2}$ or, shorter, |\lbar| alias provided by \textsf{mismath}.
-% Such as for vectors, we can raise the bar (from the height of $h$) with
+% Large bars over expressions are obtained with |\overline|
+% or, shorter, its alias |\lbar|, to get for instance $\lbar{z_1z_2}$.
+% Such as for vectors, one can raise the bar (from the height of $h$) with
% |\hlbar| command, in order to correct uneven bars heights.
% \begin{center}
% $\lbar{z+z'}=\lbar{z}+\lbar{z'}$ is less than $\lbar{z+z'}=\hlbar{z}+\lbar{z'}$,
@@ -466,16 +492,16 @@
% \end{center}
%
% \DescribeMacro{\eqdef}
-% |\eqdef| macro writes equality symbol topped with ``def''
-% (thanks to \LaTeX\ command |\stackrel|):\\
+% The |\eqdef| macro writes equality symbol topped with ``def''
+% (thanks to the \LaTeX\ command |\stackrel|):\\
% \begin{minipage}[t]{8cm}
% \begin{verbatim}
-% $ e^{i\theta} \eqdef
+% $ \e^{i\theta} \eqdef
% \cos\theta + i\sin\theta $
% \end{verbatim}
% \end{minipage}
% \begin{minipage}{6cm}
-% $e^{i\theta}\eqdef\cos\theta+i\sin\theta$
+% $\e^{i\theta}\eqdef\cos\theta+i\sin\theta$
% \end{minipage}
%
% \DescribeMacro{\unbr}
@@ -483,7 +509,7 @@
% package by Morten Høgholm and Lars Madsen~\cite{TOOL}
% provides a new improved version of \texttt{\bslash underbrace} command
% (as many other usefull macros);
-% it is loaded by \textsf{mismath}.}.\\[2ex]
+% it is loaded by \textsf{mismath}.}, making source code more compact.\\[2ex]
% \begin{minipage}{6.75cm}
% \begin{verbatim}
%$ (QAP)^n = \unbr{QAP\mul QAP\mul
@@ -493,58 +519,60 @@
% \begin{minipage}{6.5cm}
% $ (QAP)^n = \unbr{QAP\mul QAP\mul\cdots\mul QAP}_{n\text{ times}} $
% \end{minipage}
-%
-% \DescribeMacro{\iif}
-% |\iif| is an alias for ``\iif'' in text mode.
%
% \pagebreak
-% \subsection{Fixing some spacing in mathematical formulas}
+% \DescribeMacro{\iif}
+% |\iif| is an alias for ``\iif'', to be used in text mode.
+%
+% \subsection{Improving some spacings in mathematical formulas}
%
% \DescribeMacro{\mul}
-% Multiplication symbol obtained with |\times| produces the same spacing than addition
+% The multiplication symbol obtained with |\times| produces the same spacing than addition
% or substraction operators, whereas division obtained with $/$ is tighten around its arguments.
% This actually hides the priority of the multiplication on $+$ and $-$.
-% This is why \textsf{mismath} provides |\mul| macro, behaving like $/$
-% (ordinary symbol) and leaves less space around than |\times|:
+% This is why we provide the |\mul| macro, behaving like $/$
+% (ordinary symbol) and leaving less space around than |\times|:
% \begin{center}
% $\lambda+\alpha \times b-\beta \times c$
% is less than $\lambda+\alpha \mul b-\beta \mul c$, obtained with |\mul|.
% \end{center}
%
% \DescribeMacro{\then}
-% |\then| macro produces the symbol $\Longrightarrow$ but leaving more space around it,
-% as for standard macro |\iff| does it with $\Longleftrightarrow$;
-% in a similar way, |\txt| \DescribeMacro{\txt}
-% uses |\text| macro from \textsf{amstext} package
-% (automatically loaded by \textsf{amsmath})
-% leaving em quad spaces (|\quad|) around the text:
+% The |\then| macro produces the symbol $\Longrightarrow$ surrounded by large spaces
+% as the standard macro |\iff| does it with $\Longleftrightarrow$.
+% In a similar way, |\txt| \DescribeMacro{\txt}
+% based on the |\text| macro (from the \textsf{amstext} package,
+% automatically loaded by \textsf{amsmath}),
+% leaves em quad spaces (|\quad|) around the text. See the following example:
% \begin{center}
-% |\ln x=a \then x=e^a \txt{or} \ln x=a \Longrightarrow x=e^a| \\[1ex]
-% $ \ln x=a \then x=e^a \txt{or} \ln x=a \Longrightarrow x=e^a$
+% |\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{\pow}
% When typesetting an exponent after a closing parenthesis produced by |\right)|,
% the exponent is little to far from the parenthesis.
% The command |\pow|\marg{expr}\marg{pow} sets
-% \meta{expr} between the parentheses and puts the exponent \meta{pow}
-% slightly closer to the parenthesis. Compare:
-% \[ e^a \sim\left(1+\frac{a}{n}\right)^n \txt{and} e^a \sim\pow{1+\frac{a}{n}}{n}.\]
+% \meta{expr} between parentheses and puts the exponent \meta{pow}
+% slightly closer to the right parenthesis. Compare:
+% \[ \e^a \sim\left(1+\frac{a}{n}\right)^n \txt{and} \e^a \sim\pow{1+\frac{a}{n}}{n}.\]
%
% \DescribeMacro{\abs}
% Absolute value (or modular for a complex number) should be typeset with
% |\lvert| \ldots |\rvert| rather than $\mid$ which doesn't respect correct
% spaces for delimiters; for bars whose height has to adapt to content,
% we use |\left\vert| \ldots |\right\vert| or, more simply,
-% \textsf{mismath} command |\abs|\{\ldots\} which is equivalent\footnote{Another
+% the |\abs|\{\ldots\} command which is equivalent\footnote{Another
% solution is to define \texttt{\bslash abs} with the
% \texttt{\bslash DeclarePairedDelimiter} command
% from the \textsf{mathtool} package~\cite{TOOL}.}.
%
% \medskip
% \DescribeMacro{\lfrac}
-% This macro behaves like |\frac| but with medium spaces around the arguments,
-% so the corresponding fraction bar seems to be a little bit longer:\\
+% This macro behaves like |\frac|\footnote{\texttt{\bslash frac} is redefined
+% by \textsf{mathfixs} package to produce better surrounding space.}
+% but with medium spaces around the arguments,
+% so the corresponding fraction bar is perceptibly a little bit longer:\\
% \begin{minipage}[t]{8cm}
% \begin{verbatim}
%\[ \lbar{Z} =
@@ -570,16 +598,16 @@
% In our code, $[$ and $]$ symbols are not defined anymore as delimiters.
% One can regret it because a line break could occur between the two,
% but in addition to the fact that it works very well like that for spaces
-% (because these delimiters are most of the time preceded or followed by relational,
+% (because these symbols are most of the time preceded or followed by relational,
% binary or punctuation symbols), it is always possible to transform them
-% into delimiters with |\left| |\right|\footnote{Is \LaTeX\ standard definition
+% into delimiters with |\left| and |\right|\footnote{Is \LaTeX\ definition
% of [ as |mathopen| really appropriate
% where this symbol could almost also logically have been defined as |mathclose|?}.
%
-% \subsection{Environments for systems and small matrices}
+% \subsection{Environments for systems of equations and small matrices}
%
% \DescribeEnv{system}
-% To produce a system of equations, \textsf{mismath} provides \texttt{system} environment:\\
+% The \texttt{system} environment produces a system of equations:\\
% \begin{minipage}[t]{6.5cm}
% \begin{verbatim}
%$\begin{system}
@@ -591,10 +619,22 @@
% \[ \begin{system} x=1+2t \\ y=2-t \\z=-3-t \end{system} \]
% \end{minipage}
%
+% \medskip
+% \DescribeMacro{\systemsep}
+% This first example could also have been produced with \texttt{cases} environment
+% from \textsf{amsmath} package, although \texttt{cases} places mathematical expressions
+% closer to the bracket (which is logical considering it's use).
+% |\systemsep| enables to set the gap between the bracket and the expressions,
+% set by default to |\medspace|. This gap may be reduce, for instance:
+% |\renewcommand{\systemsep}{\thinspace}|,
+% or enlarged with |\thickspace| (and with |\renewcommand\systemsep}{}|
+% we get back to what \texttt{cases} do).
+%
+% \medskip
% \DescribeEnv{system\oarg{coldef}}
% By default, a system is written like an \texttt{array} environment with only one column,
% left aligned. The environment has an optional argument to create several columns,
-% specifying their alignment, with the same syntax than \texttt{array} environment of
+% specifying their alignment, with the same syntax than the \texttt{array} environment of
% \LaTeX : |\begin{system}[cl]| produces a two-column system, the first one being centred,
% the second being left aligned, such as in the following example:\\
% \begin{minipage}[t]{7cm}
@@ -612,62 +652,56 @@
% \DescribeMacro{\systemstretch}
% Default spacing between the lines of a \texttt{system} environment has been slightly
% enlarged compared to the one from \texttt{array} environments (from 1.2 factor).
-% It is possible to change this spacing by typing |\renewcommand{\systemstretch}|\marg{stretch}
+% This spacing may be changed by typing |\renewcommand{\systemstretch}|\marg{stretch}
% inside the current mathematical environment (for a local change) or outside
% (for a global change). By default, stretch's value is 1.2.
-% It is also possible to use occasionnally a carriage return with a spacing option such
+% In addition we can use a carriage return with a spacing option such
% as it has been done above with |\\[1ex]|.
%
-% Another example with |\begin{system}[l@{\quad}l]|\footnote{\texttt{@\{\ldots\}}
+% Another example with |\begin{system}[rl@{\quad}l]|\footnote{\texttt{@\{\ldots\}}
% sets inter-column space.}:
% \begin{equation*}
-% \begin{system}[l@{\quad}l]
-% -5+3s=8+2t & (r_1)\\ 1+2s= 3t & (r_2)\\ -2s=8+2t & (r_3)
+% \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}[l@{\quad}l]
-% -5+5s=0 & (r_1 \gets r_1-r_3)\\
-% 1=8+5t & (r_2 \gets r_2+r_3) \\
-% 1+2s=3t & (r_3 \gets r_2)
+% \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*}
-%
-% \DescribeMacro{\systemsep}
-% This last example could have also be produced with \texttt{cases} environment
-% from \textsf{amsmath} package, although \texttt{cases} places mathematical expressions
-% closer to the bracket (which is logical considering it's use).
-% |\systemsep| macro enables to set the gap between the bracket and the expressions,
-% set by default to |\medspace|. It is possible to reduce this gap, for instance:
-% |\renewcommand{\systemsep}{\thinspace}|
-% or to enlarge it with |\thickspace| (and with |\renewcommand\systemsep}{}|
-% we get back to what \texttt{cases} do).
%
+% Let's mention the \textsf{systeme} package~\cite{SYST} which deals with linear systems
+% with a lighter syntax and automatic alignments on $+$, $-$, $=$,
+% and also the \textsf{spalign} package~\cite{SPAL} which moreover produces nice alignments
+% for matrices (with spaces and semi­colons as de­lim­iters).
+%
% \medskip
% \DescribeEnv{spmatrix}
% \textsf{amsmath} package provides various environments to typeset matrices:
-% for instance \texttt{pmatrix} that automatically puts parenthesis around the matrix
+% for instance \texttt{pmatrix} that surrounds the matrix with parenthesis
% or \texttt{smallmatrix} that typesets a small matrix that can even be inserted
-% on a text line. We provide a combination of the two with \texttt{spmatrix}:\\
-% |$\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$| yields
+% in a text line. We provide a combination of the two with \texttt{spmatrix}:\\
+% |$\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$| yielding
% $\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$.
%
% \textsf{mathtools} package enhance \textsf{amsmath} matrices environments
% and provides also a small matrix environment with parenthesis.
-% Moreover, with starred version |\begin{psmallmatrix*}|\oarg{col},
+% Furthermore, with starred version |\begin{psmallmatrix*}|\oarg{col},
% you can choose the alignment inside the columns (\texttt{c}, \texttt{l} or \texttt{r}).
% But sadly, the space before the left parenthesis is too narrow
% regarding to the space inside the parenthesis.
% Compare previous $\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$
% with $\vec{u}\begin{psmallmatrix}-1\\2\end{psmallmatrix}$.
%
-% \subsection{Displaymath in double column}
+% \subsection{Displaymath in double columns}
%
% \DescribeEnv{mathcols}
-% \texttt{mathcols} environment activates mathematical mode and enables to compose ``long''
-% calculation on two columns, separated with a central line,
+% \texttt{mathcols} environment activates mathematical mode and enables to arrange ``long''
+% calculation in double columns, separated with a central rule,
% as shown in the following example.
-% But it is necessary to load \texttt{multicol} package in the preamble,
-% action that \texttt{mismath} does not automatically do.
+% But you have to load \textsf{multicol} package in the preamble.
% \begin{mathcols}
% & \frac{1}{2 \mul \pow{\frac{1}{4}}{n} + 1} \geq 0.999 \\
% \iff\ & 1 \geq 1.998 \pow{\frac{1}{4}}{n} + 0.999 \\
@@ -680,8 +714,9 @@
% \end{mathcols}
%
% \DescribeMacro{\changecol}
-% Aligment is produced using classic |&| and |\\| and
-% |\changecol| macro causes a change of column.
+% The |\changecol| macro causes a change of column;
+% aligment is produced using classic delimiters |&| and |\\|.
+%
% \begin{verbatim}
%\begin{mathcols}
% & \frac{1}{2 \mul \pow{\frac{1}{4}}{n} + 1} \geq 0.999 \\
@@ -706,26 +741,32 @@
\RequirePackage{ifthen}
\RequirePackage{xspace}
\RequirePackage{mathtools}
+\RequirePackage[frac,root]{mathfixs}
% \end{macrocode}
% The above conditional packages loading avoids ``option clash'' errors if the packages
% have been previously loaded with options.
%
% \medskip
-% The two following commands are meta commands for
-% conditional macro definitions with warning message if the macro already exists.
+% The three following internal commands are meta commands for a
+% conditional macro definition with warning message if the macro already exists.
+% \DescribeMacro{\bslash}
+% The |\bslash| macro used inside |\@mwarning| comes from \textsf{doc.sty} package
+% by Frank Mittelbach. It can also be used in other documents instead of |\textbackslash|
+% (which doesn't work here).
% \begin{macrocode}
+{\catcode`\|=\z@ \catcode`\\=12 |gdef|bslash{\}} % the \bslash command
\newcommand\@mwarning[1]{
\PackageWarning{mismath}{
- Command \ #1 already exist and will not be redefined
- } % TODO \bslash from doc.sty doesn't produce a blank space after \
+ Command \bslash #1 already exist and will not be redefined
+ }
}
\newcommand\@mmacro[2]{
\@ifundefined{#1}{
\expandafter\def\csname #1\endcsname{#2}
}{\@mwarning{#1}}
}
-\newcommand\@moperator[3][]{% this macro is ugly, TODO by default #1=#3
- \ifthenelse{\equal{#1}{}}{
+\newcommand\@moperator[3][]{% this macro is ugly, TODO: by default #1=#3
+ \ifthenelse{\equal{#1}{}}{
\@ifundefined{#3}{
\DeclareMathOperator{#2}{#3}
}{\@mwarning{#3}}
@@ -736,21 +777,21 @@
}
}
-\DeclareSymbolFont{up}{\encodingdefault}{\familydefault}{m}{n}
-
% \end{macrocode}
%
-% To work correctly with \textsf{beamer} package, we did not use |\mathrm|
-% but |\mathup| (based on \textsf{mathopn} |\operatorfont|
-% to produce the correct upright shape font).
+% To work correctly with the \textsf{beamer} package, we did not use |\mathrm|
+% but |\mathup| (based on |\operatorfont| from \textsf{mathopn} package)
+% to produce the correct upright shape font.
% This command works also fine with other sans serif fonts like \textsf{cmbright}.
-%
-% |\AtBeginDocument| is necessary to redefine |\i| after calling \textsf{hyperref} package
-% which overwrites the |\i| definition.
% Moreover for \textsf{beamer}, |\enumber| must use
-% the familydefault font defined by this package (sans serif),
+% the family default font defined by \textsf{beamer} package (sans serif),
% therefore the |\AtBeginDocument| inside the macro (otherwise it has no effect).
% The same holds for |\inumber| and |\jnumber|.
+%
+% |\AtBeginDocument| is also necessary to redefine |\i| when calling \textsf{hyperref} package
+% which overwrites the |\i| definition.
+%
+% \medskip
% \begin{macrocode}
\providecommand{\mathup}[1]{{\operatorfont #1}}
\@mmacro{e}{\mathup{e}}
@@ -758,6 +799,8 @@
\renewcommand{\i}{\TextOrMath{\oldi}{\mathup{i}}}
\renewcommand{\j}{\TextOrMath{\oldj}{\mathup{j}}}
}
+
+\DeclareSymbolFont{up}{\encodingdefault}{\familydefault}{m}{n}
\newcommand{\enumber}{
\AtBeginDocument{\DeclareMathSymbol{e}\mathalpha{up}{`e}}
}
@@ -861,6 +904,7 @@
\@mmacro{ds}{\displaystyle}
\@mmacro{dlim}{\lim\limits}
\@mmacro{dsum}{\sum\limits}
+\@mmacro{dprod}{\prod\limits}
\@mmacro{dcup}{\bigcup\limits}
\@mmacro{dcap}{\bigcap\limits}
\@mmacro{lbar}{\overline}
@@ -910,7 +954,7 @@
}
% \end{macrocode}
%
-% \begin{thebibliography}{14}
+% \begin{thebibliography}{17}
% \bibitem{TYPMA} \emph{Typesetting mathematics for science and technology according
% to ISO 31/XI}, Claudio Beccari, TUGboat Volume 18 (1997), No.~1.
% \bibitem{NIST} \emph{Typefaces for Symbols in Scientific Manuscripts}.\\
@@ -923,6 +967,7 @@
% Michael Downes, Davis M.~Jones, David Carlisle, CTAN, v2.17b 2018/12/01.
% \bibitem{TOOL} \emph{The \textsf{mathtool} package}. Morten Høgholm, Lars Madsen, CTAN,
% v1.21 2018/01/08.
+% \bibitem{MFIX} \emph{The \textsf{mathfixs} Package}. Niklas Beisert, CTAN, v1.01 2018/12/30.
% \bibitem{VECT} \emph{Typesetting vectors with beautiful arrow with \LaTeXe}.
% \textsf{esvect} package by Eddie Saudrais, CTAN, v1.3 2013/07/11.
% \bibitem{GREEK} \emph{The \textsf{upgreek} package for \LaTeXe}, Walter Schmidt,
@@ -933,6 +978,9 @@
% Günter Milde, CTAN, v0.6.1 04/06/2012.
% \bibitem{INT} \emph{The \textsf{interval} package}. Lars Madsen, CTAN,
% v0.3 2014/08/04.
+% \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{FR} \emph{L'extension \textsf{frenchmath}}. Antoine Missier, CTAN, v1.2 2019/04/27.
% \bibitem{LSHORT} \emph{The Not So Short Introduction to \LaTeXe}. \texttt{lshort} package by
% Tobias Oetiker, Hubert Partl, Irene Hyna and Elisabeth Schlegl, CTAN, v6.2 2018/02/28.