summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mismath
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-12-20 03:01:51 +0000
committerNorbert Preining <norbert@preining.info>2023-12-20 03:01:51 +0000
commit04c437f630dc0457787999e2779770fa77bdb601 (patch)
tree1a8de076bf460f11a4eec923f1b1b41932d856f9 /macros/latex/contrib/mismath
parent60e9a31bad8271499f6b5f9280174e76bd62814f (diff)
CTAN sync 202312200301
Diffstat (limited to 'macros/latex/contrib/mismath')
-rw-r--r--macros/latex/contrib/mismath/README.md2
-rw-r--r--macros/latex/contrib/mismath/mismath.dtx136
-rw-r--r--macros/latex/contrib/mismath/mismath.pdfbin273395 -> 276197 bytes
3 files changed, 87 insertions, 51 deletions
diff --git a/macros/latex/contrib/mismath/README.md b/macros/latex/contrib/mismath/README.md
index 2cb96b216e..caba9f3da7 100644
--- a/macros/latex/contrib/mismath/README.md
+++ b/macros/latex/contrib/mismath/README.md
@@ -8,7 +8,7 @@ The package provides some mathematical macros to typeset:
- vectors with beautiful arrows and adjusted norm,
- tensors,
- some standard operator names,
-- enhancing spacings in mathematical formulas,
+- improved spacings in mathematical formulas,
- systems of equations and small matrices,
- displaymath in double columns for lengthy calculations.
diff --git a/macros/latex/contrib/mismath/mismath.dtx b/macros/latex/contrib/mismath/mismath.dtx
index 108f3e1b75..1d601eff84 100644
--- a/macros/latex/contrib/mismath/mismath.dtx
+++ b/macros/latex/contrib/mismath/mismath.dtx
@@ -20,7 +20,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}
- [2023/07/27 v2.8 .dtx mismath file]
+ [2023/12/19 v2.9 .dtx mismath file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -69,7 +69,7 @@
%</driver>
% \fi
%
-% \CheckSum{624}
+% \CheckSum{631}
%
% \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
@@ -197,13 +197,17 @@
% - Some small changes in the documentation
% - New macro `onlymathC' designed for using '\C' when Russian language is loaded}
%
+% \changes{v2.9}{2023/12/19}{
+% - New option decimalcomma
+% - Some small changes in the 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.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{July 27, 2023}
+% \date{December 19, 2023}
%
% \maketitle
% \tableofcontents
@@ -274,7 +278,7 @@
% where all capital letters in mathematics
% are required to be typeset in upright shape
% \footnote{By using the \textsf{frenchmath} package~\cite{FR},
-% you can ensure that the recommended french rule is followed in your document.}.
+% you can ensure that the recommended French rule is followed in your document.}.
% The decision to load any of these packages is left to the user's discretion.
%
% \section{Usage}
@@ -861,24 +865,22 @@
% \footnote{This functionality is optional because it causes
% errors when using a command defined by
% \texttt{\bslash DeclarePairedDelimiter}~\cite{TOOL} with square brackets.}
-% loaded by \textsf{mismath} using the \texttt{ibrackets} package option
-% \footnote{It is the only option specific to the \textsf{mismath} package.}.
-%
-% Simply type |$x\in ]-\pi,0[ \cup ]2\pi,3\pi[$| to get
-% \begin{align*}
-% x\in ]-\pi, 0[ \cup ]2\pi, 3\pi[ &\mbox{\quad with \textsf{ibrackets}}, \\
-% \mbox{instead of \quad}
+% 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{\quad without \textsf{ibrackets}}.
+% &\mbox{\ without \textsf{ibrackets}}.
% \end{align*}
-% In our code, the symbols $[$ and $]$
-% and are not defined by default as delimiters.
-% Therefore, a line break could occur between the two brackets. However,
+%
+% In our code, the symbols $[$ and $]$ are set as `active' characters,
+% behaving like ordinary characters and not as delimiters in most cases.
+% Therefore, a line break could occur between the two brackets, but
% it is always possible to transform them
% into delimiters using |\left| and |\right|.
%
-% With the \textsf{ibrackets} package, brackets are set as ``active'' characters,
-% behaving like ordinary characters in most cases.
% However, when a bracket is \emph{immediately} followed by a + or - character,
% it becomes an open delimiter.
% Therefore, when the left bound contains an operator sign,
@@ -888,9 +890,9 @@
% instead of $x \in ]-\infty, 0]$.
% Conversely, when dealing with algebraic expressions involving intervals,
% \emph{you must leave a blank space between the second bracket and the} +/-
-% \emph{operations}.
-% For instance |$[a, b] + [c, d]$| yields $[a, b] + [c, d]$
-% but |$[a, b]+ [c, d]$| yields $[a, b]+ [c, d]$.
+% \emph{operation}.
+% For instance |$[a,b] + [c,d]$| yields $[a,b] + [c,d]$
+% but |$[a,b]+ [c,d]$| yields $[a, b]+ [c, d]$.
%
% Besides, there are other approaches, for example the |\interval| macro
% from the \textsf{interval} package~\cite{INT},
@@ -898,6 +900,30 @@
% (but the latter is incompatible with \textsf{ibrackets}
% for managing brackets).
%
+% \medskip
+%\DescribeMacro{[decimalcomma]}
+% In many countries, except notably in Anglo-Saxon 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 is not appropriate 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 decimal comma in math mode:
+% \textsf{icomma} by Walter Schmidt~\cite{ICOMMA} and
+% \textsf{ncccomma} by Alexander I.~Rozhenko~\cite{NCC}.
+% The second package takes a more generic approach,
+% however it poses several compatibility issues,
+% in particular when compiling with Lua\LaTeX, using \textsf{unicode-math}
+% and calling |\setmathfont|.
+% Therefore we propose the \textsf{decimalcomma} package~\cite{DEC},
+% functionally identical to that of \textsf{ncccomma} but with lighter code
+% and without the aforementioned incompatibility.
+% It can be loaded by \textsf{mismath} using the \texttt{decimalcomma}
+% package option\footnote{\texttt{ibrackets} and \texttt{decimalcomma} are the only
+% options specific to the \textsf{mismath} package.}.
+%
% \subsection{Environments for systems of equations and small matrices}
%
% \DescribeEnv{system}
@@ -1046,14 +1072,14 @@
% \end{verbatim}
%
% \vspace{-4ex}
-% \subsection{Deprecated commands}
+% \subsection{Old commands}
%
-% Here is a summary table of the deprecated commands that were used until version 2.2.
+% Here is a summary table of old commands that were used until version 2.2.
% These commands are still functional and will be maintained for the time being,
-% but they do produce a warning message.
+% but a warning message indicates the new alternative.
% They used to work only in the preamble, affecting the entire document globally,
% and lacked an inverse switch.
-% As a result, these deprecated commands are now being replaced by the more
+% These old commands can now be replaced by the more
% versatile and powerful |\MathUp| macro, which can be used anywhere
% in the document or preamble and has an inverse switch |\MathIt|.
%
@@ -1061,7 +1087,7 @@
% \setlength{\extrarowheight}{1pt}
% \begin{tabular}{ll}
% \hline
-% Deprecated command & New alternative \\
+% Old command & New alternative \\
% \hline
% |\enumber| & |\MathUp{e}| \\
% |\inumber| & |\MathUp{i}| \\
@@ -1078,7 +1104,7 @@
% and you can include V in its argument to refer to variance.
%
% \medskip
-% In version 2.3 we attempted to replace these deprecated commands
+% In version 2.3 we attempted to replace these old commands
% with package options based on keyval. However, we found that this method was
% less efficient and have decided to abandon it.
% As a result, the command |\mismathset| is now obsolete.
@@ -1090,7 +1116,9 @@
%
% \begin{macrocode}
\newif\ifmm@ibrackets % initialized to false
+\newif\ifmm@decimalcomma
\DeclareOption{ibrackets}{\mm@ibracketstrue}
+\DeclareOption{decimalcomma}{\mm@decimalcommatrue}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{amsmath}}
\ProcessOptions \relax
\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
@@ -1101,10 +1129,11 @@
\RequirePackage{xspace}
\RequirePackage{iftex}
\ifmm@ibrackets\RequirePackage{ibrackets}\fi
+\ifmm@decimalcomma\RequirePackage{decimalcomma}\fi
% \end{macrocode}
-% The above conditional packages loading prevents ``option clash'' errors in case
-% these packages have been previously loaded previously with different options.
+% We have load certain packages conditionally to avoid 'option clash' errors in cases
+% where these packages have been previously loaded with other options.
%
% \medskip
% \DescribeMacro{\bslash}
@@ -1253,18 +1282,18 @@
% \DescribeMacro{\apply}
% With the inverse global switch |\MathNormal|, you can apply the normal (italic) style
% on any comma-separated list of characters. This is achieved using
-% the |\apply| macro, for example |\apply\macro{arg1,arg2}|
+% the |\apply| macro, \eg |\apply\macro{arg1,arg2}|
% expands to |\macro{arg1}\macro{arg2}|.
-% So using |\apply\MathUp{e,i,j}| is equivalent to |\MathUp{e}\MathUp{i}\MathUp{j}|.
-% I discovered this powerfull macro on Tex RSSing.com by searching for
+% Thus |\apply\MathUp{e,i,j}| is equivalent to |\MathUp{e}\MathUp{i}\MathUp{j}|.
+% I discovered this powerfull macro on \texttt{iterate190.rssing.com} by searching for
% ``TeX How to iterate over a comma separated list?''
-% The answer was provided by a user named ``wipet'' on 2021/02/26.
-% I don't know who is wipet but I am grateful for his contribution,
-% as this macro allows us to accomplish the task that
+% The answer was posted under the pseudonym `wipet' on 2021/02/26.
+% Let its author, Petr Olšák, be thanked.
+% This macro allows to accomplish tasks that
% usual loop instructions like |\@for| or |\foreach| cannot achieve due to
% errors like ``!~Improper alphabetic constant''.
% For instance, if you try |\def\letter{A} \MathUp{\letter}| it will fail
-% because the control sequence |\letter| is not considered as the single character `A'.
+% because the control sequence |\letter| is not equivalent here to the single character `A'.
%
% \medskip
% \begin{macrocode}
@@ -1279,7 +1308,7 @@
% \end{macrocode}
%
-% The following commands are deprecated but still work.
+% The following commands were used until version 2.2 but still work.
% They were intended to set some letters in upright shape
% in math mode, but only worked in the preamble.
% This is now managed by the more powerful |\MathUp| command, and
@@ -1288,27 +1317,28 @@
%
% \begin{macrocode}
\newcommand{\enumber}{%
- \PackageWarning{mismath}{Command \string\enumber\space
- is deprecated, \MessageBreak
- use \bslash MathUp{e} instead}
+ \PackageWarning{mismath}{Old command \string\enumber\space
+ is used. \MessageBreak
+ It can be replaced by \bslash MathUp{e}}
\MathUp{e}
}
\newcommand{\inumber}{%
- \PackageWarning{mismath}{Command \string\inumber\space
- is deprecated, \MessageBreak
- use \bslash MathUp{i} instead}
+ \PackageWarning{mismath}{Old command \string\inumber\space
+ is used. \MessageBreak
+ It can be replaced by \bslash MathUp{i}}
\MathUp{i}
}
\newcommand{\jnumber}{
- \PackageWarning{mismath}{Command \string\jnumber\space
- is deprecated, \MessageBreak
- use \bslash MathUp{j} instead}
+ \PackageWarning{mismath}{Old command \string\jnumber\space
+ is used. \MessageBreak
+ It can be replaced by \bslash MathUp{j}}
\MathUp{j}
}
\newcommand{\PEupright}{
- \PackageWarning{mismath}{Command \string\PEupright\space
- is deprecated, \MessageBreak
- use \bslash MathUp{P} and \bslash MathUp{R} instead}
+ \PackageWarning{mismath}{Old command \string\PEupright\space
+ is used. \MessageBreak
+ It can be replaced by \bslash MathUp{P}
+ and \bslash MathUp{E}}
\MathUp{P}\MathUp{E}
}
@@ -1529,8 +1559,8 @@
\begin{math}\begin{aligned}\displaystyle
}
% \end{macrocode}
-% \bigskip
-% \begin{thebibliography}{24}
+% \pagebreak
+% \begin{thebibliography}{27}
% \begin{raggedright}
% \bibitem{TYPMA} \emph{Typesetting mathematics for science and technology according
% to ISO 31/XI}, Claudio Beccari, TUGboat Volume 18 (1997), No.~1.
@@ -1570,6 +1600,12 @@
% \bibitem{LGR} \emph{The \textsf{lgrmath} package}, Jean-François B., CTAN, v1.0 2022/11/16.
% \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.0 2023/12/06.
% \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.
diff --git a/macros/latex/contrib/mismath/mismath.pdf b/macros/latex/contrib/mismath/mismath.pdf
index 0ba40a0458..e55f6ede13 100644
--- a/macros/latex/contrib/mismath/mismath.pdf
+++ b/macros/latex/contrib/mismath/mismath.pdf
Binary files differ