summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/mismath/mismath.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-23 21:01:32 +0000
committerKarl Berry <karl@freefriends.org>2019-06-23 21:01:32 +0000
commit603d2299ca95988419c592dcede99fe9b328cdae (patch)
tree3f5f654fb14ae5f6ca81d5aa3cbf604893b9ea34 /Master/texmf-dist/source/latex/mismath/mismath.dtx
parent62b80b39dd7041484514f60bba41725c46cdb015 (diff)
mismath (23jun19)
git-svn-id: svn://tug.org/texlive/trunk@51436 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/mismath/mismath.dtx')
-rw-r--r--Master/texmf-dist/source/latex/mismath/mismath.dtx119
1 files changed, 72 insertions, 47 deletions
diff --git a/Master/texmf-dist/source/latex/mismath/mismath.dtx b/Master/texmf-dist/source/latex/mismath/mismath.dtx
index f9df5ec1471..5ec076d17a3 100644
--- a/Master/texmf-dist/source/latex/mismath/mismath.dtx
+++ b/Master/texmf-dist/source/latex/mismath/mismath.dtx
@@ -20,7 +20,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}
- [2019/05/22 v1.4 .dtx mismath file]
+ [2019/06/22 v1.5 .dtx mismath file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -58,7 +58,7 @@
%</driver>
% \fi
%
-% \CheckSum{1844}
+% \CheckSum{1897}
%
% \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
@@ -79,16 +79,18 @@
% \changes{v0.1}{2011/12/27}{First personal version}
% \changes{v1.0}{2019/04/11}{Initial published version, creating dtx and ins files}
% \changes{v1.1}{2019/04/20}{Some forgotten french 'et' -> 'and', citecolor=blue}
-% \changes{v1.1}{2019/04/20}{Changing de default font for pinumber Euler -> Symbol}
+% \changes{v1.1}{2019/04/20}{Changing the default font for pinumber Euler -> Symbol}
% \changes{v1.2}{2019/04/26}{Works fine with beamer now,
% AtBeginDocument for enumber, inumber, jnumber,
% creating general @moperator macro, using mathup instead of mathrm}
% \changes{v1.2}{2019/04/27}{Added mathtools package, font definition Roman -> up,
-% changes in documentation, removing PEroman macro}
+% changes in documentation, removing the PEroman macro}
% \changes{v1.3}{2019/05/05}{Using bslash in the internal @mwarning macro}
% \changes{v1.3}{2019/05/08}{Many corrections in documentation}
% \changes{v1.4}{2019/05/22}{Changing font definition up -> UpSh,
% due to incompatibility with unicode-math}
+% \changes{v1.5}{2019/05/30}{A solution for using mul with frac, adding paren macro}
+% \changes{v1.5}{2019/06/22}{small corrections in documentation}
%
% \GetFileInfo{mismath.sty}
%
@@ -96,7 +98,7 @@
% 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{May 22, 2019}
+% \date{June 22, 2019}
% \maketitle
%
% \section{Introduction}
@@ -112,7 +114,7 @@
% in bold italic style~\cite{NIST}~\cite{ICTNS},
% they are often represented with arrows
% (particularly in school documents or in physics).
-% To draw pretty arrows above vectors, we use \textsf{esvect} package
+% To draw pretty arrows above vectors, we use the \textsf{esvect} package
% by Eddie Saudrais~\cite{VECT}
% and we provide a few more macros related to vectors with arrows,
% in particular to improve the typesetting of the norm: $\norm{\vect{AB}}$
@@ -154,12 +156,12 @@
%
% \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
+% like other variables~\cite{ICTNS}. This is automatically done with the \textsf{fixmath} package
% 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.
+% or you can do |\ProvideMathFix{greekcaps}| in the preamble, thanks to the \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}
+% have to be typeset in upright shape\footnote{The \textsf{frenchmath} package~\cite{FR}
% takes this rule into account.}.
% The choice of loading or not one of these packages remains thus to the user.
%
@@ -181,7 +183,7 @@
% using \texttt{\bslash mathup} instead
% of \texttt{\bslash mathrm}.}),
% \DescribeMacro{\e} \DescribeMacro{\i} \DescribeMacro{\j}
-% the package provides |\e| command for the base of natural logarithm
+% the package provides |\e| command for the base of the 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
@@ -209,12 +211,12 @@
%
% \medskip
% \DescribeMacro{\pinumber\oarg{font}}
-% Mathematical constant $\pi$ should also be typeset in upright shape,
-% which differs from italicized $\itpi$ (see~\cite{ICTNS} and~\cite{ISO}).
+% Mathematical constant $\pi$ should also be typeset in upright shape
+% (see~\cite{ICTNS} and~\cite{ISO}), which differs from italicized $\itpi$.
% 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 by using commands such as |\upalpha|, |\upbeta|,\ldots\@
-% To avoid typing a lot of |\uppi|, one can use the |\pinumber| macro,
+% To avoid typing a lot of |\uppi|, we provide 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 the |\pi|
@@ -236,7 +238,7 @@
% 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}
+% (thanks to the \textsf{esvect} package by Eddie Saudrais\footnote{\textsf{esvect}
% 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}$).
@@ -301,12 +303,12 @@
% obtained with |\hvect{a}|.
% \end{itemize}
% The |\boldvect| switch has no effect on the |\hvect| macro which always typesets
-% arrows on vectors (with the |\vv| command from \textsf{esvect} package).
+% arrows on vectors (with the |\vv| command from the \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):
+% the \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}$, obtained with |\hvec{v}|;
@@ -315,7 +317,7 @@
% \end{itemize}
%
% \DescribeMacro{\norm}
-% The norm of a vector is classically produced by delimiters |\lVert| and |\rVert|
+% The norm of a vector is classically produced by the 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,
@@ -331,7 +333,7 @@
% 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 get this, use the |\di| command.
+% For this, we provide 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: \\
@@ -405,13 +407,13 @@
% When |\boldvect| is activated, they are typeset in bold style:
% $\boldvect \grad, \curl, \rot$.
% For the covariance and the identity function,
-% two notations are provided, with or without a first capital letter,
-% because they are both very frequent.
+% two notations are proposed, with or without a first capital letter,
+% because they are both very common.
% 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;
+% and haven't been redefined, therefore the |\divg| and |\spa| macros;
% |\Z| is used otherwise (see further), therefore |\Zu|,
% to designate the center of a group: $\Zu(G)$ (from German Zentrum).
%
@@ -420,10 +422,10 @@
% 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's still possible to get old symbols with |\oldRe| and |\oldIm|.
+% but it's still possible to get the old symbols with |\oldRe| and |\oldIm|.
%
% \medskip
-% Some (inverse) circular or hyperbolic fonctions, missing
+% Some (inverse) circular or hyperbolic functions, missing
% in \LaTeX, are also provided by \textsf{mismath}:
% \begin{center}
% \begin{tabular}{rlrlrl}
@@ -460,7 +462,7 @@
%
% \medskip
% \DescribeMacro{\ds}
-% The |\displaystyle| command being very frequent, common alias |\ds| is provided.
+% The |\displaystyle| command being very common, alias |\ds| is provided.
% Not only it eases typing but also it makes source code more readable.
%
% \medskip
@@ -476,8 +478,8 @@
% 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:
+% only transforms the required fraction in display style, we can limit
+% display style effect to the affected symbol, by using the following macros:
% |\dlim|, |\dsum|, |\dprod|, |\dcup|, |\dcap|.
% So |$\dlim_{x\to +\infty}\frac{1}{x}$| gives $\dlim_{x \to +\infty}\frac{1}{x}$.
%
@@ -486,7 +488,7 @@
% 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.
+% the |\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'}$,
% obtained with |\hlbar{z}|.
@@ -529,7 +531,7 @@
%
% \DescribeMacro{\mul}
% The multiplication symbol obtained with |\times| produces the same spacing than addition
-% or substraction operators, whereas division obtained with $/$ is tighten around its arguments.
+% or substraction operators, whereas division obtained with $/$ is closer to its arguments.
% This actually hides the priority of the multiplication on $+$ and $-$.
% This is why we provide the |\mul| macro, behaving like $/$
% (ordinary symbol) and leaving less space around than |\times|:
@@ -538,6 +540,18 @@
% is less than $\lambda+\alpha \mul b-\beta \mul c$, obtained with |\mul|.
% \end{center}
%
+% When using |\mul| with fractions, irregular spacing may occur due to the \texttt{frac}
+% feature of the \textsf{mathfixs} package. As explained in the \textsf{mathfixs}
+% documentation~\cite{MFIX}, a solution to eliminate spaces around a fraction, is
+% to enclose the fraction with brackets:
+% |{\frac|\marg{num}\marg{denom}|}|\footnote{We have the same problem
+% and the same solution when using \texttt{\bslash mul} before an operator name
+% or a \texttt{\bslash left...\bslash right} structure.}.
+% \begin{center}
+% $x\mul\dfrac{1}{x}$ is less than $x\mul{\dfrac{1}{x}}$
+% obtained with |x\mul{\dfrac{1}{x}}|.
+% \end{center}
+%
% \DescribeMacro{\then}
% The |\then| macro produces the symbol $\Longrightarrow$ surrounded by large spaces
% as the standard macro |\iff| does it with $\Longleftrightarrow$.
@@ -549,6 +563,17 @@
% |\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{\paren}
+% Spaces around parenthesis produced by |\left(...\right)| may be too large, for example
+% after a function name or a point name with coordinates.
+% A solution is to add a thin negative space |\!| before the opening (or after the closing)
+% parenthesis or to enclose the
+% |\left(...\right)| structure by brackets, or to use the |\paren| macro:
+% \begin{center}
+% $\sin\left(\frac{\pi}{3}\right)\mul 2$ is less than $\sin\paren{\frac{\pi}{3}}\mul 2$
+% obtained with \\[1ex] |\sin\paren{\frac{\pi}{3}}\mul 2|.
+% \end{center}
%
% \DescribeMacro{\pow}
% When typesetting an exponent after a closing \emph{big} parenthesis produced by |\right)|,
@@ -569,10 +594,9 @@
% \texttt{\bslash DeclarePairedDelimiter} command
% from the \textsf{mathtool} package~\cite{TOOL}.}.
%
-% \medskip
+% \pagebreak
% \DescribeMacro{\lfrac}
-% This macro behaves like |\frac|\footnote{\texttt{\bslash frac} is redefined
-% by \textsf{mathfixs} package to produce better surrounding space.}
+% This macro behaves like |\frac|
% but with medium spaces around the arguments,
% so the corresponding fraction bar is perceptibly a little bit longer:\\
% \begin{minipage}[t]{8cm}
@@ -625,7 +649,7 @@
% \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).
+% closer to the bracket (which makes sense 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}|,
@@ -654,7 +678,7 @@
% \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).
-% This spacing may be changed 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.
% In addition we can use a carriage return with a spacing option such
@@ -681,14 +705,14 @@
%
% \medskip
% \DescribeEnv{spmatrix}
-% \textsf{amsmath} package provides various environments to typeset matrices:
-% for instance \texttt{pmatrix} that surrounds the matrix with parenthesis
-% or \texttt{smallmatrix} that typesets a small matrix that can even be inserted
+% The \textsf{amsmath} package provides various environments to typeset matrices:
+% for instance \texttt{pmatrix} surrounds the matrix with parenthesis
+% or \texttt{smallmatrix} typesets a small matrix that can even be inserted
% 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
+% The \textsf{mathtools} package enhance \textsf{amsmath} matrices environments
% and provides also a small matrix environment with parenthesis.
% Furthermore, with starred version |\begin{psmallmatrix*}|\oarg{col},
% you can choose the alignment inside the columns (\texttt{c}, \texttt{l} or \texttt{r}).
@@ -700,10 +724,10 @@
% \subsection{Displaymath in double columns}
%
% \DescribeEnv{mathcols}
-% \texttt{mathcols} environment activates mathematical mode and enables to arrange ``long''
+% The \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 you have to load \textsf{multicol} package in the preamble.
+% But you have to load the \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 \\
@@ -717,7 +741,7 @@
%
% \DescribeMacro{\changecol}
% The |\changecol| macro causes a change of column;
-% aligment is produced using classic delimiters |&| and |\\|.
+% aligment is produced using the classic delimiters |&| and |\\|.
%
% \begin{verbatim}
%\begin{mathcols}
@@ -746,7 +770,7 @@
\RequirePackage[frac,root]{mathfixs}
% \end{macrocode}
% The above conditional packages loading avoids ``option clash'' errors if the packages
-% have been previously loaded with options.
+% have been previously loaded with (other) options.
%
% \medskip
% The three following internal commands are meta commands for a
@@ -782,16 +806,16 @@
% \end{macrocode}
%
% To work correctly with the \textsf{beamer} package, we did not use |\mathrm|
-% but |\mathup| (based on |\operatorfont| from \textsf{mathopn} package)
+% but |\mathup| (based on |\operatorfont| from the \textsf{mathopn} package)
% to produce the correct upright shape font.
% This command works also fine with other sans serif fonts like \textsf{cmbright}.
% Moreover for \textsf{beamer}, |\enumber| must use
-% the family default font defined by \textsf{beamer} package (sans serif),
+% the family default font defined by the \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.
+% |\AtBeginDocument| is also necessary to redefine |\i| when calling
+% the \textsf{hyperref} package which overwrites the |\i| definition.
%
% \medskip
% \begin{macrocode}
@@ -918,10 +942,11 @@
\@mmacro{mul}{\mathord{\times}}
\@mmacro{then}{\ \Longrightarrow \ \mbox{} }
% \end{macrocode}
-% Without |\mbox{}| the space produced by |\| would be suppressed in tabulars.
+% Without |\mbox{}|, the space produced by |\| would be suppressed in tables.
% \medskip
% \begin{macrocode}
\providecommand*{\txt}[1]{\quad\text{#1}\quad}
+\providecommand*{\paren}[1]{\mathopen{\left(#1\right)}}
\providecommand*{\pow}[2]{\left( #1 \right)^{\!#2}}
\providecommand*{\abs}[1]{\left\vert#1\right\vert}
\providecommand*{\lfrac}[2]{\frac{\:#1\:}{\:#2\:}}
@@ -983,7 +1008,7 @@
% \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{FR} \emph{L'extension \textsf{frenchmath}}. Antoine Missier, CTAN, v1.4 2019/05/22.
% \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.
% \bibitem{COMP} \emph{The \LaTeX\ Companion}. Frank Mittelbach, Michel Goossens,