texlive[69466] Master: medmath (15jan24)

commits+karl at tug.org commits+karl at tug.org
Wed Jan 17 17:30:43 CET 2024


Revision: 69466
          https://tug.org/svn/texlive?view=revision&revision=69466
Author:   karl
Date:     2024-01-17 17:30:43 +0100 (Wed, 17 Jan 2024)
Log Message:
-----------
medmath (15jan24)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/medmath/
    trunk/Master/texmf-dist/doc/latex/medmath/README
    trunk/Master/texmf-dist/doc/latex/medmath/medmath.pdf
    trunk/Master/texmf-dist/doc/latex/medmath/medmath.tex
    trunk/Master/texmf-dist/tex/latex/medmath/
    trunk/Master/texmf-dist/tex/latex/medmath/medmath.sty
    trunk/Master/tlpkg/tlpsrc/medmath.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/medmath/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/medmath/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/medmath/README	2024-01-17 16:30:43 UTC (rev 69466)
@@ -0,0 +1,3 @@
+Package: Better medium-size math commands
+Author:  Jianrui Lyu <tolvjr at 163.com>
+License: The LaTeX Project Public License 1.3c
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/medmath/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/medmath/medmath.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/medmath/medmath.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/medmath/medmath.pdf	2024-01-17 00:43:34 UTC (rev 69465)
+++ trunk/Master/texmf-dist/doc/latex/medmath/medmath.pdf	2024-01-17 16:30:43 UTC (rev 69466)

