summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mismath
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-26 03:03:16 +0000
committerNorbert Preining <norbert@preining.info>2022-12-26 03:03:16 +0000
commit200df2fd74322d3c7b4bb2a69e711a40265ead1b (patch)
tree9a545919fa0f041b8bac6341e8afb7b7b555ff8e /macros/latex/contrib/mismath
parent90ef58ebc56f69220f860d466e1e21ed68ce9a55 (diff)
CTAN sync 202212260303
Diffstat (limited to 'macros/latex/contrib/mismath')
-rw-r--r--macros/latex/contrib/mismath/mismath.dtx353
-rw-r--r--macros/latex/contrib/mismath/mismath.pdfbin247979 -> 257797 bytes
2 files changed, 212 insertions, 141 deletions
diff --git a/macros/latex/contrib/mismath/mismath.dtx b/macros/latex/contrib/mismath/mismath.dtx
index b7ffaeb874..2f64b37985 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}
- [2022/11/11 v2.0 .dtx mismath file]
+ [2022/12/26 v2.1 .dtx mismath file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -28,7 +28,7 @@
\usepackage[T1]{fontenc}
%\usepackage{textcomp}
\usepackage[english]{babel}
-\usepackage[charter]{mathdesign} % if changing font, modify 2.1 (3rd §)
+\usepackage[charter]{mathdesign} % in case of font change, modify 2.1 (3rd §)
\usepackage{mismath}
%\usepackage{amssymb} incompatible with mathdesign
\usepackage{multicol}
@@ -42,9 +42,6 @@
\DeclareMathSymbol{\mypi}\mathalpha{UpGr}{"70}
% For showing original \i and \j in text mode:
\DeclareTextFontCommand{\extrafont}{\fontfamily{lmr}\selectfont}
-% For an example in this doc we substitute [ and ] by \OB and \CB:
-\DeclareMathSymbol{\OB}\mathclose{operators}{093}
-\DeclareMathSymbol{\CB}\mathopen{operators}{091}
\DisableCrossrefs
%\CodelineIndex
@@ -66,7 +63,7 @@
%</driver>
% \fi
%
-%% \CheckSum{440}
+%% \CheckSum{454}
%
% \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,38 +82,74 @@
% Right brace \} Tilde \~}
%
% \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 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 the PEroman macro}
-% \changes{v1.3}{2019/05/05}{Using bslash in the internal @mwarning macro,
-% loading of mathfixs package}
-% \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, addition of paren macro}
-% \changes{v1.5}{2019/06/22}{small corrections in documentation}
-% \changes{v1.6}{2019/09/06}{Removing mathfixs package}
-% \changes{v1.7}{2019/12/27}{Adding a table of contents to the documentation}
-% \changes{v1.8}{2020/11/15}{Incompatibility and solution mentioned when using i
-% with accent in beamer titles small changes in documentation}
-% \changes{v1.9}{2020/10/17}{UpSh replaced by "operators" font in math mode,
-% PackageWarning "command exist" replaced by PackageWarningNoLine,
-% and also used by commands with arguments,
-% medspace replaced by thickspace in the \bslash lfrac command,
-% changing font in documentation, now Palatino (mathpazo)}
-% \changes{v1.10}{2020/10/25}{\bslash pinumber command code adapted to avoid
-% incompatibility with the new release of frenchmath,
-% default option (in upgreek) changed from Symbol to Euler.}
-% \changes{v2.0}{2022/11/11}{pinumber command has been improved using by default
-% LGR encoding, it is no longer compatible with the older,
-% paren command has been removed,
-% hvect and hlbar have been slighlty modified (phantom t instead of phantom h),
-% several changes in documentation, now using the charter font (mathdesign).}
+%
+% \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,
+% - 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 the PEroman macro}
+%
+% \changes{v1.3}{2019/05/05}{
+% - Using bslash in the internal @mwarning macro,
+% - loading of mathfixs package}
+% \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 -> braces,
+% - addition of paren macro}
+% \changes{v1.5}{2019/06/22}{
+% - Small corrections in documentation}
+%
+% \changes{v1.6}{2019/09/06}{
+% - Removing mathfixs package, problems with fractions}
+%
+% \changes{v1.7}{2019/12/27}{
+% - Adding a table of contents to the documentation}
+%
+% \changes{v1.8}{2020/11/15}{
+% - Incompatibility mentioned when using `i' with accent in beamer titles -> use \^i,
+% - small changes in documentation}
+%
+% \changes{v1.9}{2020/10/17}{
+% - UpSh replaced by "operators" font in math mode,
+% - PackageWarning `command exist' replaced by PackageWarningNoLine,
+% - medspace replaced by thickspace in the lfrac command,
+% - changing font in documentation, lmodern -> Palatino (mathpazo)}
+%
+% \changes{v1.10}{2020/10/25}{\
+% - pinumber command code adapted to avoid incompatibility with the new frenchmath,
+% - default option (in upgreek) changed from Symbol to Euler.}
+%
+% \changes{v2.0}{2022/11/11}{
+% - pinumber command has been improved to use other Greek letter packages,
+% (and by default LGR encoding), it is no longer compatible with the older,
+% - paren command has been removed,
+% - hvect and hlbar have been slighlty modified (phantom t instead of phantom h),
+% - several changes in documentation,
+% - now using the Charter font (mathdesign)}
+%
+% \changes{v2.1}{2022/12/26}{
+% - Improved management of square brackets with the ibrackets package,
+% - new macros codim, sinc, var, eqdef*,
+% - removing the systematic warning for paren command
+% - a small change in norm command -> bars in small size
+% - several changes in documentation}
%
% \GetFileInfo{mismath.sty}
%
@@ -124,7 +157,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{November 11, 2022}
+% \date{December 26, 2022}
%
% \maketitle
% \tableofcontents
@@ -147,7 +180,7 @@
% and we provide a few more macros related to vectors with arrows,
% in particular to improve the typesetting of the norm: $\norm{\vect{AB}}$
% instead of \LaTeX\ version $\lVert\vect{AB}\rVert$ which is not vertically adjusted,
-% or worse $\left\Vert \vect{AB} \right\Vert$.
+% or worse $\left\Vert \vect{AB} \right\Vert$ (and even ugly with Latin Modern font family).
%
% \smallskip
% The package also provides other macros for:
@@ -180,13 +213,14 @@
%
% Another package,
% \textsf{mathtools} by Morten Høgholm and Lars Madsen~\cite{TOOL}
-% is also loaded. It provides many useful macros.
+% is also loaded. It provides many useful macros and improvements of \textsf{amsmath} package.
%
% \medskip
% A recommendation, seldom observed, is to typeset uppercase Greek letters in italic shape
% like other variables~\cite{ICTNS}. This is automatically done with the packages
-% \textsf{fixmath} by Walter Schmidt~\cite{FIXM}
-% or \textsf{isomath} by Günter Milde~\cite{ISOM} and many others
+% \textsf{fixmath} by Walter Schmidt~\cite{FIXM},
+% \textsf{isomath} by Günter Milde~\cite{ISOM}
+% or \textsf{pm-isomath} by Claudio Beccari~\cite{PMISO} and optionally with many others
% (for instance \textsf{mathpazo} or \textsf{mathptmx} with the option \texttt{slantedGreek}),
% but this feature is not implemented here because this rule is conflicting
% to the one used in France where all mathematics capitals
@@ -250,10 +284,13 @@
% $\e$ and $\i$~\cite{TYPMA}.
% Several packages allow to typeset mathematical Greek letters in upright shape,
% let us mention \textsf{upgreek}~\cite{GREEK}, \textsf{mathdesign}~\cite{DESIGN}
-% (used here), \textsf{kpfonts}, \textsf{fourier}, \textsf{libertinust1math},
-% \textsf{pxgreeks}, \textsf{txgreeks}, \textsf{libgreek} etc.
+% (used here), \textsf{kpfonts}~\cite{KPF}, \textsf{fourier}~\cite{FOUR},
+% \textsf{libertinust1math},
+% \textsf{pxgreeks}, \textsf{txgreeks}, \textsf{libgreek}, etc.
+% A special mention to \textsf{lgrmath} of Jean-François Burnol~\cite{LGR}
+% which allow to use, in math mode, any Greek LGR-encoded font.
% These packages provide commands like |\uppi| (\textsf{upgreek}),
-% |\piup| (\textsf{mathdesign}, \textsf{kpfonts}),
+% |\piup| (\textsf{mathdesign}, \textsf{kpfonts}, \textsf{lgrmath}),
% |\otherpi| (\textsf{fourier}), etc.\footnote{They also have options to
% typeset all the Greek lowercase letters in upright shape by default,
% but this in not our goal here.}
@@ -271,9 +308,9 @@
%
% When no argument is given, |\pinumber| defines |\pi| with an LGR encoding of Greek letters
% to produce $\mypi$. It looks the same as the one supplied with
-% the \textsf{textalpha} package by Günter Milde~\cite{ALPHA}.
+% Günter Milde's \textsf{textalpha} package~\cite{ALPHA}.
% This $\mypi$ is particularly suitable
-% for use with the default Computer Modern or Latin Modern font\footnote{This
+% for use with the default Computer Modern or Latin Modern font family\footnote{This
% default $\mypi$ doesn't fit well with many text fonts, more bold than Computer Modern;
% the \textsf{upgreek} package~\cite{GREEK} provides often a better $\uppi$
% and it has also a \texttt{Symbol} option (using Adobe Symbol font)
@@ -289,10 +326,9 @@
% the definition will take effect only if this macro is not defined before
% by another package.},
% produces vectors with arrows
-% (thanks to the \textsf{esvect} package by Eddie Saudrais\footnote{\textsf{esvect}
+% (thanks to the \textsf{esvect} package of 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}$).
+% which are more elegant than those produced by \LaTeX's |\overrightarrow| command.
% The \textsf{esvect} package has an optional argument
% (one letter between \texttt{a} and \texttt{h}) defining
% the required type of arrow (see~\cite{VECT}).
@@ -371,12 +407,12 @@
% (rather than \texttt{\bslash}$\mid$) or |\left\Vert| and |\right\Vert|
% for delimiters adapting to the content. Unfortunately, these delimiters
% are always vertically centered, relatively to the middle of the base line,
-% whereas vectors with arrows are asymmetric objects,
-% the height above the middle of the base line
-% being superior to the depth under it.
-% The code |$\norm{\vec{h}}$| raises the double bar to produce $\norm{\vec{h}}$.
+% whereas vectors with arrows are asymmetric objects.
+% The code |$\norm{\vec{h}}$| raises a smaller double bar to produce $\norm{\vec{h}}$
+% instead of $\left\Vert \vec{h} \right\Vert$.
% Let's notice that the height of the bars don't adjust to content,
-% but however to context: main text, subscripts or exponents.
+% but however to context: main text, subscripts or exponents,
+% e.g. $\e^{\norm{\vec{h}}}$.
%
% \subsection{Standard operator names}
%
@@ -409,14 +445,16 @@
% 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}
+% \DescribeMacro{\P} \DescribeMacro{\E} \DescribeMacro{\PEupright} \DescribeMacro{\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.
+% in roman 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|.
+% In the same way as for $\i$ and $\j$, you can use |\PEupright| in the preamble
+% to avoid typing many |\P| or |\E|.
+% Variance is generally denoted by $\var$ or $\Var$ (see table below),
+% but some authors prefer to use $\V$, produced by |\V|.
%
% \medskip
% \DescribeMacro{\Par}
@@ -438,17 +476,18 @@
% which has to be called in the preamble.
%
% \medskip
-% The following operator names are also defined in \textsf{mismath}:
+% The following standard operator names are defined in \textsf{mismath}:
% \begin{center}
% \begin{tabular}{rlrlrl}
-% |\adj| & $\adj$ \qquad\mbox{} & |\erf| & $\erf$ \qquad\mbox{} & |\rank| & $\rank$ \\
-% |\Aut| & $\Aut$ & |\grad| & $\grad$ & |\Re| & $\Re$ \\
-% |\Conv| & $\Conv$ & |\id| & $\id$ & |\rot| & $\rot$ \\
-% |\cov| & $\cov$ & |\Id| & $\Id$ & |\sgn| & $\sgn$ \\
-% |\Cov| & $\Cov$ & |\im| & $\im$ & |\spa| & $\spa$ \\
-% |\curl| & $\curl$ & |\Im| & $\Im$ & |\tr| & $\tr$ \\
-% |\divg| & $\divg$ & |\lb| & $\lb$ & |\Var| & $\Var$ \\
-% |\End| & $\End$ & |\lcm| & $ \lcm$ & |\Zu| & $\Zu$
+% |\adj| & $\adj$ \qquad\mbox{} & |\erf| & $\erf$ \qquad\mbox{} & |\Re| & $\Re$ \\
+% |\Aut| & $\Aut$ & |\grad| & $\grad$ & |\rot| & $\rot$ \\
+% |\codim| & $\codim$ & |\id| & $\id$ & |\sgn| & $\sgn$ \\
+% |\Conv| & $\Conv$ & |\Id| & $\Id$ & |\sinc| & $\sinc$ \\
+% |\cov| & $\cov$ & |\im| & $\im$ & |\spa| & $\spa$ \\
+% |\Cov| & $\Cov$ & |\Im| & $\Im$ & |\tr| & $\tr$ \\
+% |\curl| & $\curl$ & |\lb| & $\lb$ & |\var| & $\var$ \\
+% |\divg| & $\divg$ & |\lcm| & $ \lcm$ & |\Var| & $\Var$ \\
+% |\End| & $\End$ & |\rank| & $\rank$ & |\Zu| & $\Zu$
% \end{tabular}
% \end{center}
%
@@ -456,15 +495,17 @@
% rather 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 covariance and the identity function,
+% For the variance, the covariance and the identity function,
% 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 the |\divg| and |\spa| macros;
-% |\Z| is used otherwise (see further), therefore |\Zu|,
+% whereas ``$\Im$'' is the imaginary part of a complex number.
+% Notice that |\div| already exist ($\div$) and |\span| is a \TeX\ primitive
+% (used in |\multicolumn|);
+% they haven't been redefined, therefore the macros |\divg| (divergence)
+% and |\spa| (span of a set of vectors) ;
+% |\Z| is used for the set of integers (see \ref{aliases}), therefore we used |\Zu|,
% to designate the center of a group: $\Zu(G)$ (from German Zentrum).
%
%\medskip
@@ -491,7 +532,7 @@
% |\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).\]
%
-% \subsection{A few useful aliases}
+% \subsection{A few useful aliases} \label{aliases}
%
% In the tradition of Bourbaki and D.~Knuth, proper use requires
% that classic sets of numbers are typeset in bold roman:
@@ -507,7 +548,7 @@
% \DescribeMacro{\mathset}
% The |\mathset| command enables to change the behavior of all these macros in a global way:
% by default, |\mathset| is an alias for |\mathbf|, but if you prefer openwork letters,
-% just place |\renewcommand\mathset{\mathbb}| in the preamble,
+% just place |\renewcommand\mathset{\mathbb}| where you want, for instance in the preamble,
% after loading \textsf{amsfonts} package (which provides the ``blackboard bold'' typeface,
% also loaded by \textsf{amssymb}).
%
@@ -523,12 +564,12 @@
% $\zeta(s)=\sum_{n=1}^{\infty }\frac{1}{n^s}$ with
% \[\zeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}.\]
%
+% \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).
-% \DescribeMacro{\dlim} \DescribeMacro{\dsum} \DescribeMacro{\dprod}
-% \DescribeMacro{\dcup} \DescribeMacro{\dcap}
% Just as the \textsf{amsmath} command |\dfrac|
% only transforms the required fraction in display style, we can limit
% the display style effect to the affected symbol, by using the following macros:
@@ -546,13 +587,15 @@
% is better than $\lbar{z+z'}=\lbar{z}+\lbar{z'}$.
% \end{center}
%
-% \DescribeMacro{\eqdef}
+% \DescribeMacro{\eqdef} \DescribeMacro{\eqdef*}
% The |\eqdef| macro writes equality symbol topped with ``def''
-% (thanks to the \LaTeX\ command |\stackrel|):\\
-% \begin{minipage}[t]{8cm}
+% or with ``$\scriptstyle \Delta$'' for |\eqdef*|
+% (thanks to the \LaTeX\ command |\stackrel|):
+%
+% \noindent\begin{minipage}[t]{8cm}
% \begin{verbatim}
-% $ \e^{\i\theta} \eqdef
-% \cos\theta + \i\sin\theta $
+%$ \e^{\i\theta} \eqdef
+% \cos\theta + \i\sin\theta $
% \end{verbatim}
% \end{minipage}
% \begin{minipage}{6cm}
@@ -565,7 +608,7 @@
% provides a new improved version of \texttt{\bslash underbrace} command
% (as many other usefull macros);
% it is loaded by \textsf{mismath}.}, making source code more compact.\\[2ex]
-% \begin{minipage}{6.75cm}
+% \begin{minipage}{7.5cm}
% \begin{verbatim}
%$ (QAP)^n = \unbr{QAP\mul QAP\mul
% \cdots\mul QAP}_{n\text{ times}} $
@@ -578,7 +621,7 @@
% \DescribeMacro{\iif}
% |\iif| is an alias for ``\iif'', to be used in text mode.
%
-% \subsection{Improving some spacing in mathematical formulas}
+% \subsection{Improved spacing in mathematical formulas}
%
% \DescribeMacro{\then}
% The |\then| macro produces the symbol $\Longrightarrow$ surrounded by large spaces
@@ -608,7 +651,7 @@
% the space may be too large on one side of |\mul|.
% To get the same amount of space on the two sides of |\mul|,
% you can use thin negative spaces |\!|
-% or enclose the function or the structure with brackets:
+% or enclose the function or the structure with braces:
% \begin{center}
% $x\mul{\sin x}$, obtained with |x\mul{\sin x}|, is slightly better than $x\mul\sin x$.\\[1ex]
% |$\sin\!{\left( \frac{\pi}{3} \right)} \mul 2$| gives\\
@@ -629,7 +672,7 @@
% slightly closer to the right parenthesis\footnote{This macro gives bad
% results with normal sized parenthesis.}. Compare:
% \[ \e^a \sim\pow{1+\frac{a}{n}}{n} \txt{may be better than}
-% \e^a \sim\left(1+\frac{a}{n}\right)^n.\]
+% \e^a \sim\left(1+\frac{a}{n}\right)^{n}.\]
%
% \DescribeMacro{\abs}
% Absolute value (or modular for a complex number) should be typeset with
@@ -656,31 +699,44 @@
% \[ \lbar{Z} = \lfrac{\lbar{z_1-z_2}}{\lbar{z_1+z_2}} \]
% \end{minipage}
%
-% \DescribeMacro{[ ]}
-% Open intervals may be represented with parenthesis but sometimes we find also
-% brackets. In that case the space before them is often unsuitable.
-% Brackets symbols $[$ and $]$ have been redefined for mathematical mode\footnote{We
-% could also use the macro \texttt{\bslash DeclarePairedDelimiters} from
-% the \textsf{mathtools} package ; let us also mention
-% the \textsf{interval} package~\cite{INT} with his
-% \texttt{\bslash interval} macro.}:
-% \begin{center}
-% |$x\in ]0,\pi[ \cup ]2\pi,3\pi[$| \\[1ex]
-% $\begin{cases}
-% x\in \OB 0,\pi \CB \cup \OB2\pi, 3\pi \CB &\text{ without \textsf{mismath}}\\
-% x\in ]0, \pi[ \cup ]2\pi, 3\pi[ &\text{ with \textsf{mismath}}
-% \end{cases}$
-% \end{center}
-% In our code, $[$ and $]$ symbols are not defined anymore as delimiters.
+% \DescribeMacro{brackets}
+% Open intervals are usually represented with parenthesis, e.g.\@ $(0, +\infty)$,
+% but sometimes we find also
+% brackets, for example in French mathematics.
+% In that case the space around them is often unsuitable,
+% e.g.\@ $x \in \mathclose{]} 0, +\infty[$.
+%
+% We have redefine brackets in the \textsf{ibrackets} package~\cite{BRACKET}
+% which is loaded by \textsf{mismath}.
+% 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}
+% x\in \mathclose{]}-\pi, 0 \mathopen{[} \cup \mathclose{]} 2\pi, 3\pi \mathopen{[}
+% &\mbox{\quad without \textsf{ibrackets}}.
+% \end{align*}
+% In our code, $[$ and $]$ symbols become ``active''
+% and are not defined by default as delimiters.
% Thereby a line break could occur between the two brackets, but
% it is always possible to transform them
% into delimiters with |\left| and |\right|.
-% Another problem occurs when the left boundary contains an operator sign ;
-% the spaces surrounding the operator will then be too large :
-% |$[-1, 1]$| yields $[-1, 1]$ instead of $[{-1}, 1]$\footnote{A problem pointed out
-% by J.F.\@ Burnol, which does not detract from the interest of this redefinition.}.
-% To get correct spaces, we have to surround
-% the sign $-$ or $-1$ by braces, or use |\left| and |\right|.
+%
+% With \textsf{ibrackets}: a bracket become an ordinary character
+% but an open delimiter when it is immediately followed by a + or - character.
+% Thus, when the left boundary contains an operator sign,
+% \emph{you don't have to leave a space between the first bracket and the sign},
+% otherwise, the spaces surrounding the operator will be too large:
+% e.g.\@ |$x \in ] -\infty, 0]$| yields $x \in ] -\infty, 0]$.
+% Contrariwise, when you want to write algebra on intervals then
+% \emph{you must leave a blank space between the second bracket and the} +/-
+% \emph{operations},
+% e.g.\@ |$[a, b] + [c, d]$| yields $[a, b] + [c, d]$
+% but |$[a, b]+ [c, d]$| yields $[a, b]+ [c, d]$.
+%
+% Let us also mention other approaches e.g.\@ |\DeclarePairedDelimiters|, a macro from
+% the \textsf{mathtools} package~\cite{TOOL}, or
+% the \textsf{interval} package~\cite{INT} with his
+% |\interval| macro. Nevertheless our solution is lighter.
%
% \subsection{Environments for systems of equations and small matrices}
%
@@ -819,19 +875,27 @@
\RequirePackage{ifthen}
\RequirePackage{xspace}
\RequirePackage{mathtools}
+\RequirePackage{ibrackets}
+
% \end{macrocode}
% The above conditional packages loading avoids ``option clash'' errors if the packages
-% have been previously loaded with (other) options.
+% have been previously loaded with other options.
%
% \medskip
-% The three following internal commands are meta commands for a
-% conditional macro definition with a warning message if the macro already exists.
% \DescribeMacro{\bslash}
-% The |\bslash| macro comes from \textsf{doc.sty} package by Frank Mittelbach.
+% The |\bslash| macro comes from Frank Mittelbach's \textsf{doc.sty} package.
% It can also be used in other documents instead of |\textbackslash|
-% (which doesn't work here).
+% (which doesn't work inside warnings).
% \begin{macrocode}
{\catcode`\|=\z@ \catcode`\\=12 |gdef|bslash{\}} % \bslash command
+
+% \end{macrocode}
+% \medskip
+% \DescribeMacro{\@mwarning} \DescribeMacro{\@mmacro} \DescribeMacro{\@moperator}
+% The three following internal macros are meta commands for a
+% conditional macro definition with a warning message if the macro already exists.
+% They could be useful in other packages.
+% \begin{macrocode}
\newcommand\@mwarning[1]{
\PackageWarningNoLine{mismath}{
Command \bslash #1 already exist and will not be redefined}
@@ -892,7 +956,7 @@
\PackageWarningNoLine{mismath}{
\bslash pinumber command has changed since v2.0,
\MessageBreak
- option #1 must be a command name \MessageBreak
+ option #1 must be a valid command name \MessageBreak
(look at the documentation),
but command \bslash #1 is undefined, \MessageBreak
I cannot use it for replacement to \bslash pi.
@@ -913,8 +977,8 @@
\newcommand*{\hvec}[1]{\vec{\vphantom{t}#1}}
\newcommand*{\@norm}[1]{
- \mbox{\raisebox{1.75pt}{$\bigl\Vert$}} #1
- \mbox{\raisebox{1.75pt}{$\bigr\Vert$}} }
+ \mbox{\raisebox{1.75pt}{\small$\bigl\Vert$}} #1
+ \mbox{\raisebox{1.75pt}{\small$\bigr\Vert$}} }
% works better than with relative length
\newcommand*{\@@norm}[1]{
\mbox{\footnotesize\raisebox{1pt}{$\Vert$}} #1
@@ -942,6 +1006,7 @@
\@moperator{\adj}{adj}
\@moperator{\Aut}{Aut}
+\@moperator{\codim}{codim}
\@moperator{\Conv}{Conv}
\@moperator{\cov}{cov}
\@moperator{\Cov}{Cov}
@@ -962,8 +1027,10 @@
\let\oldRe\Re \renewcommand{\Re}{\operatorname{Re}}
\@mmacro{rot}{\operatorname{\vect{\mathup{rot}}}}
\@moperator{\sgn}{sgn}
+\@moperator{\sinc}{sinc}
\@moperator[spa]{\spa}{span}
\@moperator{\tr}{tr}
+\@moperator{\var}{var}
\@moperator{\Var}{Var}
\@moperator[Zu]{\Zu}{Z}
@@ -1001,7 +1068,9 @@
\@ifundefined{hlbar}{
\providecommand*{\hlbar}[1]{\overline{\vphantom{t}#1}}}{
\@mwarning{hlbar} }
-\@mmacro{eqdef}{\stackrel{\mathup{def}}{=}}
+\newcommand\@eqdef{\stackrel{\mathup{def}}{=}}
+\newcommand\@@eqdef{\stackrel{\Delta}{=}}
+\@mmacro{eqdef}{\@ifstar{\@@eqdef}{\@eqdef}}
\@mmacro{unbr}{\underbrace}
\@mmacro{iif}{if and only if\xspace}
@@ -1014,8 +1083,8 @@
\providecommand*{\txt}[1]{\quad\text{#1}\quad} }{
\@mwarning{txt} }
\@mmacro{mul}{\mathord{\times}}
-\PackageWarningNoLine{mismath}{Command \bslash paren
- is no longer supported}
+\providecommand\paren{\PackageWarning{mismath}{Command
+ \bslash paren is no longer supported}}
\@ifundefined{pow}{
\providecommand*{\pow}[2]{\left( #1 \right)^{\!#2}} }{
\@mwarning{pow} }
@@ -1025,8 +1094,6 @@
\@ifundefined{lfrac}{
\providecommand*{\lfrac}[2]{\frac{\;#1\;}{\;#2\;}} }{
\@mwarning{lfrac} }
-\DeclareMathSymbol{]}\mathord{operators}{093} % originally \mathclose
-\DeclareMathSymbol{[}\mathord{operators}{091} % originally \mathopen
\newcommand{\systemstretch}{1.2}
\newcommand{\systemsep}{\medspace}
@@ -1056,52 +1123,56 @@
}
% \end{macrocode}
% \bigskip
-% \begin{thebibliography}{17}
+% \begin{thebibliography}{23}
% \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{Typefaces for Symbols in Scientific Manuscripts}.
+% \bibitem{NIST} \emph{Typefaces for Symbols in Scientific Manuscripts},
% \url{https://www.physics.nist.gov/cuu/pdf/typefaces.pdf}.
% \bibitem{SI} \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.
+% on Terminology, Nomenclature and Symbols), dec 1999,
% \url{https://old.iupac.org/standing/idcns/italic-roman_dec99.pdf}.
-% \bibitem{VECT} \emph{Typesetting vectors with beautiful arrow with \LaTeXe}.
-% \textsf{esvect} package by Eddie Saudrais, CTAN, v1.3 2013/07/11.
-% \bibitem{AMS} \emph{The \textsf{amsmath} package}. Frank Mittelbach, Rainer Schöpf,
-% 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{VECT} \emph{\textsf{esvect} -- Typesetting vectors with beautiful
+% arrow with \LaTeXe}, Eddie Saudrais, CTAN, v1.3 2013/07/11.
+% \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{TOOL} \emph{The \textsf{mathtool} package}, Morten Høgholm, Lars Madsen, CTAN,
+% v1.29 2022/06/29.
% \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},
-% \textsf{pm-isomath} package by Claudio Beccari, CTAN, v1.2.00 2021/08/04.
+% the \textsf{pm-isomath} package by Claudio Beccari, CTAN, v1.2.00 2021/08/04.
% \bibitem{GREEK} \emph{The \textsf{upgreek} package for \LaTeXe}, Walter Schmidt,
% CTAN, v2.0 2003/02/12.
-% \bibitem{DESIGN} \emph{The \textsf{mathdesign} package}.
+% \bibitem{DESIGN} \emph{The \textsf{mathdesign} package},
% Paul Pichaureau, CTAN, v2.31 2013/08/29.
% \bibitem{ALPHA} \emph{The \textsf{textalpha} package}
-% (part of the \textsf{greek-fontenc} bundle). Günter Milde, CTAN, v2.1 14/06/2022.
-% \bibitem{KPF} \emph{\textsf{Kp-Fonts} -- The Johannes Kepler project}.
+% (part of the \textsf{greek-fontenc} bundle), Günter Milde, CTAN, v2.1 14/06/2022.
+% \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}}.
+% \bibitem{FOUR} \textsf{Fourier-GUT\hspace{-0.1em}\emph{enberg}},
% Michel Bovani, CTAN, v1.3 30/01/2005.
+% \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{SYST} \emph{L'extension pour \TeX\ et \LaTeX\ \textsf{systeme}}.
+% \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, v2.1 2022/11/11.
-% \bibitem{LSHORT} \emph{The Not So Short Introduction to \LaTeXe}. \textsf{lshort} package by
+% \bibitem{SPAL} \emph{The \textsf{spalign} package}, Joseph Rabinoff, CTAN, 2016/10/05.
+% \bibitem{FR} \emph{L'extension \textsf{frenchmath}}, Antoine Missier, CTAN, v2.3 2022/12/26.
+% \bibitem{BRACKET} \emph{Intelligent brackets -- The \textsf{ibrackets} package}
+% Antoine Missier, CTAN, v1.0, 2022/12/19.
+% \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,
+% \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}
diff --git a/macros/latex/contrib/mismath/mismath.pdf b/macros/latex/contrib/mismath/mismath.pdf
index e2ba5b0321..85e97af3c0 100644
--- a/macros/latex/contrib/mismath/mismath.pdf
+++ b/macros/latex/contrib/mismath/mismath.pdf
Binary files differ