Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide \DocumentMetadata{testphase={phase-II,math}}
add latex-lab-math.ltx holding math redefinitions update tests
- Loading branch information
1 parent
7078229
commit 024c564
Showing
19 changed files
with
200 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
% \iffalse meta-comment | ||
% | ||
%% File: latex-lab-math.dtx | ||
% Copyright (C) 2023 The LaTeX Project | ||
% | ||
% It may be distributed and/or modified under the conditions of the | ||
% LaTeX Project Public License (LPPL), either version 1.3c of this | ||
% license or (at your option) any later version. The latest version | ||
% of this license is in the file | ||
% | ||
% https://www.latex-project.org/lppl.txt | ||
% | ||
% | ||
% The development version of the bundle can be found below | ||
% | ||
% https://github.com/latex3/latex2e/required/latex-lab | ||
% | ||
% for those people who are interested or want to report an issue. | ||
% | ||
%<*driver> | ||
\documentclass{l3doc} | ||
\EnableCrossrefs | ||
\CodelineIndex | ||
\begin{document} | ||
\DocInput{latex-lab-math.dtx} | ||
\end{document} | ||
%</driver> | ||
% | ||
% \fi | ||
% | ||
% | ||
% \title{The \texttt{latex-lab-math} code\thanks{}} | ||
% \author{Ulrike Fischer, Frank Mittelbach, Joseph Wright \LaTeX{} Project} | ||
% | ||
% \maketitle | ||
% | ||
% \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}} | ||
% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}} | ||
% \providecommand\pkg[1]{\texttt{#1}} | ||
% | ||
% \begin{abstract} | ||
% \end{abstract} | ||
% | ||
% \section{Introduction} | ||
% | ||
% This code implements changes to commands and environments for math | ||
% from the kernel, \pkg{amsmath}, etc. | ||
% | ||
% | ||
% | ||
% | ||
% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex } | ||
% | ||
% | ||
% \section{The Implementation} | ||
% | ||
% \begin{macrocode} | ||
%<*code> | ||
% \end{macrocode} | ||
% | ||
% \subsection{File declaration} | ||
% \begin{macrocode} | ||
\ProvidesFile{latex-lab-math.ltx} | ||
[2023-01-07 v0.1a changes to math cmds and envs] | ||
% \end{macrocode} | ||
% | ||
% | ||
% \begin{macrocode} | ||
\ExplSyntaxOn | ||
% \end{macrocode} | ||
% | ||
% | ||
% \begin{macrocode} | ||
\AddToHook{package/amsmath/after}{% | ||
\def\intertext@{% | ||
\def\intertext##1{% | ||
\ifvmode\else\\\@empty\fi | ||
\noalign{% | ||
\penalty\postdisplaypenalty\vskip\belowdisplayskip | ||
\vbox{ | ||
%don't tag during measuring: | ||
\ifmeasuring@\tag_stop:\fi | ||
\normalbaselines | ||
\ifdim\linewidth=\columnwidth | ||
\else \parshape\@ne \@totalleftmargin \linewidth | ||
\fi | ||
% end previous mc | ||
\tag_mc_end_push: | ||
% change to span as we are in a par: | ||
\tagpdfsetup{paratag=Span}% | ||
\noindent\ignorespaces##1\par | ||
% restart MC | ||
\tag_mc_begin_pop:n{}}% | ||
\penalty\predisplaypenalty\vskip\abovedisplayskip% | ||
}% | ||
}} | ||
} | ||
% \end{macrocode} | ||
% | ||
% | ||
% The following is incomplete and only covers one case of \cs{shortintertext}: | ||
% \begin{macrocode} | ||
%\MHInternalSyntaxOn | ||
\AddToHook{package/mathtools/after}{% | ||
\def\MT_shortintertext:n #1{% | ||
\ifvmode\else\\\@empty\fi | ||
\noalign{% | ||
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip | ||
\vskip-\lineskiplimit | ||
\vskip\normallineskiplimit | ||
\vskip\l_MT_above_shortintertext_sep | ||
\vbox{% | ||
\ifmeasuring@\tag_stop:\fi | ||
\normalbaselines | ||
\MH_if_dim:w | ||
\MH_if_dim:w \@totalleftmargin=\z@ | ||
\linewidth | ||
\MH_else: | ||
-\maxdimen | ||
\MH_fi: | ||
=\columnwidth | ||
\MH_else: | ||
\parshape\@ne \@totalleftmargin \linewidth | ||
\MH_fi: | ||
% end previous mc | ||
\tag_mc_end_push: | ||
% change to span as we are in a par: | ||
\tagpdfsetup{paratag=Span}% | ||
\noindent\ignorespaces#1\par | ||
% restart MC | ||
\tag_mc_begin_pop:n{}% | ||
}% | ||
\penalty\predisplaypenalty\vskip\abovedisplayshortskip% | ||
\vskip-\lineskiplimit | ||
\vskip\normallineskiplimit | ||
\vskip\l_MT_below_shortintertext_sep | ||
}% | ||
} | ||
\MT_orig_shortintertext_false: %activate | ||
} | ||
%\MHInternalSyntaxOff | ||
% \end{macrocode} | ||
% | ||
% | ||
% \begin{macrocode} | ||
\AddToHook{package/breqn/after}{ | ||
\RegisterMathEnvironment{dmath} | ||
\RegisterMathEnvironment{dgroup*} | ||
} | ||
% \end{macrocode} | ||
% | ||
% Not sure why that was set in a test file, mistake? | ||
% \begin{macrocode} | ||
%\AddToHook{package/amsmath/after}{ | ||
% \RegisterMathEnvironment{smallmatrix} | ||
%} | ||
% \end{macrocode} | ||
% | ||
% \begin{macrocode} | ||
\AddToHook{package/cases/after}{ | ||
\RegisterMathEnvironment{subnumcases} | ||
} | ||
% \end{macrocode} | ||
% | ||
% \begin{macrocode} | ||
\ExplSyntaxOff | ||
%</code> | ||
% \end{macrocode} | ||
% | ||
% \Finale | ||
% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.