summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-05-04 03:01:06 +0000
committerNorbert Preining <norbert@preining.info>2024-05-04 03:01:06 +0000
commitf256d70b5ef40549e0105c49d1265900bf260505 (patch)
treef221abefe2e9e78486f87dcdad3c665950b9f04e /macros/latex
parent5fc635e606281a4f66bbc31bfb827fee53a21f96 (diff)
CTAN sync 202405040301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx31
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin640970 -> 640971 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex4
-rw-r--r--macros/latex/contrib/mathgreeks/mathgreeks.dtx109
-rw-r--r--macros/latex/contrib/mathgreeks/mathgreeks.ins2
-rw-r--r--macros/latex/contrib/mathgreeks/mathgreeks.pdfbin1650679 -> 1716778 bytes
-rw-r--r--macros/latex/contrib/mismath/README.md8
-rw-r--r--macros/latex/contrib/mismath/mismath.dtx1097
-rw-r--r--macros/latex/contrib/mismath/mismath.ins2
-rw-r--r--macros/latex/contrib/mismath/mismath.pdfbin155495 -> 438746 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdfbin299331 -> 298965 bytes
-rw-r--r--macros/latex/contrib/profmaquette/latex/ProfMaquette.sty78
12 files changed, 759 insertions, 572 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index fcfd0a1e77..8b013bb90c 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
-\ProvidesExplClass{easybook}{2024/05/01}{2024be}
+\ProvidesExplClass{easybook}{2024/05/03}{2024bf}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/05/01}{2024be}
+\ProvidesExplPackage{easybase}{2024/05/03}{2024bf}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1154,19 +1154,17 @@
\bool_set_true:N \l__eb_normal_footnote_bool
\bool_new:N \l__eb_fnmarktext_format_match_bool
\bool_new:N \l__eb_fncustom_format_match_bool
+\cs_new:Npn \eb_fnmarktext_format_clear:n #1
+ {
+ \bool_if:cTF { l__eb_fn#1_format_match_bool }
+ { \tl_clear:N \l__eb_fnmarktext_format_tl }
+ { \spbset{spcmd = { }} }
+ }
\cs_new_protected:Npn \eb_fnmarktext_format_initial:
{
\bool_if:NTF \l__eb_normal_footnote_bool
- {
- \bool_if:NTF \l__eb_fnmarktext_format_match_bool
- { \tl_clear:N \l__eb_fnmarktext_format_tl }
- { \spbset{spcmd = { }} }
- }
- {
- \bool_if:NTF \l__eb_fncustom_format_match_bool
- { \tl_clear:N \l__eb_fnmarktext_format_tl }
- { \spbset{spcmd = { }} }
- }
+ { \eb_fnmarktext_format_clear:n { marktext } }
+ { \eb_fnmarktext_format_clear:n { custom } }
\eb@font@footnote
}
\cs_new_protected:Npn \defupfntmark #1
@@ -1302,7 +1300,6 @@
\use:c {#1}*{\phantomsection ##3}
\CTEX@addtocline{#1}{##2}
\tl_if_empty:oF {##4} { \CTEX@addbitocline{#1}{##4} }
- \tl_set:Nn \l__eb__bitoc_mark_title_level_tl {#1}
\use:c { #1mark }{##2}
}{
\stepcounter{bi#1}
@@ -2243,7 +2240,7 @@
bibstyle .initial:n = numerical,
citestyle .tl_set:N = \l__eb_bib_cite_style_tl,
datafile .clist_set:N = \l__eb_bib_datafile_clist,
- bititle .tl_set:N = \eb@bib@bitoc@title,
+ bititle .tl_set:N = \bibibname,
bititle .initial:n = Bibliography,
unknown .code:n = \eb_msg_deprecated_option:n { bib }
}
@@ -2288,8 +2285,8 @@
\cs_new_protected:Npn \eb_biber_toc_title:n #1
{
\bool_if:NTF \l__eb_class_mode_book_bool
- { \bichapter*{#1}{\eb@bib@bitoc@title} }
- { \bisection*{#1}{\eb@bib@bitoc@title} }
+ { \bichapter*{#1}{\bibibname} }
+ { \bisection*{#1}{\bibibname} }
}
\cs_new_protected:Npn \eb_biber_biblatex_set:
{
@@ -2537,7 +2534,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/05/01}{2024be}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/05/03}{2024bf}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 7ba31f65c1..19d165d5aa 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 7820c2a137..4cbd925e2b 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024be,
- date = 2024/05/01,
+ version = v2024bf,
+ date = 2024/05/03,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
diff --git a/macros/latex/contrib/mathgreeks/mathgreeks.dtx b/macros/latex/contrib/mathgreeks/mathgreeks.dtx
index 5cdb03dda1..e6df4bc3d1 100644
--- a/macros/latex/contrib/mathgreeks/mathgreeks.dtx
+++ b/macros/latex/contrib/mathgreeks/mathgreeks.dtx
@@ -20,7 +20,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mathgreeks}
- [2024/04/30 v1.0 .dtx Math Greek letters]
+ [2024/05/04 v1.1 .dtx Math Greek letters]
%</package>
%<*driver>
\documentclass[11pt]{article}
@@ -29,12 +29,12 @@
\usepackage[english]{babel}
\usepackage{doc}
\usepackage{geometry}
-\usepackage[savegreeks,otherfonts]{mathgreeks}
+\usepackage[mathdesign=Charter,otherfonts]{mathgreeks}
\usepackage{sectsty}
\usepackage{xcolor}
\usepackage{spacingtricks}
\usepackage{metalogo}
-%\usepackage{supertabular}
+%\usepackage{supertabular} % incompatible with tabls
\usepackage{tabls}
\usepackage{multirow}
\usepackage{ifluatex}
@@ -74,7 +74,7 @@
%</driver>
% \fi
%
-% \CheckSum{1060}
+% \CheckSum{1061}
%
% \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
@@ -93,6 +93,7 @@
% Right brace \} Tilde \~}
%
% \changes{v1.0}{2024/04/30}{Initial version}
+% \changes{v1.1}{2024/05/04}{Adding the libsans option; a few changes in the doc}
%
% \GetFileInfo{mathgreeks.sty}
%
@@ -127,6 +128,7 @@
% with the option \mbox{\texttt{math-style=ISO}} provided
% by the \textsf{unicode-math} package~\cite{UNIC}.
%
+% \pagebreak ^^A To get the same page breaking when compiling with pdfLaTeX
% Furthermore there are several packages that provide the uppercase Greek letters
% in italic and have also options to typeset the lowercase Greek
% letters in upright shape.
@@ -197,15 +199,19 @@
% cmbright \\
% \hline
% \end{tabular}
-% \end{center}
% \caption{font options\label{table:font}}
+% \end{center}
% \end{table}
+%
+% \vspace{-1\baselineskip}
% The \texttt{fontspec} and \texttt{unicode-math} options require loading
% the corresponding packages, and these can only work when running through
% \LuaLaTeX\ (or \XeLaTeX).
-% The fontspec option allows for the use of most TrueType or OpenType
-% fonts installed on your computer,
-% those that have Greek letters.
+% The \texttt{fontspec} option allows for the use of most TrueType or OpenType
+% fonts installed on your computer, those that have Greek letters.
+% Although the \textsf{unicode-math} package loads the \textsf{fontspec} package,
+% the fonts usable with one of these options are not necessarily usable with the other;
+% \texttt{fontspec} has a large number of possible values.
%
% When calling "\boldmath" (outside the math environment), you get the letters in bold face,
% but the command "\mathbf" doesn't work here.
@@ -213,7 +219,7 @@
% \bigskip
% The second table below presents the shape options. If the shape option
% is not specified, the italic shape is chosen by default, meaning that the commands
-% "\alpha", "\beta", \ldots, "\Delta", "\Gamma"\ldots will produce the same result
+% "\alpha", "\beta", \ldots, "\Delta", "\Gamma"\ldots\ will produce the same result
% as the corresponding "\it"\meta{letter} commands.
%
% \begin{table}[h]
@@ -230,10 +236,11 @@
% \texttt{style} & possible values: \texttt{TeX}, \texttt{ISO}, \texttt{upright} \\
% \hline
% \end{tabular}
-% \end{center}
% \caption{shape options\label{table:shape}}
+% \end{center}
% \end{table}
%
+% \vspace{-1\baselineskip}
% \begin{itemize}
% \item Except for \texttt{style}, all these options are booleans.
% \item The \texttt{Greekup} option est initialized to \texttt{true} (corresponding
@@ -245,14 +252,17 @@
% activate \begin{center}\texttt{greekup=true,Greekup=false}.\end{center}
% \end{itemize}
%
-% \smallskip
+% \bigskip
% The following list presents the additional options, which are also booleans:
% \begin{description}
% \item[\texttt{savegreeks}] Saves the letters corresponding to the original commands
% "\alpha", "\beta"\ldots so that they remain accessible through the commands
% "\backalpha", "\backbeta"\ldots
% \item[\texttt{otherfonts}] Allows dynamic font switching (see next section)
-% for later use of \texttt{lgrmath}, \texttt{fourier}, \texttt{libertinus} or \texttt{upgreek}.
+% for later use of \texttt{lgrmath}, \texttt{fourier}, \texttt{libertinus}
+% or \texttt{upgreek}.
+% \item[\texttt{libsans}] This is a special option that works only with \texttt{libertinus}
+% to produce a sanserif font.
% \item[\texttt{lowercase}] This option is initialized to \texttt{true};
% \texttt{lowercase=false} allows keeping the original lowercase Greek letters
% without redefining the commands "\alpha", "\beta"\ldots
@@ -263,7 +273,7 @@
%
% \subsection{Dynamic settings commands}
%
-% There are two command for dynamic settings:
+% There are two commands for dynamic settings:
% \begin{description}
% \item[] "\setmathgreeks"
% This command takes a mandatory parameter which is a list of
@@ -282,9 +292,10 @@
% \texttt{enc}, \texttt{fam}, \texttt{series}, \texttt{shape}.
% \end{center}
% The \texttt{fontspec} and \texttt{unicode-math} options are identical
-% to those in table~\ref{table:font}.
-% The other previous font options (\texttt{lgrmath}, \texttt{mathdesign}, etc.)\@
-% are not usable in "\mathgreeksfont".
+% to those in table~\ref{table:font}. In that case, the shape is set by "\setmathgreeks"
+% (before or after).
+% The other previous font options (\texttt{lgrmath}, \texttt{mathdesign},
+% \texttt{fourier}, etc.)\@ are not usable in "\mathgreeksfont".
% However, these fonts can be obtained by specifying the encoding (option \texttt{enc}),
% family (option \texttt{fam}), series and shape: the New Font Selection Scheme (NFSS).
% The series defines the `boldness' and has a default value: \texttt{series=m} (medium).
@@ -303,8 +314,8 @@
% Only the commands "\alpha", "\beta"\ldots will be redefined according to the
% selected shape.
%
-% If you use the \texttt{fontspec} or \texttt{unicode-math} option,
-% these second kind of options have no effect.
+% When using the \texttt{fontspec} or \texttt{unicode-math} option,
+% these NFSS options have no effect.
%
% Notice that the encoding obtained by the package font options is faster, moreover
% the command "\boldmath" doesn't work anymore
@@ -317,10 +328,10 @@
% \section{Examples} \label{examples}
% \begin{description}
% \item[] "\greektable"
-% The examples in this section are obtained with the "\greektable" command.
+% The following examples are produced with the "\greektable" command.
% This command generates a table with two rows: the first contains the lowercase letters
% obtained with "\alpha", \ldots, "\omega", and the second contains variants
-% "\varepsilon", "\vartheta"\ldots of certain letters as well as the uppercase letters
+% "\varepsilon", "\vartheta"\ldots\ of certain letters as well as the uppercase letters
% obtained with "\Gamma", "\Delta", \ldots, "\Omega"
% (for those who differ from their Latin equivalent).
% \end{description}
@@ -329,7 +340,8 @@
%
% The \texttt{upgreek} option, as its name suggests, produces only upright letters,
% and the \texttt{Euler} font does not have the variants "\varrho" and "\varsigma".
-% The \texttt{Symbolsmallscale} font is identical to Symbol but reduced in size by 90\,\%.
+% The \texttt{Symbolsmallscale} font is identical to Symbol but reduced in size by 90\,\%;
+% \texttt{Symbol} and \texttt{Symbolsmallscale} have no bold version.
% \texttt{mathdesign=Garamond} yields a virtual font
% that may not always work.
%
@@ -338,7 +350,7 @@
% \newcommand*\doublerows[1]{\multirow{2}{\legendwidth}[-1.5ex]{\bfseries#1}}
% \begin{center}
-% \begin{tabular}{|l|@{}c@{}|c@{$\;$}c@{}c|}
+% \begin{tabular}{|l|@{}c@{}|c@{$\;$}c@{\:}c|}
% \hline
% \makebox[\legendwidth][l]{\textbf{upgreek=...}} & \makebox[8.4cm]{Résult}
% & \makebox[1cm]{enc} & \makebox[1cm]{fam} & shape \\
@@ -428,9 +440,9 @@
% & U & txmia & it \\
% \hline
% \doublerows{libertinus}
-% & \mathgreeksfont{enc=LS1,fam=libertinust1math} \greektable
+% & \mathgreeksfont{enc=LS1,fam=libertinust1math} \greektable
% & LS1 & * & it \\
-% & \mathgreeksfont{enc=LS1,fam=libertinust1math,shape=n} \greektable
+% & \mathgreeksfont{enc=LS1,fam=libertinust1math,shape=n} \greektable
% & LS1 & * & n \\
% \hline
% \textbf{concrete}
@@ -443,20 +455,23 @@
% \hline
% \end{tabular}
% \end{center}
-% \emph{* The asterisk for the} \texttt{libertinus} \emph{value corresponds to the}
-% \texttt{libertinust1math} \emph{family, a name too long to appear in this table.}
+% \emph{* The asterisks for the} \textbf{libertinus} \emph{family corresponds to}
+% \textnormal{`libertinust1math'} \emph{a name too long to appear in this table.
+% Activating the} \texttt{libsans} \emph{package option yields a sanserif font.}
%
% \subsection{The \texttt{lgrmath} option}
%
-% The \texttt{lgrmath} option, inspired by the eponymous package developed by J.F. Burnol,
+% The \texttt{lgrmath} option, inspired by the eponymous package of J.F. Burnol,
% has a large number of possible values. We present here only a few.
% The documentation of the \textsf{lgrmath} package~\cite{LGR} explains how
-% to list and consult the fonts available on your distribution with the LGR encoding.
+% to list the fonts available on your distribution with the LGR encoding.
% One can also consult with profit the documentation of \textsf{cb-fonts}\cite{CB},
% the Greek fonts of Claudio Beccari.
%
% With the \texttt{lgrmath} option, the alternative commands for the variants
% produce the same glyphs as those of the normal letters except for "\varsigma".
+% However, the "\varsigma" $\varsigma$ often substitutes for the usual "\sigma" $\sigma$
+% when using dynamic font changes through "\mathgreeksfont" with \texttt{enc=LGR}.
%
% We have not presented here the third column previously indicating the values for
% \texttt{enc}, \texttt{fam}, and \texttt{shape} because, for this entire section,
@@ -482,13 +497,13 @@
% \hline
% \lgrtbl{Alegreya-LF}
% \lgrtbl{Cochineal-LF}
+% \lgrtbl{LibertinusSerif-LF}
% \lgrtbl{LibertinusSans-LF}
% \lgrtbl{NotoSerif-LF}
-% \lgrtbl{NotoSans-LF}
% \lgrtbl{droidserif}
% \lgrtbl{fcm}
% \lgrtbl{gentium}
-% \lgrtbl{llcmss}
+% \lgrtbl{lmss}
% \end{tabular}
% \end{center}
%
@@ -497,8 +512,8 @@
%
% Most TrueType or OpenType fonts can be used here.
% ^^A Needs the \textsf{fontspec} package and must be run through \LuaLaTeX\ or \XeLaTeX.
-% Some of the fonts below are not free, and some do not have the variants
-% "\varepsilon"\ldots for example Arial, Times New Roman.
+% Some of the fonts below are non free, and some do not have all the variants,
+% for example Arial, Palatino Linotype, Times New Roman.
%
% \newcommand\fontspectbl[2][fontspec]{%
% \doublerows{#2}
@@ -596,14 +611,14 @@
% \bibitem{LIBG} \emph{The \textsf{libgreek} package}, Jean-François Burnol,
% CTAN v1.1 2022/11/11.
% \bibitem{LGR} \emph{The \textsf{lgrmath} package}, Jean-François B., CTAN, v1.0 2022/11/16.
-% \bibitem{NTX} \emph{New TX font package}, Micahel Sharpe, CTAN, v1.735 2024/03/01.
+% \bibitem{NTX} \emph{New TX font package}, Michael Sharpe, CTAN, v1.735 2024/03/01.
% \bibitem{LIB} \emph{The LibertinusT1 Math Package}, Michael Sharpe, CTAN,
% v2.0.4 2024/01/14.
% \bibitem{CHEM} \emph{\textsf{chemgreek} -- Upright Greek letters in chemistry},
% Clemens Niederberger, CTAN, v1.1a 2020/01/16.
% \end{raggedright}
% \end{thebibliography}
-%}
+% }
%
% \section{Implementation}
%
@@ -640,6 +655,7 @@
\DeclareBoolOption{savegreeks}
\DeclareBoolOption{otherfonts}
+\DeclareBoolOption{libsans}
\DeclareBoolOption[true]{lowercase}
\DeclareBoolOption[true]{uppercase}
@@ -678,6 +694,7 @@
\DeclareFontEncoding{LGR}{}{}
\DeclareFontEncoding{FML}{}{}
\DeclareFontSubstitution{FML}{futm}{m}{it}
+ \ifmathgreeks@libsans \libus@sansmathtrue\fi % taken up at encoding time
\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{libertinust1math}{m}{n}
@@ -703,6 +720,7 @@
\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{txfonts}
\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{savegreeks}
\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{otherfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{libsans}
\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{lowercase}
\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{uppercase}
@@ -830,6 +848,7 @@
\SetSymbolFont{mgr@up}{bold}{U}{txmia}{bx}{it}
\else\ifmathgreeks@libertinus
+ \ifmathgreeks@libsans \libus@sansmathtrue\fi
\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{libertinust1math}{m}{n}
\DeclareSymbolFont{mgr@it}{LS1}{libertinust1math}{m}{it}
@@ -878,16 +897,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%% MACROS %%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\setmathgreeks#1{\setkeys{mathgreeks}{#1}\unskip
- \ifmathgreeks@upgreek
- \mathgreeks@Greekuptrue
- \mathgreeks@greekuptrue
- \PackageWarning{mathgreeks}{Style is set to `upright'
- \MessageBreak with the `upgreek' option}
- \fi
- \mgr@DefaultGreeks\ignorespaces
-}
-
\def\re@DeclareMathSymbol#1#2#3#4{% from kpfonts, pxfonts, txfonts
\let#1=\undefined
@@ -899,7 +908,7 @@
\newcommand{\mgr@CodeGreek}[3]{% #1 = it or up
\expandafter\re@DeclareMathSymbol\csname#1#2\endcsname%
- {\mathalpha}{mgr@#1}{#3}
+ {\mathalpha}{mgr@#1}{#3} % perhaps \mathord is better
}
\newcommand{\mgr@UnicodeGreek}[3]{%
@@ -1218,6 +1227,16 @@
%%%%%%%%%%%%%% Macros for changing font dynamically %%%%%%%%%%%%%
+\def\setmathgreeks#1{\setkeys{mathgreeks}{#1}\unskip
+ \ifmathgreeks@upgreek
+ \mathgreeks@Greekuptrue
+ \mathgreeks@greekuptrue
+ \PackageWarning{mathgreeks}{Style is set to `upright'
+ \MessageBreak with the `upgreek' option}
+ \fi
+ \mgr@DefaultGreeks\ignorespaces
+}
+
\newif\ifmgrfont@unicodemath
\define@key{mgrfont}{unicode-math}[Latin Modern Math]{%
\def\mgrfont@unicodemath{#1}\mgrfont@unicodemathtrue}
diff --git a/macros/latex/contrib/mathgreeks/mathgreeks.ins b/macros/latex/contrib/mathgreeks/mathgreeks.ins
index a1a8f6786b..e7e74d9458 100644
--- a/macros/latex/contrib/mathgreeks/mathgreeks.ins
+++ b/macros/latex/contrib/mathgreeks/mathgreeks.ins
@@ -47,7 +47,7 @@ and version 1.3 or later is part of all distributions of LaTeX version
\Msg{* *}
\Msg{* To produce the documentation run the file *}
\Msg{* mathgreeks.dtx through LuaLaTeX *}
-\Msg{* (or LaTeX for a shorter version). *}
+\Msg{* (or LaTeX for a shorter version of the doc). *}
\Msg{* *}
\Msg{* Happy TeXing! *}
\Msg{* *}
diff --git a/macros/latex/contrib/mathgreeks/mathgreeks.pdf b/macros/latex/contrib/mathgreeks/mathgreeks.pdf
index 03ca96ca9d..284c293b56 100644
--- a/macros/latex/contrib/mathgreeks/mathgreeks.pdf
+++ b/macros/latex/contrib/mathgreeks/mathgreeks.pdf
Binary files differ
diff --git a/macros/latex/contrib/mismath/README.md b/macros/latex/contrib/mismath/README.md
index 2ebf631307..9cafc74719 100644
--- a/macros/latex/contrib/mismath/README.md
+++ b/macros/latex/contrib/mismath/README.md
@@ -5,17 +5,19 @@
The package provides some mathematical macros to typeset:
- mathematical constants e, i, pi in upright shape (automatically) as recommended by ISO 80000-2,
-- vectors with nice arrows and adjusted norm (and tensors),
+- vectors with nice arrows and adjusted norm,
+- tensors in sans serif bold italic shape (ISO recommendation),
- some standard operator names,
+- several commands with useful aliases,
- improved spacings in mathematical formulas,
- systems of equations and small matrices,
-- displaymath in double columns for lengthy calculations.
+- displaymath in double columns for lengthy calculations with short expressions.
## Installation
- run LaTeX on mismath.ins, you obtain the file mismath.sty,
-- if then you run XeLaTeX or LuaLaTeX on mismath.dtx you get the file mismath.pdf which is also in the archive,
+- if then you run pdfLaTeX on mismath.dtx you get the file mismath.pdf which is also in the archive,
- put the files mismath.sty and mismath.pdf in your TeX Directory Structure.
diff --git a/macros/latex/contrib/mismath/mismath.dtx b/macros/latex/contrib/mismath/mismath.dtx
index 88793e7e9e..f3fd2168bc 100644
--- a/macros/latex/contrib/mismath/mismath.dtx
+++ b/macros/latex/contrib/mismath/mismath.dtx
@@ -20,16 +20,16 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}
- [2024/02/29 v2.12 .dtx Miscellaneous mathematical macros]
+ [2024/05/04 v3.0 .dtx Miscellaneous mathematical macros]
%</package>
%<*driver>
\documentclass{ltxdoc}
-%\usepackage[utf8]{inputenc} % running through XeLaTeX
+\usepackage[utf8]{inputenc} % run through XeLaTeX
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
-\usepackage{fontspec}
+%\usepackage{fontspec}
\usepackage{fourier} % in case of font change, modify 2.1 (3rd §)
-\usepackage[ibrackets,decimalcomma]{mismath}
+\usepackage[ibrackets,decimalcomma,otherReIm]{mismath}
%\usepackage{amssymb} % unnecessary with fourier
\usepackage{multicol}
\usepackage{sectsty}
@@ -40,33 +40,37 @@
\definecolor{darkbrown}{rgb}{0.5,0.1,0.1}
\allsectionsfont{\color{darkbrown}}
-% The following commands provides several shapes of pi
-% the maximum number of authorized math fonts is reached
+
+% The following commands provide several shapes for pi
\DeclareFontEncoding{LGR}{}{}
-\DeclareSymbolFont{lgrlmr}{LGR}{lmr}{m}{n}
-\DeclareMathSymbol{\pilmr}{\mathalpha}{lgrlmr}{112}
-\DeclareSymbolFont{lgrAlegreya}{LGR}{Alegreya-LF}{m}{n}
-\DeclareMathSymbol{\piAlegreya}{\mathalpha}{lgrAlegreya}{112}
-\DeclareSymbolFont{lgrCochineal}{LGR}{Cochineal-LF}{m}{n}
-\DeclareMathSymbol{\piCochineal}{\mathalpha}{lgrCochineal}{112}
-\pinumber[upgreek=Euler]
-\DeclareSymbolFont{upgreekSymbol}{U}{psy}{m}{n}
-\DeclareMathSymbol{\piSymbol}{\mathord}{upgreekSymbol}{`p}
-\DeclareSymbolFont{mdCharter}{OML}{mdbch}{m}{n}
-\DeclareMathSymbol{\piCharter}{\mathord}{mdCharter}{"19}
-\DeclareSymbolFont{kp}{U}{jkpmia}{m}{it}
-\DeclareMathSymbol{\pikp}{\mathord}{kp}{"19}
-\DeclareSymbolFont{px}{U}{pxmia}{m}{it}
-\DeclareMathSymbol{\pipx}{\mathord}{px}{"19}
-\DeclareSymbolFont{tx}{U}{txmia}{m}{it}
-\DeclareMathSymbol{\pitx}{\mathord}{tx}{"19}
-% For showing original \i and \j in text mode:
-\DeclareTextFontCommand{\extrafont}{\fontfamily{lmr}\selectfont}
+\def\pilmr{\text{\usefont{LGR}{lmr}{m}{n}\symbol{112}}}
+\def\piAlegreya{\text{\usefont{LGR}{Alegreya-LF}{m}{n}\symbol{112}}}
+\def\piCochineal{\text{\usefont{LGR}{Cochineal-LF}{m}{n}\symbol{112}}}
+\def\piLibSerif{\text{\usefont{LGR}{LibertinusSerif-LF}{m}{n}\symbol{112}}}
+\def\piLibSans{\text{\usefont{LGR}{LibertinusSans-LF}{m}{n}\symbol{112}}}
+\def\pilmss{\text{\usefont{LGR}{lmss}{m}{n}\symbol{112}}}
+\def\pigentium{\text{\usefont{LGR}{gentium}{m}{n}\symbol{112}}}
+\def\pilato{\text{\usefont{LGR}{lato-LF}{m}{n}\symbol{112}}}
+\DeclareFontFamily{U}{eur}{\skewchar\font'177}
+\DeclareFontShape{U}{eur}{m}{n}{%
+ <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
+\def\piEuler{\text{\usefont{U}{eur}{m}{n}\symbol{"19}}}
+\def\piSymbol{\text{\usefont{U}{psy}{m}{n}\symbol{`p}}}
+\def\piCharter{\text{\usefont{OML}{mdbch}{m}{n}\symbol{"19}}}
+\def\pikp{\text{\usefont{U}{jkpmia}{m}{it}\symbol{"19}}}
+\pinumber[otherpi] % fourier
+\def\pipx{\text{\usefont{U}{pxmia}{m}{it}\symbol{"19}}}
+\def\pitx{\text{\usefont{U}{txmia}{m}{it}\symbol{"19}}}
+
+% Next command is used for showing original Latin Modern \i and \j in text mode:
+%\DeclareTextFontCommand{\extrafont}{\fontfamily{lmr}\selectfont} % useless with fourier
\DisableCrossrefs
%\CodelineIndex
%\RecordChanges
+
\usepackage{hyperref}
+\let\C\relax % "\C already defined" with hyperref when compiling with xelatex or lualatex
\hypersetup{%
colorlinks,
linkcolor=blue,
@@ -83,7 +87,7 @@
%</driver>
% \fi
%
-% \CheckSum{831}
+% \CheckSum{845}
%
% \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
@@ -159,8 +163,8 @@
% (and LGR encoding pi by default), it is no longer compatible with the older,
% - paren command has been removed,
% - hvect and hlbar have been slightly modified (phantom t instead of phantom h),
-% - several changes in documentation,
-% - now using the Charter font (with the package mathdesign)}
+% - several changes in the documentation,
+% - now using the Charter font in the doc (with the package mathdesign)}
%
% \changes{v2.1}{2022/12/26}{
% - Improved management of square brackets with the ibrackets package,
@@ -225,26 +229,41 @@
%
% \changes{v2.12}{2024/02/29}{
% - The xparse package has been removed by mistake in v2.11,
-% this may cause some compatibility problems with unicode-math;
+% this may cause some compatibility problems;
% it is loaded again by mismath
% - Improvements to make pinumber work perfectly with unicode-math
% - Small corrections in the doc}
%
+% \changes{v3.0}{2024/03/15}{
+% - Rewriting of the pinumber command including the pifonts macro
+% - Presenting other lgrmath values for pinumber in the doc
+% - The \C macro is now in AtBeginDocument
+% - amsmath isn't loaded anymore because mathtools loads it
+% - Bug fix with options decimalcomma and ibrackets
+% - New option 'nofunction' to lighten the package loading
+% - Addition of coker and Res in standard operator names
+% - New option 'classicReIm' to deactivate Im and Re redefinition
+% - New option 'otherReIm' to provide an alternative writing with cmsy font
+% - Removal of the PEupright command
+% - Additional space in the lfrac macro increased from \: (5mu) to 7mu
+% - New optional parameter for adjusting the space in lfrac
+% - Changing the vphantom in hvect, hvec and lbar from `t' to `A', looks better}
+%
% \GetFileInfo{mismath.sty}
%
% \title{Miscellaneous mathematical macros \\The \textsf{mismath} package\thanks{This document
% corresponds to \textsf{mismath}~\fileversion, dated \filedate.
% Thanks to François Bastouil for initial help in English translation.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{February 29, 2024}
+% \date{May 04, 2024}
%
% \maketitle
% \tableofcontents
%
% \section{Introduction}
%
-% According to the International Standards ISO~31-0:1992 to ISO~31-13:1992
-% (superseded by ISO~80000-2:2009), mathematical \emph{constants} $\e$, $\i$, $\otherpi$
+% According to the International Standards ISO~31-0:1992 to ISO~31-13:1992
+% (superseded by ISO~80000-2:2009), mathematical \emph{constants} $\e$, $\i$, $\pi$
% should be typeset in roman (upright shape) and not in italic like
% variables (see~\cite{TYPMA}~\cite{NIST}~\cite{SI}~\cite{ICTNS}).
% This package provides some tools to achieve this automatically.
@@ -262,14 +281,15 @@
% or worse $\left\Vert \vect{AB} \right\Vert$ (when using |\left|\ldots |\right|).
%
% \smallskip
-% The package also offers other macros for:
+% The package also offers other macros to typeset:
% \begin{itemize}
-% \item tensors,
-% \item some common operator names,
-% \item a few useful aliases,
-% \item enhancing spacing in mathematical formulas,
+% \item tensors in sans serif bold italic shape
+% (ISO recommendation~\cite{TYPMA}~\cite{NIST}~\cite{SI}),
+% \item some standard operator names,
+% \item several commands with useful aliases,
+% \item improved spacings in mathematical formulas,
% \item systems of equations and small matrices,
-% \item displaymath in double columns for lengthy calculations.
+% \item displaymath in double columns for lengthy calculations with short expressions.
% \end{itemize}
%
% To avoid compatibility issues,
@@ -282,36 +302,38 @@
%
% \medskip
% \DescribeEnv{\oarg{options}}
-% The \textsf{mismath} package loads the \textsf{amsmath} package~\cite{AMS}
-% without any options.
-% If you want to use \textsf{amsmath} with specific options (refer to its documentation),
-% you can include these options when calling \textsf{mismath}, or
-% you can load \textsf{amsmath}
-% with the desired options before loading \textsf{mismath}.
-% \emph{When using the package \textsf{unicode-math}~\cite{UNIC}, \textsf{mismath}
-% must be loaded before \textsf{unicode-math}}, just like \textsf{amsmath}.
+% The \textsf{mismath} package loads the \textsf{mathtools}
+% \footnote{The \textsf{mathtools} package offers numerous helpful macros and improvements
+% of the \textsf{amsmath} package.}
+% package by Morten Høgholm and Lars Madsen~\cite{TOOL} which in turn loads
+% the \textsf{amsmath} package~\cite{AMS}.
+% If you want to use \mbox{\textsf{amsmath}} or \textsf{mathtools} with specific options,
+% you can include these options as options of \mbox{\textsf{mismath}}, or
+% you can load \textsf{amsmath} or \textsf{mathtools}
+% with the desired options before loading \mbox{\textsf{mismath}}.
+% When using the package \textsf{unicode-math}~\cite{UNIC}, \textsf{mismath}
+% should be loaded before \textsf{unicode-math}, just like \textsf{amsmath}.
%
% \medskip
-% In addition \textsf{mismath} loads the \textsf{mathtools} package
-% by Morten Høgholm and Lars Madsen~\cite{TOOL}.
-% This package offers numerous helpful macros and improvements of the \textsf{amsmath} package.
-%
-% \medskip
-% A recommendation, although rarely followed, is to typeset uppercase
+% An ISO recommendation, although rarely followed, is to typeset uppercase
% Greek letters in italic shape,
-% similar to other variables~\cite{ICTNS}. This can be automatically achieved,
+% as for other variables~\cite{ICTNS}. This is automatically achieved,
% for some particular fonts, with packages
% such as \textsf{fixmath} by Walter Schmidt~\cite{FIXM},
% \mbox{\textsf{isomath}} by Günter Milde~\cite{ISOM}
% or \textsf{pm-isomath} by Claudio Beccari~\cite{PMISO} and optionally with many others
% (such as \textsf{mathpazo} or \textsf{mathptmx} with the option \texttt{slantedGreek}).
+% When running through \LuaLaTeX\ or \XeLaTeX\ you can also get this result
+% with the option \mbox{\texttt{math-style=ISO}} provided
+% by the \textsf{unicode-math} package.
+% We also have the new \mbox{\textsf{mathgreeks}} package~\cite{MGREEK} which offers
+% a wide range of fonts and different settings with Greek letters.
% However this feature is not implemented here due to a conflicting rule in France,
% where all capital letters in mathematics
% are required to be typeset in upright shape
% \footnote{The \textsf{frenchmath} package~\cite{FR}
% ensures to follow the recommended French rules.}.
-% When running through \LuaLaTeX\ or \XeLaTeX\ you can also get this result by
-% setting the option \mbox{\texttt{math-style=ISO}} in the \textsf{unicode-math} package.
+% The user is free to choose loading one of these packages or not.
%
%
% \section{Usage}
@@ -338,12 +360,12 @@
%
% \medskip
% \DescribeMacro{\e} \DescribeMacro{\i} \DescribeMacro{\j}
-% To avoid cluttering a document that contains many occurrences of Euler's number (e)
-% or imaginary numbers (i) with |\mathup{e}| or |\mathup{i}|,
-% the package provides the |\e| command for Euler’s number
+% To avoid cluttering a document that contains many occurrences of Euler's number $\e$,
+% or imaginary number $\i$, with |\mathup{e}| or |\mathup{i}|,
+% the package provides the |\e| command for Euler's number
% and |\i| or |\j| for imaginary numbers.
% Let us notice that |\i| and |\j| already exist in LaTeX. In LR (left-to-right) mode,
-% they produce \mbox{`\extrafont{\i,\ \j}'} without the dot,
+% they produce \mbox{`\i,\ \j'} without the dot,
% allowing you to place accents on them.
% However, in mathematical mode, they produce the warning
% ``\texttt{LaTeX Warning: Command \string \i\space invalid in math mode on input line}
@@ -355,19 +377,21 @@
% \DescribeMacro{\MathUp}
% Indeed, typing a lot of backslashes for constants like $\e$, $\i$, or $\j$
% in a document with numerous formulas can become tiresome.
-% To alleviate this, the package proposes a powerful solution
+% To alleviate this, the package proposes another solution
% with the macro |\MathUp|\marg{char}.
% For example, when |\MathUp{e}| is called, any subsequent occurrence of $\e$
% will automatically be set in roman (upright shape),
% without the need to type |\e| explicitly. The effect of this macro
% can be either global or local, depending on whether it is used outside or inside an
% environment or braces.
-% Furthermore, you can call this macro in the preamble to apply the change
-% from the beginning of the document. This powerful feature allows you
-% to bring a document up to the standards effortlessly.
+% Furthermore, you can also call this macro in the preamble, then the change will apply
+% from the beginning of the document. This powerful command allows you
+% to bring a document up to the standards effortlessly and without changing anything
+% in your mathematical formulas.
% In fact, |\MathUp| can be applied to any valid single character,
-% offering flexibility for various use cases (another use of it with probability
-% will be presented in section \ref{operators}).
+% offering flexibility for various use cases
+% \footnote{Another use of it with probability
+% will be presented in section \ref{operators}.}.
%
% \medskip
% \DescribeMacro{\MathIt}
@@ -387,37 +411,47 @@
% In |\MathNumbers|, the comma separator between letters can be modified
% or removed as needed. In fact, this macro only affects the letters e, i, or j;
% it has no effect on other characters.
-% On the other hand, |\MathNormal| can be utilized for probability as well
-% (refer to section \ref{operators}), and it accepts any comma-separated list of arguments.
+% On the other hand, |\MathNormal| accepts any comma-separated list of arguments.
% This means you can apply the normal italic math mode typesetting to various letters
% at once using |\MathNormal|.
+%
+% \medskip
+% \DescribeMacro{\enumber}\DescribeMacro{\inumber}\DescribeMacro{\jnumber}
+% These three commands, used until version 2.2 but only functioning within the preamble,
+% serve now as aliases for the commands |\MathUp{e}|, |\MathUp{i}| or |\MathUp{j}|,
+% so they can be used anywhere
+% in the document or preamble and has an inverse switches with |\MathIt|.
%
% \medskip
% \DescribeMacro{\pinumber[\meta{option}]}
-% The mathematical constant $\otherpi$ should also be typeset in upright shape
+% The constant $\pi$ should also be typeset in upright shape
% (see~\cite{TYPMA}, \cite{NIST}, \cite{ICTNS}), which is different from italicized $\itpi$.
% However, this recommendation is even less commonly followed compared to the one
% concerning $\e$ and $\i$~\cite{TYPMA}.
-% The |\pinumber| command replaces the italic $\itpi$ with an upright $\otherpi$
-% each time |\pi| is called. It functions in two different ways.
+% Thanks to the |\pinumber| command, the italic $\itpi$ will be replaced
+% with an upright $\pi$
+% each time |\pi| is called. Thus |\pinumber| makes your document compliant with standards
+% without changing the source code of your mathematical formulas.
+% It functions in two different ways.
%
% \begin{enumerate}
-% \item You can install a Greek letters package that provides the glyphs in upright shape.
+% \item You can load a Greek letters package that provides the glyphs in upright shape.
% There are many available.
% Notably, let us mention \textsf{upgreek}~\cite{GREEK},
% \mbox{\textsf{mathdesign}}~\cite{DESIGN},
% \mbox{\textsf{kpfonts}}~\cite{KPF},
-% \mbox{\textsf{fourier}}~\cite{FOUR} (used in the present document),
-% \mbox{\textsf{libertinust1math}},
-% \mbox{\textsf{pxgreeks}} (using \textsf{pxfonts}), \mbox{\textsf{txgreeks}}
-% (using \textsf{txfonts})
+% \mbox{\textsf{fourier}}~\cite{FOUR} (used in the present document), but also
+% \mbox{\textsf{pxgreeks}} (using \textsf{pxfonts}~\cite{PX}), \mbox{\textsf{txgreeks}}
+% (using \textsf{txfonts}~\cite{TX})
% \footnote{When using \textsf{pxgreeks} or \textsf{txgreeks},
% they should be loaded \emph{after} \textsf{mismath} to avoid an error
% due to conflict with the existing macros \texttt{\string\iint}, \texttt{\string\iiint},
% \texttt{\string\iiiint}, \texttt{\string\idotsint} in \textsf{amsmath}.},
-% \textsf{libgreek}, etc.
+% \mbox{\textsf{libertinust1math}}~\cite{LIB}, \textsf{libgreek}, etc.
% A special mention goes to \textsf{lgrmath} of Jean-François Burnol~\cite{LGR}
-% which allows the use of any Greek LGR-encoded font in math mode.
+% which allows the use of any Greek LGR-encoded font in math mode,
+% an idea taken up in \textsf{mathgreeks}~\cite{MGREEK}.
+% Also note \textsf{newtxmath}~\cite{NTX} which has several font options.
% These packages provide commands like |\uppi| (\textsf{upgreek}),
% |\piup| (\textsf{mathdesign}, \textsf{kpfonts}, \textsf{lgrmath}),
% |\otherpi| (\textsf{fourier}), etc.
@@ -425,101 +459,122 @@
% letters in upright shape by default, but this in not our goal here.}
%
% In this case, |\pinumber| must be called in the preamble
-% with the name of the command (without the backslash) giving access to the upright pi
-% (piup, uppi, otherpi \ldots) as the argument for the optional parameter.
+% with an optional argument being the name of the command, \emph{without the backslash},
+% giving access to the upright pi:
+% piup, uppi, otherpi\ldots
% However, installing such a Greek letters package will modify
% all the other Greek letter glyphs.
% ^^A even if, except for pi, they will be in italics.
%
-% By using the preliminary code |\MathNumbers{ei}\pinumber[otherpi]|
-% (assuming the \textsf{fourier} package is loaded)
+% By calling in the preamble |\MathNumbers{ei}\pinumber[otherpi]|
+% (assuming the \textsf{fourier} package is loaded),
% you can achieve the following result:
% \begin{center}
-% |$e^{i\pi} = -1$| \quad yields \quad $\e^{\i\otherpi}=-1$.
+% |$e^{i\pi} = -1$| \quad yields \quad $\e^{\i\pi}=-1$.
% \end{center}
%
% \item Without installing a package, it is possible to change only the glyph of pi
-% without altering the original glyphs for the other Greek letters,
-% which are typically in italics.
-% ^^A The original pi will still be accessible with |\itpi|.
+% without altering the other Greek letters,
+% which are typically in italics.
%
% In this case, |\pinumber| must be called in the preamble with an optional argument
% of the \texttt{key=value} type. The key name corresponds to a package
% providing the same glyph.
-% When a key is given without a value, |\pinumber| will choose a default value
-% specified below (depending on the key) .
% The following table summarizes the available options.
+% When a key is given without a value, |\pinumber| will choose a default value
+% specified in the following text (depending on the key).
%
% \begin{center}
% \setlength{\extrarowheight}{1pt}
% \begin{tabular}{>{\ttfamily}l>{$}c<{$}}
% \hline
-% \normalfont Option & \mbox{Result} \\
+% {\normalfont Option} lgrmath=... & \mbox{Result} \\
% \hline
-% lgrmath=lmr & \pilmr \\
-% lgrmath=Alegreya-LF & \piAlegreya \\
-% lgrmath=Cochineal-LF & \piCochineal \\
-% lgrmath=\ldots & \ldots\\
-% upgreek=Euler & \pi \\
-% upgreek=Symbol & \piSymbol \\
+% Alegreya-LF & \piAlegreya \\
+% Cochineal-LF & \piCochineal \\
+% LibertinusSerif-LF & \piLibSerif \\
+% LibertinusSans-LF & \piLibSans \\
+% lmr & \pilmr \\
+% lmss & \pilmss \\
+% gentium & \pigentium\\
+% lato-LF & \pilato \\
% \hline
% \end{tabular}
-% \qquad
+% \qquad
% \begin{tabular}{>{\ttfamily}l>{$}c<{$}}
% \hline
-% \normalfont Option & \mbox{Result} \\
+% \normalfont Other options & \mbox{Result} \\
% \hline
+% fontspec=\ldots & \ldots \\
+% upgreek=Euler & \piEuler \\
+% upgreek=Symbol & \piSymbol \\
% mathdesign & \piCharter \\
% kpfonts & \pikp \\
-% fourier & \otherpi\\
+% fourier & \pi\\
% pxfonts & \pipx \\
% txfonts & \pitx \\
-% & \\
% \hline
% \end{tabular}
% \end{center}
%
+% \medskip
% \begin{itemize}
+%
% \item With the \texttt{lgrmath} key, we actually have numerous possibilities
-% for values (any Greek letters math fonts in LGR encoding).
+% for values (any Greek letters math font in LGR encoding).
% The documentation of the \textsf{lgrmath}
% package explains how to check an visualize all available fonts on your distribution.
-% We have only presented three of them. The default value is \texttt{lmr}.
+% We have only presented seven of them. The default value is \texttt{lmr}.
+% Other interesting values are \texttt{NotoSerif-LF}, \texttt{Clara-TLF},
+% \texttt{droidserif}, \texttt{fct}, \texttt{llcmss}.
%
+% \item When |\pinumber| is called without an argument in the preamble,
+% it corresponds to the option \texttt{lgrmath=lmr}.
+% This $\pilmr$ character is well-suited
+% for use with the Latin Modern font family
+% \footnote{It will look the same as the one provided by \texttt{lgrmath=cmr} or by
+% Günter Milde's \textsf{textalpha} package~\cite{ALPHA}.}.
+%
+% \item With the \texttt{fontspec} key, there are also many possible values,
+% corresponding to the TrueType or OpenType fonts installed on your system
+% (works with \LuaLaTeX\ or \XeLaTeX).
+% See the \textsf{mathgreeks} documentation for examples.
+
% \item With the \texttt{upgreek} key, the default value is \texttt{Symbol}.
% There is a third possible value, \texttt{Symbolsmallscale},
% which provides the same character as \texttt{Symbol} but reduced in size by 10\,\%.
%
% \item With the \texttt{mathdesign} key, there are actually 3 possible values:
-% \texttt{Utopia}, \texttt{Garamond}, or \texttt{Charter} (default value),
-% but the glyphs obtained for pi look very similar.
+% \texttt{Utopia}, \texttt{Garamond} or \texttt{Charter} (the default value),
+% but the glyphs obtained for pi look quite similar.
%
% \item With the \texttt{kpfonts} key, we have two possible values:
% \texttt{normal} (default) and \texttt{light}. The option \texttt{kpfonts=light}
% provides a slightly less bold character.
%
-% \item The keys \texttt{fourier} (based on Utopia), \texttt{pxfonts} (based on Palatino)
-% and \texttt{txfonts} (based on Times)
+% \item The last keys, \texttt{fourier} (based on Utopia), \texttt{pxfonts}
+% (based on Palatino),
+% \texttt{txfonts} (based on Times)
% are booleans whose default value is \texttt{true} (when called).
+% The \texttt{txfonts} option yields the same glyph than \texttt{lgrmath=txr}.
%
-% \item When |\pinumber| is called without an argument in the preamble,
-% it corresponds to the option \texttt{lgrmath=lmr}.
-% This $\pilmr$ character is particularly well-suited
-% for use with the default Computer Modern or Latin Modern font family
-% \footnote{It will look the same as the one provided by
-% Günter Milde's \textsf{textalpha} package~\cite{ALPHA}.}.
% \end{itemize}
% \end{enumerate}
%
% The \textsf{unicode-math} package~\cite{UNIC} provides |\uppi|, and you can use
-% |\pinumber[uppi]| to produce automatic upright pi, but, with \textsf{unicode-math},
-% it can be quite complicated
-% to make some other Greek letters packages work.
-% In any case, such a package must be loaded after \textsf{unicode-math} and in
-% |\AtBeginDocument|.
-% However, \textsf{unicode-math} supports |\pinumber| very well with the
-% previous \texttt{key=value} options, by calling |\pinumber[option]| after
-% \mbox{\textsf{unicode-math}}.
+% |\pinumber[uppi]| to produce automatic upright pi in the selected math font,
+% but |\pinumber[uppi]| must be called \emph{after} \mbox{\textsf{unicode-math}},
+% and a math font must have been explicitly chosen with |\setmathfont|.
+% You can also use the \texttt{fontspec} key option to obtain pi in any font
+% that is supported by \mbox{\textsf{unicode-math}} \eg
+% |\pinumber[fontspec=STIX Two Math]|.
+%
+% For other fonts, it can be quite complicated to make Greek letters packages
+% work with \textsf{unicode-math}. In any case, such a package must be loaded
+% after \textsf{unicode-math} and in |\AtBeginDocument|.
+% However, |\pinumber| supports \textsf{unicode-math} very well with any previous
+% \texttt{key=value} option, by calling |\pinumber|\oarg{option}
+% after \textsf{unicode-math}.
%
% \medskip
% \DescribeMacro{\itpi}
@@ -555,7 +610,7 @@
% If you wish to use a different type of arrow, you must call \textsf{esvect}
% with the appropriate option \emph{before} loading \textsf{mismath}.
% For example, using |\usepackage[d]{esvect}|
-% will provide the arrows produced by default in~\cite{VECT}.
+% will provide the same arrows that are used by default in~\cite{VECT}.
%
% \medskip
% \DescribeMacro{\boldvect}
@@ -567,11 +622,11 @@
% \begin{minipage}{8cm}
% \begin{verbatim}
%\[ \boldvect \vect{v}
-% =\lambda\vect{e}_x+\mu\vect{e}_y. \]
+% =\lambda\vect{e}_x+\mu\vect{e}_y \]
% \end{verbatim}
% \end{minipage}
% \begin{minipage}{4cm}\vspace{-2ex}
-% $\boldvect \vect{v}=\lambda\vect{e}_x +\mu\vect{e}_y$.
+% $\boldvect \vect{v}=\lambda\vect{e}_x +\mu\vect{e}_y$
% \end{minipage}
%
% \DescribeMacro{\boldvectcommand}
@@ -586,9 +641,12 @@
% \textsf{unicode-math} provides the |\symbfit| command.
% To use an alternative command instead of |\boldsymbol| in \textsf{mismath},
% redefine |\boldvectcommand|,
-% for instance after loading \textsf{fixmath}:
-% \begin{center} |\renewcommand\boldvectcommand{\mathbold}|. \end{center}
+% for instance after loading \textsf{fixmath}:
+%
+% \medskip
+% \centeredline{|\renewcommand\boldvectcommand{\mathbold}|}
%
+% \medskip
% According to ISO rules, symbols for matrices are also in bold italic.
% Therefore you can use the same |\boldvect| command or create another alias.
%
@@ -604,28 +662,31 @@
% \DescribeMacro{\hvect}
% When vectors with arrows are typeset side by side,
% the arrows can be set up slightly higher using |\hvect|
-% (which places a vertical phantom box containing ``$t$'')
+% (which places a vertical phantom box containing `$A$')
% to avoid inelegant effects. For example, writing
% \begin{itemize}
-% \item $\vect{AB}=\hvect{u}+ \vect{AC}$, obtained with |\hvect{u}|,
-% is better than $\vect{AB}=\vect{u}+ \vect{AC}$;
+% \item $\vect{AB}=\hvect{u} + \vect{AC}$, obtained with |\hvect{u}|,
+% looks better than $\vect{AB}=\vect{u}+ \vect{AC}$;
% \item $\hvect{a} \cdot \vect{b}=0$, obtained with |\hvect{a}|,
-% is better thant $\vect{a} \cdot \vect{b}=0$.
+% looks better than $\vect{a} \cdot \vect{b}=0$.
% \end{itemize}
-% This adjustment ensures a more visually pleasing appearance when vectors
-% with arrows are combined in an equation.
+% This adjustment ensures a nicer appearance when vectors
+% with arrows are combined in an equation
+% \footnote{For a fine tuning you can also use the \texttt{\string\vstrut} or
+% \texttt{\string\cstrut} macros from the \textsf{spacingtricks} package~\cite{SPA}.}.
% The |\boldvect| and |\arrowvect| switches have the same effect on |\hvect|
% as they do on |\vect|.
%
% \DescribeMacro{\hvec}
% In a similar way, |\hvec| raises the little arrow produced by
-% the \LaTeX\ command |\vec|, to the height of the letter ``$t$''
-% (but |\boldvect| have no effect here):
+% the \LaTeX\ command |\vec|, to the height of the letter `$A$'
+% (but |\boldvect| have no effect on |\vec| nor |\hvec|):
% \begin{itemize}
% \item $\mathcal{P}=\vec{f}\cdot\hvec{v}$, obtained with |\hvec{v}|,
-% is better than $\mathcal{P}=\vec{f}\cdot\vec{v}$.
+% seems better than $\mathcal{P}=\vec{f}\cdot\vec{v}$;
+% ^^A (the result of |\vec| with \textsf{fourier} may be bad with high letters, \eg $\vec{h}$)
% \item $\vec{f} =m \hvec{a}$, obtained with |\hvec{a}|,
-% is better than $\vec{f} =m \vec{a}$.
+% seems better than $\vec{f} =m \vec{a}$.
% \end{itemize}
%
% \DescribeMacro{\norm}
@@ -639,11 +700,11 @@
% instead of $\Vert\vec{h}\Vert$ or $\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,
-% \eg $\e^{\norm{\vec{h}}}$.
+% \eg $X^{\norm{\vec{h}}}$.
% This macro is useful only for arguments of special height, such as $\vec{h}$ or $\vect{AB}$
% and may give bad results in other situations.
%
-% \pagebreak
+% \medskip
% \DescribeMacro{\mathbfsfit}\DescribeMacro{\tensor}
% For tensors symbols, ISO rules recommend using
% sans serif bold italic, but there
@@ -651,7 +712,7 @@
% However, the \mbox{\textsf{mismath}} package defines this alphabet
% (assuming the font encoding and package you use permits it)
% and provides the macro |\mathbfsfit| or its alias |\tensor|.
-% By using |\tensor{T}| you can produce $\tensor{T}$.
+% By writing |\tensor{S}\otimes\tensor{T}|, you get $\tensor{S}\otimes\tensor{T}$.
%
% \subsection{Standard operator names}\label{operators}
%
@@ -681,12 +742,12 @@
% \[m\frac{\di^2x}{\di t^2}+h\frac{\di x}{\di t}+kx=0\]
% \end{minipage}
%
-% This command can also represent \emph{distance} (hence its name):
-% \[\lambda\di(A, \mathcal{F})+\mu\di(B, \mathcal{H}).\]
+% The command |\di| can also represent the \emph{distance}, hence its name:
+% \[\di(u, \cmmathcal{H}) = \frac{\abs{\langle u,v\rangle}}{\lVert v \rVert}.\]
%
% \DescribeMacro{\P} \DescribeMacro{\E}
% To refer to probability
-% \footnote{\LaTeX\ provides also \texttt{\string Pr} which gives $\Pr$.}
+% \footnote{\LaTeX\ provides also \texttt{\string \Pr} which gives $\Pr$.}
% and expectation the proper use is to typeset the capital letters $\P$, $\E$
% in roman just like any standard function identifier.
% This can be achieved with |\P| and |\E| commands.
@@ -698,43 +759,45 @@
%
% \medskip
% \DescribeMacro{\V}
-% Variance is generally denoted by $\var$ or $\Var$ (see table below),
+% Variance is generally denoted by $\var$ or $\Var$ (see the following table),
% but some authors prefer to use $\V$, which can be produced using |\V|.
%
-% \medskip
+% \pagebreak
% \DescribeMacro{\MathProba}\DescribeMacro{\MathNormal}
% As for $\e$, $\i$ or $\j$, you can use |\MathUp{P}|, |\MathUp{E}|
% or |\MathUp{V}| to avoid typing many |\P|, |\E| or |\V|.
% However you can also achieve this in a single command with |\MathProba|,
-% for example |\MathProba{P,E}|. We get the inverse toggle with
+% for example |\MathProba{PE}|. We get the inverse toggle with
% |\MathIt| for any individual letter or |\MathNormal| for a list.
%
% \medskip
% \DescribeMacro{\probastyle}
-% Some authors use ``blackboard bold'' font to represent probability, expectation
+% Some authors use ``outline'' font shape to represent probability, expectation
% and variance: $\mathbb{P}, \mathbb{E}, \mathbb{V}$.
% The |\probastyle| macro sets the appearance of |\P|, |\E| and |\V|.
% For instance |\renewcommand\probastyle{\mathbb}|
% \footnote{The effect of this redefinition is global or local to the container environment
% in which it is used.}
-% brings the previous ``double-struck'' letters.
-% The |\mathbb| command comes from \textsf{amsfonts} package
-% (loaded by \textsf{amssymb} but also available standalone)
-% which needs to be called in the preamble.
+% brings the double-struck letters.
+% The |\mathbb| command is provided by \textsf{amsfonts} package
+% (which needs to be called in the preamble), but also by other complete math font
+% packages such as \textsf{mathdesign}, \textsf{kpfonts}, \textsf{fourier},
+% \textsf{unicode-math}\ldots
+% \hypertarget{nofunction}{}
%
% \medskip
% The following standard operator names are defined in \textsf{mismath}:
% \begin{center}
% \begin{tabular}{rlrlrl}
-% |\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$
+% |\adj| & $\adj$ \qquad\mbox{} & |\End| & $\End$ \qquad\mbox{} & |\Res| & $\Res$ \\
+% |\Aut| & $\Aut$ & |\erf| & $\erf$ & |\rot| & $\rot$ \\
+% |\codim| & $\codim$ & |\grad| & $\grad$ & |\sgn| & $\sgn$ \\
+% |\coker| & $\coker$ & |\id| & $\id$ & |\sinc| & $\sinc$ \\
+% |\Conv| & $\Conv$ & |\Id| & $\Id$ & |\spa| & $\spa$ \\
+% |\Cov| & $\Cov$ & |\im| & $\im$ & |\tr| & $\tr$ \\
+% |\cov| & $\cov$ & |\lb| & $\lb$ & |\var| & $\var$ \\
+% |\curl| & $\curl$ & |\lcm| & $ \lcm$ & |\Var| & $\Var$ \\
+% |\divg| & $\divg$ & |\rank| & $\rank$ & |\Zu| & $\Zu$
% \end{tabular}
% \end{center}
%
@@ -745,26 +808,15 @@
% For the variance, the covariance and the identity function,
% two notations are proposed, with or without a first capital letter,
% because both are very common.
-% On the other hand, `$\im$' stands for the image of a linear transformation
-% (like `$\ker$' for the kernel)
-% whereas `$\Im$' is the imaginary part of a complex number.
% Please note that |\div| already exists ($\div$) and |\span| is a \TeX\ primitive;
% they haven't been redefined. Therefore the provided macros are called |\divg| (divergence)
% and |\spa| (span of a set of vectors).
% Furthermore |\Z| is used to denote the set of integers (see \ref{aliases}),
-% which is why we used |\Zu|,
+% which is why we propose |\Zu|,
% to designate the center of a group: $\Zu(G)$ (from German Zentrum).
%
-%\medskip
-% \DescribeMacro{\oldRe} \DescribeMacro{\oldIm}
-% The |\Re| and |\Im| macros already existed to refer to real and imaginary part
-% of a complex number, producing outdated symbols $\oldRe$ and $\oldIm$.
-% However, they have been redefined according to current usage,
-% as mentioned in the above table. Nevertheless,
-% it is still possible to obtain the old symbols with |\oldRe| and |\oldIm|.
-%
% \medskip
-% The package \textsf{mismath} also provides some (inverse) circular or hyperbolic functions,
+% The \textsf{mismath} package also provides some (inverse) circular or hyperbolic functions,
% that are missing in \LaTeX:
% \begin{center}
% \begin{tabular}{rlrlrl}
@@ -773,21 +825,44 @@
% |\sech| & $\sech$ & |\arcosh| & $\arcosh$ & |\arsech| & $\arsech$ \\
% |\csch| & $\csch$ & |\artanh| & $\artanh$ & |\arcsch| & $\arcsch$
% \end{tabular}
-% \end{center}
+% \end{center}
+%
+% \DescribeMacro{[nofunction]}
+% Some may find that the definition of all these operators and functions is not useful
+% for their needs. So, the above definitions (on this page)
+% can be disabled with the \texttt{nofunction} option.
+% \hypertarget{classicReIm}{}
+%
+% \medskip
+% \DescribeMacro{\Re} \DescribeMacro{\Im}
+% The |\Re| and |\Im| macros refer to real and imaginary part
+% of a complex number. They have been redefined to produce $\mathup{Re}$ and $\mathup{Im}$,
+% in place of outdated symbols $\oldRe$ and $\oldIm$.
+% Nevertheless, it is still possible to obtain the old symbols
+% with |\oldRe| and |\oldIm|.
+%
+% \medskip
+% \DescribeMacro{[otherReIm]}
+% An alternative notation $\Re$, $\Im$ is provided by invoking the \texttt{otherReIm}
+% package option,
+% \DescribeMacro{[classicReIm]}
+% whereas the \texttt{classicReIm} option deactivates these redefinitions.
%
% \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).\]
+% Asymptotic comparison operators (in Bachmann-Landau notation) are obtained with
+% |\bigO| or |\bigo| and |\lito| commands. The first one uses
+% the |\cmmathcal| alphabet and the last two compose the letters `O' and `o' in
+% roman, as for any operator:
+% \[ n^2+\bigO(n\log n) \txt{or} n^2+\bigo(n\log n)\txt{and}
+% \e^x=1+x+\frac{x^2}{2}+\lito\bigl(x^2\bigr).\]
%
% \subsection{A few useful aliases} \label{aliases}
%
-% \onlymathC
% In the tradition of Bourbaki and D.~Knuth, proper use requires
% that classic sets of numbers are typeset in bold roman:
% $\R, \C, \Z, \N, \Q$,
-% whereas ``double-barred'' or ``openwork'' letters
-% ($\mathbb{R}, \mathbb{C}, \mathbb{Z}, \ldots$)
+% whereas double-struck letters
+% ($\mathbb{R}, \mathbb{C}, \mathbb{Z}, \mathbb{N}, \mathbb{Q}$)
% are reserved for writing at the blackboard~\cite{LSHORT}.
% Similarly, to designate a field we use $\F$ or $\K$ (Körper in German).
% We obtain these symbols with the following macros:
@@ -795,23 +870,22 @@
% |\R|, |\C|, |\Z|, |\N|, |\Q|, |\F|, |\K|.
% \end{center}
%
-% \medskip
+% \smallskip
% \DescribeMacro{\mathset}
% The |\mathset| command enables you 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,
-% you can simply place |\renewcommand\mathset{\mathbb}| where you want,
-% for instance in the preamble after loading the \textsf{amsfonts} package
-% (which provides the ``blackboard bold'' typeface,
-% also loaded by \textsf{amssymb}).
+% By default, |\mathset| is an alias for |\mathbf|, but if you prefer outline letters,
+% you can simply use |\renewcommand\mathset{\mathbb}| (with local effect when
+% inside an environment or a pair of curly braces).
%
% \smallskip
% \DescribeMacro{\onlymathC}
% The macro |\onlymathC| is designed for cases when |\C| is already defined,
-% but only in text mode (usually when loading the Russian language with \textsf{babel}
-% or \textsf{polyglossia}). The macro preserves the original definition for text mode
+% but only in text mode (usually with the Russian language). Then you get the message:
+% ``\texttt{Command \string\C\space invalid in math mode}''.
+% This macro preserves the original definition for text mode
% and allows you to use |\C| for the complex number set in math mode.
-% For this purpose, simply call |\onlymathC| once in the preamble or anywhere in the document.
+% Simply call |\onlymathC| once in the preamble or anywhere in the document.
%
% \medskip
% \DescribeMacro{\ds}
@@ -844,11 +918,11 @@
% \DescribeMacro{\lbar} \DescribeMacro{\hlbar}
% Large bars over expressions are obtained with |\overline|
% or its alias |\lbar|, to get for instance $\lbar{z_1z_2}$.
-% Similar to vectors, you can raise the bar (from the height of ``$h$'') with
+% Similar to vectors, you can raise the bar (from the height of `$A$') with
% the |\hlbar| command, to correct uneven bars heights.
% \begin{center}
% $\lbar{z+z'}=\hlbar{z}+\lbar{z'}$, obtained with |\hlbar{z}|,
-% is better than $\lbar{z+z'}=\lbar{z}+\lbar{z'}$.
+% looks better than $\lbar{z+z'}=\lbar{z}+\lbar{z'}$.
% \end{center}
%
% \DescribeMacro{\eqdef} \DescribeMacro{\eqdef*}
@@ -918,36 +992,36 @@
% (ordinary symbol) and leaving less space around than |\times|:
% \begin{center}
% $\lambda+\alpha \mul b-\beta \mul c$, obtained with |\mul|,
-% is better than $\lambda+\alpha \times b-\beta \times c$.
+% looks better than $\lambda+\alpha \times b-\beta \times c$.
% \end{center}
%
% When using |\mul| before a function name or around a |\left...\right| structure,
% the space may be too large on one side of |\mul|.
-% To ensure the same amount of space on both sides of |\mul|,
+% To ensure the same amount of space on both sides,
% you can use thin negative spaces |\!|
% or enclose the function or structure with braces:
% \begin{center}
-% $x\mul{\sin x}$, obtained with |x\mul{\sin x}|, is slightly better than $x\mul\sin x$.\\[1ex]
+% $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 $\sin\!{\left(\frac{\pi}{3}\right)}\mul 2$, which is better than
+% yields $\sin\!{\left(\frac{\pi}{3}\right)}\mul 2$, which looks better than
% $\sin\left(\frac{\pi}{3}\right)\mul 2$.
% \end{center}
-% The thin negative space after the function name is not relative to |\mul|,
-% but is due to the fact that spaces around a |\left...\right| structure
-% are bigger than those produced by single parenthesis |(...)|.
+% The negative thin space after the function name is not related to |\mul|,
+% but to the ``excessive'' spaces around the |\left... \right| structure.
%
% \medskip
% \DescribeMacro{\pow}
% In the same way, when typesetting an exponent after a closing \emph{big}
% parenthesis produced by |\right)|,
% the exponent appears to be a little to far from the parenthesis.
-% To address this issue, the |\pow|\marg{expr}\marg{pow} command is provided, which sets
-% \meta{expr} between parentheses and adjusts the positioning of the exponent \meta{pow}
-% slightly closer to the right parenthesis
-% \footnote{This macro gives bad results with normal-sized parenthesis.}.
+% To address this issue, the |\pow|\marg{expr}\marg{pow} command is provided
+% \footnote{This macro gives bad results with \emph{normal-sized} parenthesis.},
+% which sets the positioning of the exponent \meta{pow}
+% slightly closer to the right parenthesis.
% Compare:
-% \[ \e^a \sim\pow{1+\frac{a}{n}}{n} \txt{which may be better than}
-% \e^a \sim\left(1+\frac{a}{n}\right)^{n}.\]
+% \[ \e^a =\lim_{n \to +\infty}\pow{1+\frac{a}{n}}{n}
+% \txt{obtained with \texttt{\string \pow}, rather than}
+% \e^a =\lim_{n \to +\infty}\left(1+\frac{a}{n}\right)^{n}.\]
%
% \DescribeMacro{\abs}
% The correct typesetting of absolute value (or modular for a complex number) is achieved
@@ -964,16 +1038,18 @@
% \DescribeMacro{\lfrac}
% The |\lfrac| macro behaves like |\frac|
% but with thicker spaces around the arguments,
-% making the corresponding fraction bar slightly longer:\\[2ex]
-% \begin{minipage}{8cm}
-% \begin{verbatim}
-%\[ \lbar{Z} =
-% \lfrac{\lbar{z_1-z_2}}{\lbar{z_1+z_2}} \]
-% \end{verbatim}
-% \end{minipage}
-% \begin{minipage}{4cm}\vspace{-3ex}
-% \[ \lbar{Z} = \lfrac{\lbar{z_1-z_2}}{\lbar{z_1+z_2}} \]
-% \end{minipage}
+% making the corresponding fraction bar slightly longer. See the following examples:
+% \[ \lbar{Z} = \lfrac{\lbar{z_1-z_2}}{\lbar{z_1+z_2}} \qquad
+% u(x)= \lfrac{\frac{1-2x}{5}}{x^2+1} \qquad
+% y'+xy=\lfrac[4mu]{1}{\sqrt{x}}
+% \]
+%
+% This macro has an optional parameter |\lfrac|\oarg{space}\marg{num}\marg{denom}
+% to adjust the length of the fraction bar. The optional \meta{space} argument must be given
+% in \emph{math units} (\texttt{mu});
+% the default value is \texttt{7mu} (equivalent to |\:\,|),
+% \texttt{4mu} in the last example.
+% \hypertarget{ibrackets}{}
%
% \medskip
% \DescribeMacro{[ibrackets]}
@@ -984,17 +1060,14 @@
% To address this issue, we have redefined the brackets in the \textsf{ibrackets}
% package~\cite{BRACKET}.
% This one can be optionally
-% \footnote{This functionality is optional because there is a conflict
-% when using another command for open intervals with square brackets defined by
-% \texttt{\string \DeclarePairedDelimiter} from \textsf{mathtools}~\cite{TOOL}.}
% 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 ]-\otherpi, 0[ \cup ]2\otherpi, 3\otherpi[ & \mbox{\ with \textsf{ibrackets}}, \\
+% x\in ]-\pi, 0[ \cup ]2\pi, 3\pi[ & \mbox{\ with \textsf{ibrackets}}, \\
% \mbox{instead of \ }
-% x\in \mathclose{]}-\otherpi, 0 \mathopen{[} \cup
-% \mathclose{]} 2\otherpi, 3\otherpi \mathopen{[}
+% x\in \mathclose{]}-\pi, 0 \mathopen{[} \cup
+% \mathclose{]} 2\pi, 3\pi \mathopen{[}
% &\mbox{\ without \textsf{ibrackets}}.
% \end{align*}
%
@@ -1017,10 +1090,15 @@
% 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
+% \medskip
+% Note that there are other ways to proceed,
+% for example with |\interval|,
% from the \textsf{interval} package~\cite{INT},
-% or |\DeclarePairedDelimiters| from the \textsf{mathtools} package~\cite{TOOL}
-% (but this command is incompatible with \textsf{ibrackets}).
+% or with |\DeclarePairedDelimiter|
+% \footnote{You cannot use \texttt{\string\DeclarePairedDelimiter} with square brackets
+% when \textsf{ibrackets} is loaded.}
+% from \mbox{\textsf{mathtools}}~\cite{TOOL}.
+% \hypertarget{decimalcomma}{}
%
% \medskip
%\DescribeMacro{[decimalcomma]}
@@ -1040,11 +1118,10 @@
% in particular when running through 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.
+% functionally identical to that of \textsf{ncccomma} but
+% 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.}.
+% package option.
%
% \subsection{Environments for systems of equations and small matrices}
%
@@ -1159,7 +1236,8 @@
%
% \DescribeEnv{mathcols}
% The \texttt{mathcols} environment allows you to arrange
-% ``long'' calculations in double columns, separated with a central rule,
+% lengthy calculations with short expressions across two columns
+% separated by a vertical line,
% as shown in the following example.
% However, to use this feature, the \textsf{multicol} package must be loaded in the preamble.
% The \texttt{mathcols} environment activates mathematical mode
@@ -1194,96 +1272,85 @@
% \end{verbatim}
%
% \vspace{-4ex}
-% \subsection{Old commands}
-%
-% 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 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.
-% 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|.
-%
-% \begin{center}
+% \subsection{Summary of the package options}
+%
+% The following table summarizes the possible package options.
+% You can add to them any option you want to pass to \textsf{amsmath} or \textsf{mathtools}.
+% The hyperlinks (in blue) redirect to the paragraphs in the documentation
+% where these options are described.
+% \begin{center}
% \setlength{\extrarowheight}{1pt}
-% \begin{tabular}{ll}
+% \begin{tabular}{>{\ttfamily}ll}
% \hline
-% Old command & New alternative \\
+% \normalfont Option & \mbox{Effect} \\
% \hline
-% |\enumber| & |\MathUp{e}| \\
-% |\inumber| & |\MathUp{i}| \\
-% |\jnumber| & |\MathUp{j}| \\
-% |\PEupright| & |\MathProba{PE}| \\
+% \hyperlink{nofunction}{nofunction} & don't load some additional function definitions \\
+% \hyperlink{classicReIm}{otherReIm} & typesets |\Re| and |\Im| as $\Re$ and $\Im$ \\
+% \hyperlink{classicReIm}{classicReIm} & preserves |\Re| and |\Im| as $\oldRe$ and $\oldIm$ \\
+% \hyperlink{ibrackets}{ibrackets} & loads the \textsf{ibrackets} package\\
+% \hyperlink{decimalcomma}{decimalcomma} & loads the \textsf{decimalcomma} package \\
% \hline
% \end{tabular}
% \end{center}
-%
-% \medskip
-% You can also utilize |\MathNumbers| instead of |\MathUp| with an argument containing
-% all the constants you want to be typeset in roman (among `e, i, j').
-%
-% Additionally you can include V in the argument of |\MathProba| to refer to variance,
-% (or even use |\MathUp{P}\MathUp{E}|).
-%
-% \medskip
-% 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.
-% Additionally, the command, |\paren|, which was used before version 2.0,
-% is no longer supported.
-%
% \StopEventually{}
% \section{Implementation}
%
% We load certain packages conditionally to avoid 'option clash' errors in cases
% where these packages have been previously loaded with other options.
+% The \textsf{amsmath} package is loaded by \textsf{mathtools}.
% \begin{macrocode}
\newif\ifmm@ibrackets % initialized to false
-\newif\ifmm@decimalcomma
\DeclareOption{ibrackets}{\mm@ibracketstrue}
+\newif\ifmm@decimalcomma
\DeclareOption{decimalcomma}{\mm@decimalcommatrue}
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{amsmath}}
+\newif\ifmm@nofunction
+\DeclareOption{nofunction}{\mm@nofunctiontrue}
+\newif\ifmm@otherReIm
+\DeclareOption{otherReIm}{\mm@otherReImtrue}
+\newif\ifmm@classicReIm
+\DeclareOption{classicReIm}{\mm@classicReImtrue}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{mathtools}}
\ProcessOptions \relax
-\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
+%\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
\@ifpackageloaded{mathtools}{}{\RequirePackage{mathtools}}
\@ifpackageloaded{esvect}{}{\RequirePackage[b]{esvect}}
\RequirePackage{ifthen}
\RequirePackage{xparse} % provides \NewDocumentCommand, now in LaTeX3
-\RequirePackage{xspace}
+\RequirePackage{xspace} % for \iif command
\RequirePackage{iftex}
\RequirePackage{etoolbox} % provides \AtEndPreamble
-\RequirePackage{xkeyval}
+\RequirePackage{xkeyval} % for \pinumber options
% \end{macrocode}
%
% The package \textsf{unicode-math} causes some compatibility issues
-% with the options \texttt{ibrackets} or \texttt{decimalcomma}: the respective packages
+% with \textsf{ibrackets} and \textsf{decimalcomma}: theses packages
% must be loaded \emph{after} \textsf{unicode-math},
-% but \textsf{mismath} (like \textsf{amsmath}) must be loaded \emph{before}
+% but \textsf{mismath} (like \textsf{amsmath}) should be loaded \emph{before}
% \textsf{unicode-math}.
-% And to complicate matters, \textsf{unicode-math} defines all its commands
+% And to complicate matters, \mbox{\textsf{unicode-math}} defines all its commands
% by |\AtBeginDocument|.
-% Therefore we used the command |\AtBeginDocument| within
-% |\AtEndPreamble| (from the \textsf{etoolbox} package).
+% Therefore we used the command |\AtEndPreamble|, from the \textsf{etoolbox} package,
+% which makes the job (because both \textsf{ibrackets} and \textsf{decimalcomma}
+% work also in |\AtBeginDocument|).
%
% Moreover the command |\mathbfsfit| (used for tensors) is already defined
% in \textsf{unicode-math} and will not be redefined if \textsf{unicode-math}
% is loaded.
% \begin{macrocode}
+\@ifpackageloaded{unicode-math}{
+ \PackageWarningNoLine{mismath}{The package unicode-math\MessageBreak
+ should be loaded after mismath}
+}{}
\newif\ifmm@unicodemath
\newif\ifmm@multicol
\AtEndPreamble{% necessary to work with unicode-math
- \@ifpackageloaded{multicol}{\mm@multicoltrue}{\mm@multicolfalse}
+ \ifmm@decimalcomma\RequirePackage{decimalcomma}\fi
+ \ifmm@ibrackets\RequirePackage{ibrackets}\fi
+ \@ifpackageloaded{multicol}{\mm@multicoltrue}{}
\@ifpackageloaded{unicode-math}{\mm@unicodemathtrue}{
- \mm@unicodemathfalse
\DeclareMathAlphabet{\mathbfsfit}{\encodingdefault}%
{\sfdefault}{bx}{it}}
- \AtBeginDocument{% necessary to work with unicode-math
- \ifmm@ibrackets\RequirePackage{ibrackets}\fi
- \ifmm@decimalcomma\RequirePackage{decimalcomma}\fi
- }
}
% \end{macrocode}
@@ -1299,7 +1366,6 @@
% \end{macrocode}
%
-% \medskip
% \DescribeMacro{\mm@warning} \DescribeMacro{\mm@macro} \DescribeMacro{\mm@operator}
% The next three internal macros serve as meta commands for
% conditionally defining macros while providing a warning message if the macro already exists.
@@ -1307,8 +1373,8 @@
% \medskip
% \begin{macrocode}
\newcommand\mm@warning[1]{
- \PackageWarningNoLine{mismath}{
- Command \bslash #1 already exist and will not be redefined}
+ \PackageWarningNoLine{mismath}{Command \bslash #1 already exist
+ \MessageBreak and will not be redefined}
}
\newcommand\mm@macro[2]{
\@ifundefined{#1}{
@@ -1336,7 +1402,7 @@
% \begin{macrocode}
\@ifundefined{mathup}{
\providecommand*{\mathup}[1]{{\operatorfont #1}}
- }{\mm@warning{mathup} } % also in kpfonts (and unicode-math)
+ }{\mm@warning{mathup} } % also in kpfonts and unicode-math
\mm@macro{e}{\mathup{e}}
\AtBeginDocument{\let\oldi\i \let\oldj\j
\renewcommand{\i}{\TextOrMath{\oldi}{\mathup{i}}}
@@ -1443,11 +1509,8 @@
% and may not have a straightforward solution.
%
% \medskip
-% In addition to |\MathUp| and |\MathIt|, we also offer the following two commands
-% to set a group of letters in roman typeface: one for for mathematical constants,
-% among `e, i, j', and the other for probability operators, among or `P, E, V'.
-%
-% \medskip
+% In addition to |\MathUp| and |\MathIt|, we also offer the following command
+% to set a group of letters, among `e, i, j', in roman typeface.
% \begin{macrocode}
\newcommand*\MathNumbers[1]{%
\in@{e}{#1} \ifin@ \MathUp{e} \fi
@@ -1455,12 +1518,6 @@
\in@{j}{#1} \ifin@ \MathUp{j} \fi
}
-\newcommand*\MathProba[1]{%
- \in@{P}{#1} \ifin@ \MathUp{P} \fi
- \in@{E}{#1} \ifin@ \MathUp{E} \fi
- \in@{V}{#1} \ifin@ \MathUp{V} \fi
-}
-
% \end{macrocode}
% \DescribeMacro{\apply}
% With the inverse switch |\MathNormal|, you can apply the normal (italic) style
@@ -1471,7 +1528,7 @@
% 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 posted under the pseudonym `wipet' on 2021/02/26.
-% Let its author, Petr Ol\v sák, be thanked.
+% Let its author, Petr Ol\v{s}ák, be thanked.
% This macro allows to accomplish tasks that
% usual loop instructions like |\@for| or |\foreach| cannot achieve due to
% errors like ``!~Improper alphabetic constant''.
@@ -1496,44 +1553,24 @@
% 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
-% the old commands are maintained for compatibility reasons.
+% the old commands are maintained but as alias for |\MathUp|.
% \medskip
%
% \begin{macrocode}
-\newcommand{\enumber}{%
- \PackageWarning{mismath}{Old command \string\enumber\space
- is used. \MessageBreak
- It can be replaced by \string\MathUp{e}}
- \MathUp{e}
-}
-\newcommand{\inumber}{%
- \PackageWarning{mismath}{Old command \string\inumber\space
- is used. \MessageBreak
- It can be replaced by \string\MathUp{i}}
- \MathUp{i}
-}
-\newcommand{\jnumber}{
- \PackageWarning{mismath}{Old command \string\jnumber\space
- is used. \MessageBreak
- It can be replaced by \string\MathUp{j}}
- \MathUp{j}
-}
-\newcommand{\PEupright}{
- \PackageWarning{mismath}{Old command \string\PEupright\space
- is used. \MessageBreak
- It can be replaced by \string\MathProba{PE}}
- \MathUp{P}\MathUp{E}
-}
+\newcommand{\enumber}{\MathUp{e}}
+\newcommand{\inumber}{\MathUp{i}}
+\newcommand{\jnumber}{\MathUp{j}}
% \end{macrocode}
%
-% Obtaining an upright Greek letter $\otherpi$ must be handled differently.
+% Obtaining an upright Greek letter $\pi$ must be handled differently.
% The switches are called |\pinumber| and |\pinormal|
% and can be used anywhere in the document.
%
% But |\pinumber| must be called first in the preamble with an optional argument.
% This argument can be a valid command name that produces an upright pi letter
% (after having loading an appropriate package).
+% Compatibility with \textsf{unicode-math} is a bit tricky!
% When given without an argument in the preamble,
% |\pinumber| uses an LGR font encoding called \texttt{lmr}.
% A new feature (v2.11) is to use |\pinumber| with a keyval option to
@@ -1541,129 +1578,130 @@
% a whole package, thus without altering the other (italic) Greek letters.
% We achieve this with |\DeclareSymbolFont| and |\DeclareMathSymbol|.
% We just have to know the ``name'' of the desired symbol font.
-% Compatibility with \textsf{unicode-math} is a bit tricky!
%
% \medskip
% \begin{macrocode}
\newif\ifmm@lgr
-\define@cmdkey{pinumber}[mm@]{lgrmath}[lmr]{\mm@lgrtrue}
+\define@cmdkey{pifonts}[mm@]{lgrmath}[lmr]{\mm@lgrtrue}
\newif\ifmm@upgreek
-\define@choicekey{pinumber}{upgreek}[\mm@upgreek@option]%
- {Euler,Symbol,Symbolsmallscale}[Symbol]{\mm@upgreektrue}
+\define@choicekey{pifonts}{upgreek}[\mm@upgreek@option]%
+ {Euler,Symbol,Symbolsmallscale}[Symbol]{\mm@upgreektrue}
\newif\ifmm@mathdesign
-\define@choicekey{pinumber}{mathdesign}[\mm@mathdesign@option]%
- {Utopia,Garamond,Charter}[Charter]{\mm@mathdesigntrue}
+\define@choicekey{pifonts}{mathdesign}[\mm@mathdesign@option]%
+ {Utopia,Garamond,Charter}[Charter]{\mm@mathdesigntrue}
\newif\ifmm@kpfonts
-\define@choicekey{pinumber}{kpfonts}[\mm@kp@option]%
- {normal,light}[normal]{\mm@kpfontstrue}
-\define@boolkey{pinumber}[mm@]{fourier}[true]{}
-\define@boolkey{pinumber}[mm@]{pxfonts}[true]{}
-\define@boolkey{pinumber}[mm@]{txfonts}[true]{}
+\define@choicekey{pifonts}{kpfonts}[\mm@kp@option]%
+ {normal,light}[normal]{\mm@kpfontstrue}
+\define@boolkeys{pifonts}[mm@]{fourier,pxfonts,txfonts}[true]
+\newif\ifmm@fontspec
+\define@cmdkey{pifonts}[mm@]{fontspec}[GFS Didot]{\mm@fontspectrue}
-\newcommand*\pinumber[1][]{%
- \ifthenelse{\equal{#1}{}}{% no argument given
- \ifx\@onlypreamble\@notprerr % not in preamble
- \@ifundefined{savedpi}{
- \PackageWarning{mismath}{%
- \string\pinumber\space
- must be used in the preamble first}
- }{\let\pi\savedpi}
- \else % in the preamble
- \AtBeginDocument{\let\itpi\pi}% must be here with unicode-math
- \AtEndPreamble{\AtBeginDocument{
- %\let\itpi\pi
- \let\pi\relax
- \DeclareFontEncoding{LGR}{}{}
- \DeclareSymbolFont{mm@grup}{LGR}{lmr}{m}{n}
- \DeclareMathSymbol{\pi}\mathalpha{mm@grup}{"70}
- \let\savedpi\pi
- }}
- \fi
- }{% command name or keyval options, necessarily in the preamble
- \AtBeginDocument{\let\itpi\pi}% must be here with unicode-math
- \AtEndPreamble{\AtBeginDocument{
- \@ifundefined{#1}{%
- \setkeys{pinumber}{#1}
- \let\pi\relax
- \ifmm@lgr
- \DeclareFontEncoding{LGR}{}{}
- \DeclareSymbolFont{mm@grup}{LGR}{\mm@lgrmath}{m}{n}
- % may work with bold (b) instead of m
- \DeclareMathSymbol{\pi}{\mathalpha}{mm@grup}{112}
-
- \else\ifmm@upgreek
- \ifdefstring{\mm@upgreek@option}{Euler}{
+\newcommand*\pifonts[1]{%
+ \setkeys{pifonts}{#1}
+ \let\pi\relax
+
+ \ifmm@lgr
+ \DeclareFontEncoding{LGR}{}{}
+ \DeclareSymbolFont{mmupgr}{LGR}{\mm@lgrmath}{m}{n}
+ % may work with bold (b) instead of m
+ \DeclareMathSymbol{\pi}{\mathord}{mmupgr}{112}
+
+ \else\ifmm@fontspec
+ \@ifpackageloaded{fontspec}{}{
+ \PackageError{mismath}{\string\pinumber\space with
+ the `fontspec' option\MessageBreak
+ needs the fontspec package,\MessageBreak
+ which must be run with LuaLaTeX or XeLaTeX}{}
+ }
+ \newfontfamily\mismathgreekfont{\mm@fontspec}[NFSSFamily=mgr]
+ \DeclareSymbolFont{mmupgr}{TU}{mgr}{m}{n}
+ \Umathchardef\pi="7 \symmmupgr "03C0
+
+ \else\ifmm@upgreek
+ \ifdefstring{\mm@upgreek@option}{Euler}{
\DeclareFontFamily{U}{eur}{\skewchar\font'177}
\DeclareFontShape{U}{eur}{m}{n}{%
<-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
- \DeclareFontShape{U}{eur}{b}{n}{%
- <-6> eurb5 <6-8> eurb7 <8-> eurb10}{}
- \DeclareSymbolFont{mm@grup}{U}{eur}{m}{n}
- \DeclareMathSymbol{\pi}{\mathord}{mm@grup}{"19} % 25
- }{
- \ifdefstring{\mm@upgreek@option}{Symbol}{
- \DeclareSymbolFont{mm@grup}{U}{psy}{m}{n}
- \DeclareMathSymbol{\pi}{\mathord}{mm@grup}{`p}
- }{
- \ifdefstring{\mm@upgreek@option}{Symbolsmallscale}{
+ \DeclareSymbolFont{mmupgr}{U}{eur}{m}{n}
+ \DeclareMathSymbol{\pi}{\mathord}{mmupgr}{"19}
+ }{
+ \ifdefstring{\mm@upgreek@option}{Symbol}{
+ \DeclareSymbolFont{mmupgr}{U}{psy}{m}{n}
+ \DeclareMathSymbol{\pi}{\mathord}{mmupgr}{`p}
+ }{
+ \ifdefstring{\mm@upgreek@option}{Symbolsmallscale}{
\DeclareFontFamily{U}{fsy}{}
\DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
- \DeclareSymbolFont{mm@grup}{U}{fsy}{m}{n}
- \DeclareMathSymbol{\pi}{\mathord}{mm@grup}{`p}
- }{}}}
+ \DeclareSymbolFont{mmupgr}{U}{fsy}{m}{n}
+ \DeclareMathSymbol{\pi}{\mathord}{mmupgr}{`p}
+ }{}}}
- \else\ifmm@mathdesign
- \ifdefstring{\mm@mathdesign@option}{Utopia}{
- \DeclareSymbolFont{mm@grup}{OML}{mdput}{m}{n}
- }{
- \ifdefstring{\mm@mathdesign@option}{Garamond}{
- \DeclareSymbolFont{mm@grup}{OML}{mdugm}{m}{n}
- }{
- \ifdefstring{\mm@mathdesign@option}{Charter}{
- \DeclareSymbolFont{mm@grup}{OML}{mdbch}{m}{n}
- }{}}}
+ \else\ifmm@mathdesign
+ \ifdefstring{\mm@mathdesign@option}{Utopia}{
+ \DeclareSymbolFont{mmupgr}{OML}{mdput}{m}{n}
+ }{
+ \ifdefstring{\mm@mathdesign@option}{Garamond}{
+ \DeclareSymbolFont{mmupgr}{OML}{mdugm}{m}{n}
+ }{
+ \ifdefstring{\mm@mathdesign@option}{Charter}{
+ \DeclareSymbolFont{mmupgr}{OML}{mdbch}{m}{n}
+ }{}}}
- \else\ifmm@fourier
- \DeclareFontEncoding{FML}{}{}
- \DeclareSymbolFont{mm@grup}{FML}{futm}{m}{it}
-
- \else\ifmm@kpfonts
- \ifdefstring{\mm@kp@option}{normal}{
- \DeclareSymbolFont{mm@grup}{U}{jkpmia}{m}{it}
- }{
- \ifdefstring{\mm@kp@option}{light}{
- \DeclareSymbolFont{mm@grup}{U}{jkplmia}{m}{it}
- }}
-
- \else\ifmm@pxfonts
- \DeclareSymbolFont{mm@grup}{U}{pxmia}{m}{it}
-
- \else\ifmm@txfonts
- \DeclareSymbolFont{mm@grup}{U}{txmia}{m}{it}
- \fi\fi\fi\fi\fi
-
- \DeclareMathSymbol{\pi}{\mathord}{mm@grup}{"19}
- \fi\fi
-
- \let\savedpi\pi
+ \else\ifmm@fourier
+ \DeclareFontEncoding{FML}{}{}
+ \DeclareSymbolFont{mmupgr}{FML}{futm}{m}{it}
+
+ \else\ifmm@kpfonts
+ \ifdefstring{\mm@kp@option}{normal}{
+ \DeclareSymbolFont{mmupgr}{U}{jkpmia}{m}{it}
}{
- \ifmm@unicodemath
- \ifthenelse{\equal{#1}{uppi}}{
- \AtBeginDocument{%
- \let\pi\relax
- \def\pi{\symup{\symbol{"003C0}}}
- \let\itpi\relax
- \def\itpi{\symit{\symbol{"003C0}}} % or "1D70B
- }
- }{\renewcommand{\pi}{\csname #1\endcsname}}
- \else
- \renewcommand{\pi}{\csname #1\endcsname}
- \fi
-
- \let\savedpi\pi
- }
- }}
- }
+ \ifdefstring{\mm@kp@option}{light}{
+ \DeclareSymbolFont{mmupgr}{U}{jkplmia}{m}{it}
+ }{}}
+
+ \else\ifmm@pxfonts
+ \DeclareSymbolFont{mmupgr}{U}{pxmia}{m}{it}
+
+ \else\ifmm@txfonts
+ \DeclareSymbolFont{mmupgr}{U}{txmia}{m}{it}
+
+ \fi\fi\fi\fi\fi
+ \DeclareMathSymbol{\pi}{\mathord}{mmupgr}{"19}
+ \fi\fi\fi
+}
+
+\newcommand*\pinumber[1][]{%
+ \ifthenelse{\equal{#1}{}}{% no argument given
+ \ifx\@onlypreamble\@notprerr % not in preamble
+ \@ifundefined{savedpi}{
+ \PackageWarning{mismath}{%
+ \string\pinumber\space
+ must be used in the preamble first}
+ }{\let\pi\savedpi}
+ \else % in the preamble
+ \AtBeginDocument{
+ \let\itpi\pi
+ \pifonts{lgrmath}
+ \let\savedpi\pi
+ }
+ \fi
+ }{% command name or keyval options, necessarily in the preamble
+ \AtBeginDocument{% must be here with unicode-math
+ \let\itpi\pi
+ \@ifundefined{#1}{%
+ \pifonts{#1}
+ }{
+ \ifmm@unicodemath
+ \ifthenelse{\equal{#1}{uppi}}{% or "1D70B
+ \renewcommand\pi{\symup{\symbol{"03C0}}}
+ \renewcommand\itpi{\symit{\symbol{"03C0}}}
+ }{\renewcommand{\pi}{\csname #1\endcsname}}
+ \else
+ \renewcommand{\pi}{\csname #1\endcsname}
+ \fi
+ }
+ \let\savedpi\pi}
+ }
}
\newcommand{\pinormal}{%
@@ -1683,8 +1721,29 @@
}
% \end{macrocode}
+% When |\pinumber|\oarg{keyval} has been called, you can also get
+% some other mathematical constants using Greek letters,
+% \eg $\othergamma$, the Euler-Mascheroni constant:
+% \begin{verbatim}
+% \let\gamma\relax
+% \DeclareMathSymbol{\gamma}{\mathord}{mmupgr}{"0D}
+% \end{verbatim}
+% \vspace{-2ex}
+% If \textsf{unicode-math} is used, you must put these commands in
+% |\AtBeginDocument|.
+% The hexadecimal code |"0D| depends on the option passed to |\pinumber|
+% in the preamble (see the command |\pifonts| above and search in package docs). \\
+% And to get the golden ratio $\othervarphi$:
+% \begin{verbatim}
+% \let\phi\relax
+% \DeclareMathSymbol{\varphi}{\mathord}{mmupgr}{"27}
+% \end{verbatim}
+% \vspace{-2ex}
+% To preserve the original $\gamma$ or $\varphi$,
+% you can define |\upgamma| or |\upvarphi| instead.
%
-% And now the commands for vectors (and tensors).
+% \medskip
+% And now the commands for vectors and tensors.
% \medskip
% \begin{macrocode}
\newboolean{arrowvect}
@@ -1693,9 +1752,9 @@
\newcommand{\boldvect}{\setboolean{arrowvect}{false}}
\newcommand{\boldvectcommand}{\boldsymbol} % from amsbsy package
\mm@macro{vect}{\ifthenelse{\boolean{arrowvect}}{
- \vv}{\boldvectcommand}} % doesn't work well with \if... \fi
-\newcommand*{\hvect}[1]{\vect{\vphantom{t}#1}}
-\newcommand*{\hvec}[1]{\vec{\vphantom{t}#1}}
+ \vv}{\boldvectcommand}} % doesn't work well with \if... \fi
+\newcommand*{\hvect}[1]{\vect{\vphantom{A}#1}}
+\newcommand*{\hvec}[1]{\vec{\vphantom{A}#1}}
\newcommand*{\@norm}[1]{
\mbox{\raisebox{1.75pt}{\small$\bigl\Vert$}} #1
@@ -1715,9 +1774,7 @@
\newcommand{\tensor}{\mathbfsfit} % isomath uses \mathsfbfit
% \end{macrocode}
-%
-% Classic identifiers are presented below.
-% \medskip
+
% \begin{macrocode}
\mm@macro{di}{\mathop{}\!\mathup{d}}
\newcommand\probastyle{}
@@ -1726,62 +1783,121 @@
\mm@macro{E}{\operatorname{\probastyle{E}}}
\mm@macro{V}{\operatorname{\probastyle{V}}}
-\mm@operator{\adj}{adj}
-\mm@operator{\Aut}{Aut}
-\mm@operator{\codim}{codim}
-\mm@operator{\Conv}{Conv}
-\mm@operator{\cov}{cov}
-\mm@operator{\Cov}{Cov}
-\mm@macro{curl}{\operatorname{\vect{\mathup{curl}}}}
-\mm@operator[divg]{\divg}{div}
-\mm@operator{\End}{End}
+\newcommand*\MathProba[1]{%
+ \in@{P}{#1} \ifin@ \MathUp{P} \fi
+ \in@{E}{#1} \ifin@ \MathUp{E} \fi
+ \in@{V}{#1} \ifin@ \MathUp{V} \fi
+}
-\mm@operator{\erf}{erf}
-\mm@macro{grad}{\operatorname{\vect{\mathup{grad}}}}
-\mm@operator{\id}{id} % mathop or mathord?
-\mm@operator{\Id}{Id}
-\mm@operator{\im}{im}
-\let\oldIm\Im \renewcommand{\Im}{\operatorname{Im}}
-\mm@operator{\lb}{lb}
-\mm@operator{\lcm}{lcm}
+% \end{macrocode}
+% Classic identifiers are presented below. They will be defined only
+% if the option \texttt{nofunction} has not been activated.
+% \medskip
+% \begin{macrocode}
+\ifmm@nofunction\else
+ \mm@operator{\adj}{adj}
+ \mm@operator{\Aut}{Aut}
+ \mm@operator{\codim}{codim}
+ \mm@operator{\coker}{coker}
+ \mm@operator{\Conv}{Conv}
+ \mm@operator{\cov}{cov}
+ \mm@operator{\Cov}{Cov}
+ \mm@macro{curl}{\operatorname{\vect{\mathup{curl}}}}
+ \mm@operator[divg]{\divg}{div}
+
+ \mm@operator{\End}{End}
+ \mm@operator{\erf}{erf}
+ \mm@macro{grad}{\operatorname{\vect{\mathup{grad}}}}
+ \mm@operator{\id}{id} % mathop or mathord?
+ \mm@operator{\Id}{Id}
+ \mm@operator{\im}{im}
+ \mm@operator{\lb}{lb}
+ \mm@operator{\lcm}{lcm}
+ \mm@operator{\rank}{rank}
+
+ \mm@operator{\Res}{Res}
+ \mm@macro{rot}{\operatorname{\vect{\mathup{rot}}}}
+ \mm@operator{\sgn}{sgn}
+ \mm@operator{\sinc}{sinc}
+ \mm@operator[spa]{\spa}{span}
+ \mm@operator{\tr}{tr}
+ \mm@operator{\var}{var}
+ \mm@operator{\Var}{Var}
+ \mm@operator[Zu]{\Zu}{Z}
+
+ \mm@operator{\arccot}{arccot}
+ \mm@operator{\sech}{sech}
+ \mm@operator{\csch}{csch}
+ \mm@operator{\arsinh}{arsinh}
+ \mm@operator{\arcosh}{arcosh}
+ \mm@operator{\artanh}{artanh}
+ \mm@operator{\arcoth}{arcoth}
+ \mm@operator{\arsech}{arsech}
+ \mm@operator{\arcsch}{arcsch}
+\fi
-\mm@operator{\rank}{rank}
-\let\oldRe\Re \renewcommand{\Re}{\operatorname{Re}}
-\mm@macro{rot}{\operatorname{\vect{\mathup{rot}}}}
-\mm@operator{\sgn}{sgn}
-\mm@operator{\sinc}{sinc}
-\mm@operator[spa]{\spa}{span}
-\mm@operator{\tr}{tr}
-\mm@operator{\var}{var}
-\mm@operator{\Var}{Var}
-\mm@operator[Zu]{\Zu}{Z}
+% \end{macrocode}
+%
+% The |\mathcal| alphabet, from the original Computer Modern font family,
+% is used here to produce $\Re$, $\Im$ and $\bigO$.
+% Several font packages redefines this alphabet producing glyphs that may seem less
+% suitable for the commands below.
+% We have therefore retained the original |\cmmathcal| math alphabet,
+% which can be used for other letters.
+% If \textsf{unicode-math} is called, it will redefine the commands |\Re| and |\Im|
+% in |\AtBeginDocument|, hence the use of `|\AtEndPreamble{\AtBeginDocument{|'
+% to ensure that the \textsf{mismath} redefinition occur after the actions
+% of \textsf{unicode-math}.
+%
+% \begin{macrocode}
+\DeclareFontFamily{U}{cmsy}{\skewchar\font48 }
+\DeclareFontShape{U}{cmsy}{m}{n}{% from mathalpha
+ <-5.5> cmsy5%
+ <5.5-6.5> cmsy6%
+ <6.5-7.5> cmsy7%
+ <7.5-8.5> cmsy8%
+ <8.5-9.5> cmsy9%
+ <9.5-> cmsy10}{}
+\DeclareMathAlphabet{\cmmathcal}{U}{cmsy}{m}{n}
-\mm@operator{\arccot}{arccot}
-\mm@operator{\sech}{sech}
-\mm@operator{\csch}{csch}
-\mm@operator{\arsinh}{arsinh}
-\mm@operator{\arcosh}{arcosh}
-\mm@operator{\artanh}{artanh}
-\mm@operator{\arcoth}{arcoth}
-\mm@operator{\arsech}{arsech}
-\mm@operator{\arcsch}{arcsch}
+\AtEndPreamble{\AtBeginDocument{
+ \ifmm@classicReIm\else
+ \let\oldRe\Re
+ \let\oldIm\Im
+ \ifmm@otherReIm
+ \renewcommand{\Re}{\cmmathcal{R}\mathit{e}}
+ \renewcommand{\Im}{\cmmathcal{I}\mathit{m}}
+ \else
+ \renewcommand{\Re}{\operatorname{Re}}
+ \renewcommand{\Im}{\operatorname{Im}}
+ \fi\fi
+}}
-\mm@operator[bigO]{\bigO}{\mathcal{O}}
+\mm@operator[bigO]{\bigO}{\cmmathcal{O}}
\mm@operator[bigo]{\bigo}{O}
\mm@operator[lito]{\lito}{o}
% \end{macrocode}
% And finally we present the remaining macros.
%
-% With Cyrillic languages, the command |\C| may already be defined (only for text mode).
-% Thus, it will not be redefined by \textsf{mismath}. However, one may still want
-% to use our |\C| macro only for math mode without interfering the definition of
-% the text |\C|, therefore the |\onlymathC| macro.
+% With Cyrillic languages, the command |\C| may already be defined but only for text mode.
+% Thus, it will not be redefined by \textsf{mismath}. However, when activating
+% |\onlymathC|, you can to use our |\C| macro only for math mode,
+% without interfering the definition of the text |\C| that is already defined.
+%
+% When using \XeTeX\ or \LuaTeX\ engines with the \textsf{hyperref} package,
+% |\C| will be already defined and
+% you get the message "\texttt{Command \string\C\space unavailable in encoding TU}".
+% Therefore |\onlymathC| is automatically called in that case.
% \medskip
% \begin{macrocode}
\mm@macro{mathset}{\mathbf}
\mm@macro{R}{\mathset{R}}
-\mm@macro{C}{\mathset{C}}
+\AtBeginDocument{
+ \@ifpackageloaded{hyperref}%
+ {\iftutex\onlymathC\fi}% LuaTex or XeTeX engines
+ {\mm@macro{C}{\mathset{C}}}
+}
\providecommand\onlymathC{\let\oldC\C
\renewcommand{\C}{\TextOrMath{\oldC}{\mathset{C}}} }
\mm@macro{N}{\mathset{N}}
@@ -1799,7 +1915,7 @@
\mm@macro{lbar}{\overline}
\@ifundefined{hlbar}{
- \providecommand*{\hlbar}[1]{\overline{\vphantom{t}#1}}}{
+ \providecommand*{\hlbar}[1]{\overline{\vphantom{A}#1}}}{
\mm@warning{hlbar} }
\newcommand\@eqdef{\stackrel{\mathup{def}}{=}}
\newcommand\@@eqdef{\stackrel{\mathrm{\Delta}}{=}}
@@ -1827,7 +1943,8 @@
\providecommand*{\abs}[1]{\left\vert#1\right\vert} }{
\mm@warning{abs} }
\@ifundefined{lfrac}{
- \providecommand*{\lfrac}[2]{\frac{\;#1\;}{\;#2\;}} }{
+ \providecommand*{\lfrac}[3][7mu]{%
+ \frac{\mkern#1#2\mkern#1}{\mkern#1#3\mkern#1}} }{
\mm@warning{lfrac} }
\newcommand{\systemstretch}{1.2}
@@ -1850,8 +1967,8 @@
\begin{math}\begin{aligned}\displaystyle
\else
\PackageError{mismath}{The mathcols environment
- needs the multicol package}{Add the package multicol
- to your preamble.}
+ needs the multicol package}{Call the package multicol
+ in your preamble.}
\fi
}{%
\end{aligned}\end{math} \hfill\mbox{}
@@ -1864,7 +1981,7 @@
}
% \end{macrocode}
%
-% \begin{thebibliography}{28}
+% \begin{thebibliography}{34}
% \begin{raggedright}
% \bibitem{TYPMA} \emph{Typesetting mathematics for science and technology according
% to ISO 31/XI}, Claudio Beccari, TUGboat Volume 18 (1997), No.~1.
@@ -1880,31 +1997,43 @@
% \url{https://old.iupac.org/standing/idcns/italic-roman_dec99.pdf}.
% \bibitem{VECT} \emph{\textsf{esvect} -- Typesetting vectors with beautiful
% arrow with \LaTeXe}, Eddie Saudrais, CTAN, v1.3 2013/07/11.
+% \bibitem{TOOL} \emph{The \textsf{mathtools} package}, Morten Høgholm, Lars Madsen, CTAN,
+% v1.29 2022/06/29.
% \bibitem{AMS} \emph{\textsf{amsmath} -- \AmS\ mathmatical facilities for \LaTeX},
% Frank Mittelbach, Rainer Schöpf, Michael Downes, Davis M.~Jones, David Carlisle,
% CTAN, v2.17n 2022/04/08.
% \bibitem{UNIC} \emph{Experimental Unicode mathematical typesetting:
% The \textsf{unicode-math} package}, Will Robertson, Philipp Stephani, Joseph Wright,
% Khaled Hosny, and others, CTAN, v0.8r 2023/08/13.
-% \bibitem{TOOL} \emph{The \textsf{mathtools} 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},
% the \textsf{pm-isomath} package by Claudio Beccari, CTAN, v1.2.00 2021/08/04.
+% \bibitem{MGREEK} \emph{The \textsf{mathgreeks} package}, Antoine Missier, CTAN,
+% v1.1 2024/05/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},
% 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},
% Christophe Caignaert, CTAN, v3.34 20/09/2022.
% \bibitem{FOUR} \textsf{Fourier-GUT\hspace{-0.1em}\emph{enberg}},
-% Michel Bovani, CTAN, v1.3 30/01/2005.
+% Michel Bovani, CTAN, v1.3 2005/01/30.
+% \bibitem{PX} \emph{\textsf{PX Fonts} -- Palatino-like fonts in support of mathematics},
+% Young Ryu, CTAN, 2000/12/14.
+% \bibitem{TX} \emph{\textsf{TX Fonts} -- Times-like fonts in support of mathematics},
+% Young Ryu, CTAN, 2000/12/15.
+% \bibitem{LIB} \emph{The LibertinusT1 Math Package}, Michael Sharpe, CTAN, v2.0.4 2024/01/14.
% \bibitem{LGR} \emph{The \textsf{lgrmath} package}, Jean-François B., CTAN, v1.0 2022/11/16.
+% \bibitem{NTX} \emph{New TX font package}, Micahel Sharpe, CTAN, v1.735 2024/03/01.
+% \bibitem{ALPHA} \emph{The \textsf{textalpha} package}
+% (part of the \textsf{greek-fontenc} bundle), Günter Milde, CTAN, v2.1 2022/06/14.
+% \bibitem{SPA} \emph{The \textsf{spacingtricks} package}, Antoine Missier, CTAN,
+% v1.8 2023/12/06.
+% \bibitem{BRACKET} \emph{Intelligent brackets -- The \textsf{ibrackets} package},
+% Antoine Missier, CTAN, v1.2, 2023/07/26.
% \bibitem{INT} \emph{The \textsf{interval} package}, Lars Madsen, CTAN,
% v0.4 2019/03/06.
% \bibitem{ICOMMA} \emph{The \textsf{icomma} package for \LaTeXe},
@@ -1918,9 +2047,7 @@
% \bibitem{SPAL} \emph{The \textsf{spalign} package}, Joseph Rabinoff, CTAN, 2016/10/05.
% \bibitem{NMATX} \emph{The package \textsf{nicematrix}}, François Pantigny, CTAN,
% v6.14 2023/02/18.
-% \bibitem{FR} \emph{L'extension \textsf{frenchmath}}, Antoine Missier, CTAN, v2.10 2024/02/25.
-% \bibitem{BRACKET} \emph{Intelligent brackets -- The \textsf{ibrackets} package},
-% Antoine Missier, CTAN, v1.2, 2023/07/26.
+% \bibitem{FR} \emph{L'extension \textsf{frenchmath}}, Antoine Missier, CTAN, v3.0 2024/05/04.
% \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.
diff --git a/macros/latex/contrib/mismath/mismath.ins b/macros/latex/contrib/mismath/mismath.ins
index b57ee6b828..5a39f8da29 100644
--- a/macros/latex/contrib/mismath/mismath.ins
+++ b/macros/latex/contrib/mismath/mismath.ins
@@ -46,7 +46,7 @@ and version 1.3 or later is part of all distributions of LaTeX version
\Msg{* mismath.sty *}
\Msg{* *}
\Msg{* To produce the documentation run the file mismath.dtx *}
-\Msg{* through XeLaTeX or LuaLaTeX. *}
+\Msg{* through LaTeX. *}
\Msg{* *}
\Msg{* Happy TeXing! *}
\Msg{* *}
diff --git a/macros/latex/contrib/mismath/mismath.pdf b/macros/latex/contrib/mismath/mismath.pdf
index 5b97173faa..fd41e6702c 100644
--- a/macros/latex/contrib/mismath/mismath.pdf
+++ b/macros/latex/contrib/mismath/mismath.pdf
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf b/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
index b6afbc2fbb..655d73fe6e 100644
--- a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
+++ b/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
index 9564aec94c..9aa462bb76 100644
--- a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
+++ b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
@@ -2,9 +2,9 @@
% licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2024/04/28}%
+\def\filedate{2024/05/02}%
\let\PfMfiledate\filedate%
-\def\fileversion{0.93}%
+\def\fileversion{0.94}%
\let\PfMfileversion\fileversion%
\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]%
@@ -37,6 +37,7 @@
\makeatletter
\gdef\PfMFontSize{\@ptsize}
+%\gdef\PfMFontSize{\f@size}
\makeatother
%définition des clés
\RequirePackage{simplekv}%
@@ -240,6 +241,15 @@
\repeat
}%
+% On bloque la graine de fabrication des nombres aléatoires.
+\ExplSyntaxOn
+\cs_new_eq:NN \PfMGraineAlea \sys_gset_rand_seed:n
+\ExplSyntaxOff
+
+\ExplSyntaxOn
+\cs_new_eq:NN \PfMChoisisGraineAlea \int_rand:n
+\ExplSyntaxOff
+
%% Gestion de l'affichage ou pas des item (Pour élèves PAP) par exemple
% Code by egreg : https://tex.stackexchange.com/questions/627250/hide-specific-item-in-a-list
\ExplSyntaxOn
@@ -1924,7 +1934,7 @@
\setsepchar{,}%
\readlist*\ListePetitsObjets{bonbons,billes,biscuits,gommes,clous,vis,cahiers,trousses}%
\readlist*\ListeFruits{pommes,poires,abricots,cerises,fraises,framboises,noix,pêches,nectarines,myrtilles,oranges,mandarines,kiwis}%
-\readlist*\ListeVariables{a,b,c,m,n,p,r,s,t,x,y,z}%
+\readlist*\ListeVariables{a,b,c,\ell,m,n,p,r,s,t,x,y,z}%
\makeatletter
\def\ExoCANWrite{%
@@ -3353,14 +3363,15 @@
}{%
\ifnum\thePfMMaquette=1\relax%
\else%
- \ifnum\PfMFontSize=0\relax%
- \fontsize{10}{\fpeval{1.2*10}}%
- \else\ifnum\PfMFontSize=1\relax%
- \fontsize{11}{\fpeval{1.2*11}}%
- \else%
- \fontsize{12}{\fpeval{1.2*12}}%
- \fi%
- \fi%
+ %\ifnum\PfMFontSize=0\relax%
+ % \fontsize{10}{\fpeval{1.2*10}}%
+ %\else\ifnum\PfMFontSize=1\relax%
+ % \fontsize{11}{\fpeval{1.2*11}}%
+ % \else%
+ % \fontsize{12}{\fpeval{1.2*12}}%
+ % \fi%
+ %\fi%
+ \fontsize{\fpeval{10+\PfMFontSize}}{\fpeval{1.2*(10+\PfMFontSize)}}%
\selectfont%
\renewcommand{\JustifyingParindent}{\parindent}
\justifying%
@@ -3392,6 +3403,7 @@
\fi%
\PfMBasculeDys%
\setlength{\columnseprule}{\useKV[Boulot]{Epaisseur}}%
+ \PfMChangerTailleCorrection%
}%
\NewDocumentCommand\PfMAffichageCorrectionColonnes{}{%
@@ -3421,7 +3433,7 @@
\stepcounter{PfMMaquette}%
% options de boulot
\IfHookExistsTF{env/Maquette/after}{\RemoveFromHook{env/Maquette/after}[*]}{}%
- \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]}{}%
+ %\IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]}{}%
% \AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}%
\useKVdefault[Boulot]%
\setKV[Boulot]{#1}%
@@ -3447,14 +3459,15 @@
\ifboolKV[Boulot]{CAN}{%
\setKV[CAN]{#2}%
%\ifboolKV[Boulot]{CorrigeSeul}{}{\TikzCAN}%
- \PfMChangerTailleCorrection%
\setcounter{PfMCNNumQ}{0}%
\setlength{\PfMLargeurQuestion}{\useKV[CAN]{CoefQ}\linewidth}\setlength{\PfMLargeurReponse}{\useKV[CAN]{CoefR}\linewidth}\setlength{\PfMLargeurJury}{\useKV[CAN]{CoefJ}\linewidth}%
\let\exercice\ExoCANWrite\let\endexercice\endExoCANWrite%
\AddToHook{env/exercice/begin}{\setcounter{PfMAlea}{0}}%
\AddToHook{env/Maquette/end}{%
+ \xdef\PfMAncienneGraine{\PfMChoisisGraineAlea{123456789}}
\xdef\PfMCANTotalExo{\thePfMExo}%
\setbox\PfMSauvegardeBox\vbox{%
+ \PfMGraineAlea{\thePfMMaquette}
\setcounter{PfMExo}{0}%
\renewcommand{\arraystretch}{2}%
\begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
@@ -3474,12 +3487,41 @@
\TikzCANCor{#2}%
\PfMAffichageCorrectionColonnes%
\clearpage
+ \normalsize%
\TikzCAN%
- \usebox{\PfMSauvegardeBox}%
- }{%
- \TikzCAN%
- \usebox{\PfMSauvegardeBox}%
- \ifboolKV[Boulot]{CorrigeFin}{\ifboolKV[Boulot]{CorrigeInverse}{}{\clearpage
+ \PfMGraineAlea{\thePfMMaquette}%
+ \setcounter{PfMCNNumQ}{0}%
+ \setcounter{PfMExo}{0}%
+ \renewcommand{\arraystretch}{2}%
+ \begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
+ \hhline{~---}%
+ \multicolumn{1}{c|}{}&\cellcolor{gray!15}\centering Question&\cellcolor{gray!15}\centering Réponse&\cellcolor{gray!15}\centering\arraybackslash Jury\\%
+ \hline%
+ \endhead%
+ \xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ex##1.can}&\CNReponse&\\
+ \hline%
+ }%
+ \end{longtable}%
+ \renewcommand{\arraystretch}{1}%
+ }{%
+ \PfMGraineAlea{\PfMAncienneGraine}%
+ \TikzCAN%
+ \setcounter{PfMCNNumQ}{0}%
+ \setcounter{PfMExo}{0}%
+ \renewcommand{\arraystretch}{2}%
+ \begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
+ \hhline{~---}%
+ \multicolumn{1}{c|}{}&\cellcolor{gray!15}\centering Question&\cellcolor{gray!15}\centering Réponse&\cellcolor{gray!15}\centering\arraybackslash Jury\\%
+ \hline%
+ \endhead%
+ \xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ex##1.can}&\CNReponse&\\
+ \hline%
+ }%
+ \end{longtable}%
+ \renewcommand{\arraystretch}{1}%
+ \ifboolKV[Boulot]{CorrigeFin}{\ifboolKV[Boulot]{CorrigeInverse}{}{\clearpage
\PfMPrepareCorrection{#1}%
\TikzCANCor{#2}%
\PfMAffichageCorrectionColonnes%