Property changes on: trunk/Master/texmf-dist/doc/latex/medmath/medmath.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/medmath/medmath.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/medmath/medmath.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/medmath/medmath.tex	2024-01-17 16:30:43 UTC (rev 69466)
@@ -0,0 +1,82 @@
+%  -*- coding: utf-8 -*-
+\documentclass[oneside,11pt]{article}
+\usepackage[a4paper,margin=2cm]{geometry}
+
+\newcommand*{\myversion}{2024D}
+\newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)}
+\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{4pt plus 1pt minus 1pt}
+
+\usepackage{enumerate}
+\usepackage{codehigh}
+\usepackage{hyperref}
+\hypersetup{
+  colorlinks=true,
+  urlcolor=blue3,
+  linkcolor=green3,
+}
+
+%% The \oiint operator is defined with utopia font
+\usepackage[utopia]{mathdesign}
+
+\usepackage[mediummath]{nccmath}
+\usepackage{medmath}
+\booltrue{mdm at bare}
+
+\begin{document}
+
+\title{\textsf{\color{green3}The \texttt{medmath} package}}
+\author{Jianrui Lyu (tolvjr at 163.com)}
+\date{\mydate}
+\maketitle
+
+\section{The \texttt{mediummath} option in \texttt{nccmath} package}
+
+There are several problems with \texttt{mediummath} option in \texttt{nccmath} package.
+
+\begin{enumerate}
+  \item The big operators in superscripts and subscripts are too large.
+\begin{demohigh}
+\[A^{\sum_{0}^{1}x}=B\]
+\end{demohigh}
+  \item The definite integrals inside \texttt{cases} environment sometimes cause infinite loops.
+\begin{codehigh}
+\[\begin{cases}
+ a & \int_1^t
+\end{cases}\]
+\end{codehigh}
+  \item The \verb!\oiint! operators are not scaled to medium size.
+\begin{demohigh}
+\[\oiint_{\Sigma}xyzdS=\frac{\sqrt{3}}{120}\]
+\end{demohigh}
+\end{enumerate}
+
+\section{The \texttt{medmath} package}
+
+\makeatletter
+\mdm at activate@all
+\makeatother
+
+The \texttt{medmath} package started as a fork of \texttt{mediummath} code in \texttt{nccmath}
+package, aiming to provide more stable and flexible medium-size math commands.
+
+\begin{enumerate}
+  \item The big operators in superscripts and subscripts are in medium size.
+\begin{demohigh}
+\[A^{\sum_{0}^{1}x}=B\]
+\end{demohigh}
+  \item The definite integrals inside \texttt{cases} environment always work.
+\begin{demohigh}
+\[\begin{cases}
+ a & \int_1^t
+\end{cases}\]
+\end{demohigh}
+  \item The \verb!\oiint! operators are scaled to medium size.
+\begin{demohigh}
+\[\oiint_{\Sigma}xyzdS=\frac{\sqrt{3}}{120}\]
+\end{demohigh}
+\end{enumerate}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/medmath/medmath.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/medmath/medmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/medmath/medmath.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/medmath/medmath.sty	2024-01-17 16:30:43 UTC (rev 69466)
@@ -0,0 +1,469 @@
+% -*- coding: utf-8 -*-
+% ----------------------------------------------------------------------------
+% Author:  Jianrui Lyu <tolvjr at 163.com>
+% License: The LaTeX Project Public License 1.3c
+% ----------------------------------------------------------------------------
+% This package started as a fork of mediummath code of nccmath package,
+% aiming to provide more stable and flexible medium-size math commands.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{medmath}[2024-01-15 v2024D Better medium-size math commands]
+
+\RequirePackage{array}
+\RequirePackage{etoolbox}
+
+\newbool{mdm at bare}     \boolfalse{mdm at bare}    % don't define any public commands
+\newbool{mdm at base}     \boolfalse{mdm at base}    % define only basic public commands
+\newbool{mdm at amsfonts} \booltrue{mdm at amsfonts} % use ams symbol fonts
+
+\DeclareKeys{
+  bare         .if = mdm at bare,
+  base         .if = mdm at base,
+  all          .ifnot = mdm at base,
+  mdm at amsfonts .if = mdm at amsfonts
+}
+
+\ProcessKeyOptions
+
+\RequirePackage{amsmath}
+
+%%% --------------------------------------------------------
+%%> \section{Define medium-size math commands with base option}
+%%% --------------------------------------------------------
+
+%% The |\mdm at select@msize| command prepares dimensions for medium-size math:
+%% \begin{itemize}
+%% \item In |\mdm at fracrulewidth| --- a rule width in fractions;
+%% \item In |@tempdima| --- a raising value; and
+%% \item In |@tempdimb| --- a font size to be used in medium fractions
+%%       and matrices.
+%% \end{itemize}
+
+\newdimen\mdm at fracrulewidth
+\def\mdm at select@msize{\relax
+% |\@tempdima| contains the current font size
+  \@tempdima \f at size\p@
+% Calculate in |\@tempdimb| a text font size in medium fraction
+  \ifdim\@tempdima>11.5\p@
+    \@tempdimb .83\@tempdima
+  \else
+    \@tempdimb .8\@tempdima
+    \ifdim\@tempdimb<5\p@ \@tempdimb 5\p@\fi
+  \fi
+% Calculate in |\mdm at fracrulewidth| the rule width and in
+% |\@tempdima| --- the raising value
+  \mdm at fracrulewidth .04\@tempdima
+  \@tempdima 1.25\mdm at fracrulewidth
+  \ifdim\mdm at fracrulewidth>.45\p@ \else
+    \ifdim\mdm at fracrulewidth>.34\p@ \mdm at fracrulewidth .4\p@
+    \else \mdm at fracrulewidth .3\p@
+    \fi
+  \fi
+}
+
+%% The |\mdm at innerfrac|\marg{style} prepares a fraction with a
+%% special width in the given style:
+
+\def\mdm at innerfrac#1{\genfrac{}{}\mdm at fracrulewidth{#1}}
+
+%% Select a font by rounding its pt-size to the nearest integer
+%% and redefine fractions to have the given rule width. The |\binom|
+%% command is redefined also to its original value because it can be
+%% changed when the |mediummath| option is applied.
+
+\def\mdm at prepare@msize{%
+  \@tempdima 1.2\@tempdimb
+  \advance\@tempdimb .5\p@
+  \edef\@tempa{\strip at pt\@tempdimb}%
+  \expandafter\mdm at floor\expandafter\@tempa\@tempa.\@nil
+  \fontsize\@tempa\@tempdima\selectfont
+  \def\frac{\protect\mdm at innerfrac{}}%
+  \def\dfrac{\mdm at innerfrac\z@}%
+  \def\tfrac{\mdm at innerfrac\@ne}%
+  \def\binom{\protect\genfrac()\z@{}}%
+}
+\def\mdm at floor#1#2.#3\@nil{\def#1{#2}}
+
+%% Fix fractions and subfractions in superscripts/subscripts
+%% Always use current style size to typeset the fractions
+
+\newcommand{\mdm at larger@frac}[2]{%
+  \mathchoice{\genfrac{}{}{}{0}{#1}{#2}}{\genfrac{}{}{}{0}{#1}{#2}}%
+             {\genfrac{}{}{}{1}{#1}{#2}}{\genfrac{}{}{}{2}{#1}{#2}}%
+}
+\def\mdm at prepare@msize{%
+  \@tempdima 1.2\@tempdimb
+  \advance\@tempdimb .5\p@
+  \edef\@tempa{\strip at pt\@tempdimb}%
+  \expandafter\mdm at floor\expandafter\@tempa\@tempa.\@nil
+  \fontsize\@tempa\@tempdima\selectfont
+  \let\frac=\mdm at larger@frac
+  \def\dfrac{\mdm at innerfrac\z@}%
+  \def\tfrac{\mdm at innerfrac\@ne}%
+  \def\binom{\protect\genfrac()\z@{}}%
+}
+
+%% |\mdm at op@prepare|\marg{integral}
+%% command prepares an integral. It looks forward, extracts indices
+%% and limits-change commands, and puts the integral with required kerning
+%% of indices. The |\mdm at op@print| driver is a command to print the integral.
+%% Its default value is |\mdm at op@printm|. The driver uses the following hooks:
+%% |\mdm at op| contains an integral command, |\mdm at op@lim| contains
+%% the selected limits-style, |\mdm at op@sb| contains a subscript,
+%% |\mdm at op@sp| contains a superscript, |mdm at op@kern| contains the
+%% kerning value for medium-size integrals. If subscript or superscript
+%% is omitted, the corresponding hook is equal to |\relax|.
+
+\DeclareRobustCommand*\mdm at op@prepare[1]{%
+  \def\mdm at op{#1}%
+  \let\mdm at op@print\mdm at op@printm
+  \mdm at op@prepare@
+}
+\def\mdm at op@prepare@{%
+  \let\mdm at op@lim\ilimits@
+  \let\mdm at op@sp\relax
+  \let\mdm at op@sb\relax
+  \mdm at op@next
+}
+\def\mdm at op@next{\futurelet\@let at token\mdm at op@getnext}
+% Test the next token and get it if necessary:
+\def\mdm at op@getnext{%
+  \let\@tempa\mdm at op@skip
+  \ifx\@let at token\limits
+   \let\mdm at op@lim\limits \else
+    \ifx\@let at token\nolimits
+     \let\mdm at op@lim\nolimits \else
+      \ifx\@let at token\displaylimits
+       \let\mdm at op@lim\displaylimits \else
+        \ifx\@let at token\sp
+         \mdm at op@test\mdm at op@sp
+         \def\@tempa{\mdm at op@get\mdm at op@sp}\else
+          \ifx\@let at token\sb
+           \mdm at op@test\mdm at op@sb
+           \def\@tempa{\mdm at op@get\mdm at op@sb}\else
+            \ifx\@let at token\@sptoken
+             \let\@tempa\mdm at op@skipsp \else
+             \let\@tempa\mdm at op@print
+            \fi
+          \fi
+        \fi
+      \fi
+    \fi
+  \fi
+  \@tempa
+}
+% Skip |\limits|-like token:
+\def\mdm at op@skip#1{\mdm at op@next}
+% Skip a space token. A space token is skipped within |\@ifnextchar|
+% before comparing it with the first parameter. So, it does not important
+% what char to test for:
+\def\mdm at op@skipsp{%
+  \@ifnextchar0{\mdm at op@next}{\mdm at op@next}%
+}
+% Test subscript or superscript to be already defined:
+\def\mdm at op@test#1{%
+  \ifx#1\relax \else
+    \PackageError{nccmath}{Double index in math operator}{}
+  \fi
+}
+% Get a subscript or superscript:
+\def\mdm at op@get#1#2#3{\def#1{#3}\mdm at op@next}
+
+%% Driver for printing the medium-size integral with indices:
+
+\def\mdm at op@printm{%
+  \ifx\mdm at op@lim\nolimits \mdm at op@printm@\@ne \else
+    \ifx\mdm at op@lim\limits \mdm at op@printm@\z@ \else
+      \mathchoice{\displaystyle\mdm at op@printm@\z@}%
+                 {\textstyle\mdm at op@printm@\@ne}%
+                 {\scriptstyle\mdm at op@printm@\@ne}%
+                 {\scriptscriptstyle\mdm at op@printm@\@ne}%
+    \fi
+  \fi
+}
+\def\mdm at op@printm@{\mdm at op@print@\mdm at op\mdm at op@kern}
+
+%% Fix sizes of integral operators in superscripts/subscripts
+
+\newlength{\@mdm at em}
+\setlength{\@mdm at em}{1em}
+\ifmdm at amsfonts
+  \def\mdm at op@kern{0.5\@mdm at em}%
+\else
+  \def\mdm at op@kern{0.3\@mdm at em}%
+\fi
+\newcommand{\mdm at style@unit}[1]{%
+  \mathchoice{\setlength{\@mdm at em}{1em}#1}{\setlength{\@mdm at em}{1em}#1}
+             {\setlength{\@mdm at em}{0.5em}#1}{\setlength{\@mdm at em}{0.3em}#1}%
+}
+\let\mdm at saved@op at printm=\mdm at op@printm
+\def\mdm at op@printm{\mdm at style@unit{\mdm at saved@op at printm}}
+
+%% |\mdm at op@print@|\marg{integral}\marg{kern}\marg{level} command
+%% prints an \meta{integral} using the specified \meta{kern} in indices.
+%% If \meta{level} = 0 use |\limits| else use |\nolimits|.
+
+\def\mdm at op@print@#1#2#3{\mathop{#1}%
+  \setlength\@tempdima{#2}%
+  \@tempswatrue
+  \ifx\mdm at op@sb\relax \else \ifnum#3>\z@ \@tempswafalse \fi \fi
+  \ifx\mdm at op@sp\relax \else \ifnum#3>\z@ \@tempswafalse \fi \fi
+  \edef\@tempa{%
+    \ifnum#3=\z@ \noexpand\limits \else \noexpand\nolimits \fi
+    \ifx\mdm at op@sb\relax \else
+      \noexpand\sb{%
+        \ifnum#3=\z@ \kern -\@tempdima\else \kern -.8\@tempdima \fi
+        \noexpand\mdm at op@sb}%
+    \fi
+    \ifx\mdm at op@sp\relax \else
+      \noexpand\sp{\ifnum#3=\z@ \kern \@tempdima\fi
+        \noexpand\mdm at op@sp}%
+    \fi
+    \if at tempswa \kern -.2\@tempdima \fi
+  }%
+  \@tempa
+}
+
+%% The |\medmath|\marg{formula} prepares a medium-size formula
+%% in display style:
+
+\NewDocumentCommand\mdm at base@medmath{m}{\mdm at select@msize
+  \mathord{\raise\@tempdima\hbox{\mdm at prepare@msize
+    $\displaystyle#1$}}%
+}
+
+%% Fix sizes of non integral operators in superscripts/subscripts
+%% We use the method in scalerel package for saving math styles
+% big operator in normal text is 80% of the size of \displaystyle
+% big operator in script is 80% of the size of \textstyle
+% big operator in script script is 80% of the size of \scriptstyle
+
+\def\@mdm at style@D{\displaystyle}
+\def\@mdm at style@T{\displaystyle}
+\def\@mdm at style@S{\textstyle}
+\def\@mdm at style@s{\scriptstyle}
+\def\mdm at style@saved{\csname @mdm at style@\@mdm at style@switch\endcsname}
+\newcommand{\mdm at style@this}[1]{%
+  \mathchoice{\def\@mdm at style@switch{D}#1}{\def\@mdm at style@switch{T}#1}
+             {\def\@mdm at style@switch{S}#1}{\def\@mdm at style@switch{s}#1}%
+}
+\DeclareDocumentCommand\mdm at base@medmath{m}{\mdm at select@msize
+  \mathord{\mdm at style@this{\raise\@tempdima\hbox{\mdm at prepare@msize$\mdm at style@saved #1$}}}%
+}
+
+%% The |\medop|\marg{operator} prepares an operator in the medium size:
+
+\NewExpandableDocumentCommand\mdm at base@medop{m}{\DOTSB\mathop{\medmath{#1}}\slimits@}
+
+%% The |\medintcorr|\marg{length} specifies an italic correction
+%% for a medium integral:
+
+\NewExpandableDocumentCommand\mdm at base@medintcorr{m}{\def\mdm at op@kern{#1}}
+\mdm at base@medintcorr{0.5\@mdm at em}
+
+%% The |\medint|\marg{integral} command prepares a medium integral:
+
+\NewExpandableDocumentCommand\mdm at base@medint{m}{\DOTSI\mdm at op@prepare{\medmath{#1}}}
+
+%% The |\mfrac|\marg{numerator}\marg{denominator} prepares
+%% a medium-size fraction:
+
+\NewDocumentCommand\mdm at base@mfrac{mm}{\medmath{\frac{#1}{#2}}}
+
+%% The |\mbinom|\marg{numerator}\marg{denominator} prepares
+%% a medium-size binomial expression:
+
+\NewDocumentCommand\mdm at base@mbinom{mm}{%
+  \Bigl(\medmath{\genfrac{}{}{\z@}{}{#1}{#2}}\Bigr)%
+}
+
+%% The |medsize| environment is useful for preparing medium-size arrays:
+
+\NewDocumentEnvironment{mdm at base@medsize}{}{\mdm at select@msize
+  \mathord\bgroup
+    \raise\@tempdima\hbox\bgroup\mdm at prepare@msize
+      \arraycolsep .8\arraycolsep $}{$\egroup\egroup}
+
+%% The |mmatrix| environment prepares a medium-size matrix:
+
+\NewDocumentEnvironment{mdm at base@mmatrix}{}{\medsize\begin{matrix}}{\end{matrix}\endmedsize}
+
+%% Improve the |\MultiIntegral| kerning method on the base of
+%% |\mdm at op@prepare@| hook. The original method from |amsmath| works
+%% bad if a multi-integral is an argument of the |\medint| command.
+
+\NewDocumentCommand\mdm at base@MultiIntegral{m}{%
+  \edef\mdm at op{\noexpand\intop
+    \ifnum#1=\z@\noexpand\intdots@\else\noexpand\intkern@\fi
+    \ifnum#1>\tw@\noexpand\intop\noexpand\intkern@\fi
+    \ifnum#1>\thr@@\noexpand\intop\noexpand\intkern@\fi
+    \noexpand\intop
+  }%
+  \let\mdm at op@print\mdm at op@printd
+  \mdm at op@prepare@
+}
+\def\mdm at op@printd{%
+  \setlength\@tempdima{\mdm at op@kern}%
+  \ifx\mdm at op@lim\nolimits \@tempcnta\@ne \else
+    \ifx\mdm at op@lim\limits \@tempcnta\z@ \else
+      \@tempcnta\m at ne
+    \fi
+  \fi
+  \mathchoice{\mdm at op@printd@{\displaystyle}{1.2\@tempdima}}%
+             {\mdm at op@printd@{\textstyle}{.8\@tempdima}}%
+             {\mdm at op@printd@{\scriptstyle}{.8\@tempdima}}%
+             {\mdm at op@printd@{\scriptscriptstyle}{.8\@tempdima}}%
+}
+\def\mdm at op@printd@#1#2{#1%
+  \ifnum\@tempcnta>\m at ne
+    \mdm at op@print@{\hbox{$#1\mdm at op$}}{#2}\@tempcnta
+  \else
+    \ifx#1\displaystyle
+      \mdm at op@print@{\hbox{$#1\mdm at op$}}{#2}\z@
+    \else
+      \mdm at op@print@{\hbox{$#1\mdm at op$}}{#2}\@ne
+    \fi
+  \fi
+}
+
+%%% --------------------------------------------------------
+%%> \section{Redefine existing math commands with all option}
+%%% --------------------------------------------------------
+
+%% Redifine fractions and binoms.
+
+\NewDocumentCommand\mdm at all@frac{}{\mdm at op@select\mfrac{\genfrac{}{}{}{}}}
+\NewDocumentCommand\mdm at all@binom{}{\mdm at op@select\mbinom{\genfrac()\z@{}}}
+\def\mdm at op@select#1#2#3#4{%
+  \mathchoice{#1{#3}{#4}}{#1{#3}{#4}}%
+             {\scriptstyle#2{#3}{#4}}{\scriptscriptstyle#2{#3}{#4}}%
+}
+
+%% Fix fractions and subfractions in superscripts/subscripts
+%% Always use current style size to typeset the fractions
+
+\DeclareDocumentCommand\mdm at all@frac{mm}{%
+  \mathchoice{\mfrac{#1}{#2}}{\mfrac{#1}{#2}}%
+             {\mdm at larger@frac{#1}{#2}}{\mdm at larger@frac{#1}{#2}}%
+}
+
+%% Redefine all math operators except integrals:
+
+\NewDocumentCommand\mdm at redef@operators{mmm}{%
+  \ifx#2\@undefined \let#2#1\fi
+  \def#3{\DOTSB\medop{#2}}%
+}
+\mdm at redef@operators \coprod    \coprod@    \mdm at all@coprod
+\mdm at redef@operators \bigvee    \bigvee@    \mdm at all@bigvee
+\mdm at redef@operators \bigwedge  \bigwedge@  \mdm at all@bigwedge
+\mdm at redef@operators \biguplus  \biguplus@  \mdm at all@biguplus
+\mdm at redef@operators \bigcap    \bigcap@    \mdm at all@bigcap
+\mdm at redef@operators \bigcup    \bigcup@    \mdm at all@bigcup
+\mdm at redef@operators \prod      \prod@      \mdm at all@prod
+\mdm at redef@operators \sum       \sum@       \mdm at all@sum
+\mdm at redef@operators \bigotimes \bigotimes@ \mdm at all@bigotimes
+\mdm at redef@operators \bigoplus  \bigoplus@  \mdm at all@bigoplus
+\mdm at redef@operators \bigodot   \bigodot@   \mdm at all@bigodot
+\mdm at redef@operators \bigsqcup  \bigsqcup@  \mdm at all@bigsqcup
+
+%% Redefine integrals:
+
+\@ifundefined{NCC at op}{\let\mdm at op@int=\intop}{\let\mdm at op@int=\NCC at op@int}
+\NewDocumentCommand\mdm at all@intop{}{\mathop{\medmath{\mdm at op@int}}}
+\newcommand*\mdm at all@int{\DOTSI\mdm at op@prepare{\mdm at all@intop}}
+
+\@ifundefined{NCC at op}{\let\mdm at op@oint=\ointop}{\let\mdm at op@oint=\NCC at op@oint}
+\NewDocumentCommand\mdm at all@ointop{}{\mathop{\medmath{\mdm at op@oint}}}
+\newcommand*\mdm at all@oint{\DOTSI\mdm at op@prepare{\mdm at all@ointop}}
+
+%% Adjust \oiint operator.
+
+\ifdef{\oiint}{%
+  \let\mdm at op@oiint=\oiint
+  \NewDocumentCommand\mdm at all@oiintop{}{\mathop{\medmath{\mdm at op@oiint}}}%
+  \newcommand*\mdm at all@oiint{\DOTSI\mdm at op@prepare{\mdm at all@oiintop}}%
+}{}%
+
+%% Redefine multiple integrals:
+
+\NewDocumentCommand\mdm at all@MultiIntegral{m}{%
+  \edef\mdm at op{\noexpand\intop
+    \ifnum#1=\z@\noexpand\intdots@\else\noexpand\intkern@\fi
+    \ifnum#1>\tw@\noexpand\intop\noexpand\intkern@\fi
+    \ifnum#1>\thr@@\noexpand\intop\noexpand\intkern@\fi
+    \noexpand\intop
+  }%
+  \let\mdm at op@print\mdm at op@printm
+  \mdm at op@prepare@
+}
+\NewDocumentCommand\mdm at all@intkern@{}{\kern-\mdm at op@kern}
+\NewDocumentCommand\mdm at all@intdots@{}{\setlength\@tempdima{\mdm at op@kern}%
+  \kern-.4\@tempdima{\cdotp}\mkern1.5mu{\cdotp}%
+  \mkern1.5mu{\cdotp}\kern-.4\@tempdima}
+
+%% The definite integrals in cases environment may cause infinite loops
+%% Our redefinition moves \quad to the beginning of the second columns
+%% Therefore removing extra spaces when there is only one column in it
+
+\NewDocumentEnvironment{mdm at all@cases}{}{%
+  \left\{\linespread{1.0}\selectfont\def\arraystretch{1.2}%
+  \begin{array}{@{}l@{}>{\quad}l@{}}%
+}{%
+  \end{array}\right.%
+}
+
+%%% --------------------------------------------------------
+%%> \section{Activate definitions at the beginning of the document}
+%%% --------------------------------------------------------
+
+\NewDocumentCommand\mdm at activate@base{}{
+  \let \medmath       = \mdm at base@medmath
+  \let \medop         = \mdm at base@medop
+  \let \medintcorr    = \mdm at base@medintcorr
+  \let \medint        = \mdm at base@medint
+  \let \mfrac         = \mdm at base@mfrac
+  \let \mbinom        = \mdm at base@mbinom
+  \let \medsize       = \mdm at base@medsize
+  \let \endmedsize    = \endmdm at base@medsize
+  \let \mmatrix       = \mdm at base@mmatrix
+  \let \endmmatrix    = \endmdm at base@mmatrix
+  \let \MultiIntegral = \mdm at base@MultiIntegral
+}
+
+\NewDocumentCommand\mdm at activate@all{}{%
+  \mdm at activate@base
+  \let \frac          = \mdm at all@frac
+  \let \binom         = \mdm at all@binom
+  \let \coprod        = \mdm at all@coprod
+  \let \bigvee        = \mdm at all@bigvee
+  \let \bigwedge      = \mdm at all@bigwedge
+  \let \biguplus      = \mdm at all@biguplus
+  \let \bigcap        = \mdm at all@bigcap
+  \let \bigcup        = \mdm at all@bigcup
+  \let \prod          = \mdm at all@prod
+  \let \sum           = \mdm at all@sum
+  \let \bigotimes     = \mdm at all@bigotimes
+  \let \bigoplus      = \mdm at all@bigoplus
+  \let \bigodot       = \mdm at all@bigodot
+  \let \bigsqcup      = \mdm at all@bigsqcup
+  \let \intop         = \mdm at all@intop
+  \let \int           = \mdm at all@int
+  \let \ointop        = \mdm at all@ointop
+  \let \oint          = \mdm at all@oint
+  \ifdef{\oiint}{%
+    \let \oiintop     = \mdm at all@oiintop
+    \let \oiint       = \mdm at all@oiint
+  }{}%
+  \let \MultiIntegral = \mdm at all@MultiIntegral
+  \let \intkern@      = \mdm at all@intkern@
+  \let \intdots@      = \mdm at all@intdots@
+  \let \cases         = \mdm at all@cases
+  \let \endcases      = \endmdm at all@cases
+}
+
+\AtBeginDocument{%
+  \ifbool{mdm at bare}{}{%
+    \ifbool{mdm at base}{\mdm at activate@base}{\mdm at activate@all}%
+  }%
+}
+


Property changes on: trunk/Master/texmf-dist/tex/latex/medmath/medmath.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-01-17 00:43:34 UTC (rev 69465)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-01-17 16:30:43 UTC (rev 69466)
@@ -551,7 +551,7 @@
     matrix-skeleton mattens maybemath maze
     mcaption mceinleger mcexam mcf2graph mcite mciteplus mcmthesis
     mdframed mdputu mdsymbol mdwtools
-    mecaso media4svg media9 medstarbeamer
+    mecaso media4svg media9 medmath medstarbeamer
     meetingmins membranecomputing memdesign memexsupp
     memoir memoirchapterstyles memoize memory memorygraphs mendex-doc mentis
     mensa-tex menu menucard menukeys mercatormap merriweather

Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2024-01-17 00:43:34 UTC (rev 69465)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2024-01-17 16:30:43 UTC (rev 69466)
@@ -149,6 +149,7 @@
 depend matrix-skeleton
 depend mattens
 depend mecaso
+depend medmath
 depend membranecomputing
 depend memorygraphs
 depend messagepassing

Added: trunk/Master/tlpkg/tlpsrc/medmath.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.