[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Gh901 (#902) (36610eb5)
GitHub
noreply at github.com
Tue Jul 26 12:52:36 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/36610eb57948e3b916cf312c4972d46480bb2448
>---------------------------------------------------------------
commit 36610eb57948e3b916cf312c4972d46480bb2448
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Tue Jul 26 12:52:36 2022 +0200
Gh901 (#902)
* fix for #901
* fixed some typos
* a leaner implementation by Phelype
* Minor fixes
Co-authored-by: PhelypeOleinik <phelype.oleinik at latex-project.org>
>---------------------------------------------------------------
36610eb57948e3b916cf312c4972d46480bb2448
base/doc/ltnews36.tex | 31 ++-
required/graphics/changes.txt | 6 +
required/graphics/mathcolor.dtx | 231 ++++++++++-----------
required/graphics/testfiles/github-0901.lvt | 58 ++++++
.../graphics/testfiles/github-0901.tlg | 3 +-
.../graphics/testfiles/mathcolor-03.luatex.tlg | 106 +++++++++-
required/graphics/testfiles/mathcolor-03.lvt | 4 +
required/graphics/testfiles/mathcolor-03.tlg | 101 ++++++++-
8 files changed, 410 insertions(+), 130 deletions(-)
diff --git a/base/doc/ltnews36.tex b/base/doc/ltnews36.tex
index df72bc1d..88f2b855 100644
--- a/base/doc/ltnews36.tex
+++ b/base/doc/ltnews36.tex
@@ -143,8 +143,11 @@
\section{Introduction}
+\emph{to be written}
+
\section{New or improved commands}
+
\section{Code improvements}
\subsection{Support for slanted small caps in the EC-fonts }
@@ -168,20 +171,36 @@ will give the expected result: {\fontfamily{cmr}
\subsection{EC sans serif at small sizes}
+
The EC (T1 encoded Computer Modern) sans serif fonts have errors at
-small sizes. (The medium weight is bolder and wider than the bold
-extended) The default \texttt{.fd} file has been adjusted to use a
-scaled 8pt font.
+small sizes: the medium weight is bolder and wider than the bold
+extended. This makes them unusable at these small sizes. The default
+\texttt{.fd} file has therefore been adjusted to use a scaled down 8pt
+font instead.
%
\githubissue{879}
\section{Bug fixes}
+
\section{Changes to packages in the \pkg{amsmath} category}
+
\section{Changes to packages in the \pkg{graphics} category}
+\subsection{Fix a \cs{mathcolor} bug}
+
+The \cs{mathcolor} command intorduced in \cite{36:ltnews35} needs to
+scan for following sub and superscripts, but if it did so at the end
+of an alignment cell, e.g., in a \texttt{array} environment, the
+\texttt{\&} was evaluated too early causing some internal errors. This
+is now properly guarded for.
+%
+\githubissue{901}
+
+
+
\section{Changes to packages in the \pkg{tools} category}
@@ -211,9 +230,9 @@ scaled 8pt font.
% \emph{\LaTeXe{} news 33}.\\
% \url{https://latex-project.org/news/latex2e-news/ltnews33.pdf}
-%\bibitem{36:ltnews34} \LaTeX{} Project Team:
-% \emph{\LaTeXe{} news 34}.\\
-% \url{https://latex-project.org/news/latex2e-news/ltnews34.pdf}
+\bibitem{36:ltnews35} \LaTeX{} Project Team:
+ \emph{\LaTeXe{} news 35}.\\
+ \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}
%
%\bibitem{36:ltfilehook-doc} Frank Mittelbach, Phelype Oleinik, \LaTeX{}~Project~Team:
% \emph{The \texttt{\upshape ltfilehook} documentation}.\\
diff --git a/required/graphics/changes.txt b/required/graphics/changes.txt
index 616f5623..313d3d42 100644
--- a/required/graphics/changes.txt
+++ b/required/graphics/changes.txt
@@ -8,6 +8,12 @@ are not part of the distribution.
All changes above are only part of the development branch for the next release.
================================================================================
+2022-07-25 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * mathcolor.dtx (section{The Implementation}):
+ Avoid ending an alignment cell prematurely when hitting an
+ & during scanning (gh/901)
+
#########################
# 2022-06-01 Release
#########################
diff --git a/required/graphics/mathcolor.dtx b/required/graphics/mathcolor.dtx
index 2341e71e..5dc482e3 100644
--- a/required/graphics/mathcolor.dtx
+++ b/required/graphics/mathcolor.dtx
@@ -14,8 +14,8 @@
%%% From File: mathcolor.dtx
%
% \begin{macrocode}
-\def\mathcolorversion{v1.0b}
-\def\mathcolordate{2022/01/28}
+\def\mathcolorversion{v1.0c}
+\def\mathcolordate{2022/07/25}
% \end{macrocode}
%<*driver>
\documentclass{l3doc}
@@ -39,9 +39,6 @@
%</driver>
%
% \fi
-
-
-
%
% \title{Providing color in math\thanks{This file has version
% \mathcolorversion\ dated \mathcolordate, \copyright\ \LaTeX\
@@ -124,7 +121,6 @@
% and achieve the same effect:
% \[ \mathcolor{red}{\int}\limits_0^1 \textrm{ or }
% \mathcolor{red}{\int\limits}_0^1 \]
-
%
%
% \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
@@ -163,7 +159,8 @@
% second argument (like \cs{textcolor}, but without spacing
% problems in math).
% \begin{macrocode}
-\DeclareDocumentCommand \mathcolor { o m m } {
+\DeclareDocumentCommand \mathcolor { o m m }
+ {
% \end{macrocode}
% The \cs{mathcolor} is only supported in math mode because in text
% mode it has problems scanning away a space after it, for example.
@@ -173,13 +170,13 @@
% math alphabets, but the message it gives is fine.
% \changes{v1.0b}{2022/01/28}{Restrict command to math mode}
% \begin{macrocode}
- \mode_if_math:F { \non at alpherr {\mathcolor\space} }
+ \mode_if_math:F { \non at alpherr {\mathcolor\space} }
% \end{macrocode}
% First real action is to save the current color value on a stack
% (needed if the command is nested or contains some further color
% changes with \cs{color} inside).
% \begin{macrocode}
- \seq_gpush:No \g_@@_seq \current at color
+ \seq_gpush:No \g_@@_seq \current at color
% \end{macrocode}
% Then we switch to the new color, but we do not want to reset the
% color after the group (which is done by \cs{color} using
@@ -189,7 +186,7 @@
% \cs{use_none:n} which gobbles the \cs{reset at color} added by
% \cs{color} with \cs{aftergroup}.
% \begin{macrocode}
- \group_insert_after:N \use_none:n
+ \group_insert_after:N \use_none:n
% \end{macrocode}
% Switching the color is also slightly suboptimal, because
% depending on whether or not we have a \meta{model} argument, we
@@ -197,11 +194,11 @@
% going low-level here is not an option as we need to support
% different color packages and their internals are not identical.
% \begin{macrocode}
- \IfValueTF{#1} { \color[#1]{#2} }{ \color{#2} }
+ \IfValueTF {#1} { \color[#1]{#2} } { \color{#2} }
% \end{macrocode}
% Then comes the math material we want to see colored:
% \begin{macrocode}
- #3
+ #3
% \end{macrocode}
% After that we need to reset the color ourselves (without a group
% that does it for us), i.e., popping the saved color from our
@@ -209,8 +206,8 @@
% separate command (which in fact needs to be called several times,
% so inlining the code wouldn't be possible.
% \begin{macrocode}
- \@@_scan_for_scripts:w
-}
+ \@@_scan_for_scripts:w
+ }
% \end{macrocode}
% \end{macro}
%
@@ -223,29 +220,57 @@
% \cs{mathop} in which case the sub and superscripts may be
% attached as \cs{limits} instead of after the material. All cases
% need separate treatment.
+% And we need to watch out for an upcoming \verb=&= and avoid
+% prematurely triggering the end of an alignment cell.
+% \changes{v1.0c}{2022/07/25}{Avoid ending an alignment cell
+% prematurely when hitting an \texttt{\&} during
+% scanning (gh/901)}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_scan_for_scripts:w {
+\cs_new_protected:Npn \@@_scan_for_scripts:w
+ {
% \end{macrocode}
-% We therefore first parse for a \cs{c_math_subscript_token}
-% ignoring (dropping) any spaces and \cs{relax} as \TeX{} would
-% do. We do this with expansion so that hidden sub or superscripts
+% We need to look at what follows \cs{mathcolor}, and we need to do
+% that ignoring (and dropping) any spaces and \cs{relax} as \TeX{}
+% would do in normal math processing (for example before a subscript
+% token). We do this with expansion so that hidden sub or superscripts
% in macros are still found as long as the macros are expandable.
% \begin{macrocode}
- \@@_peek_catcode_ignore_filler_expand:NTF \c_math_subscript_token
-% \end{macrocode}
-% If we found that character we call a function that handles sub or
-% superscripts.
-% \begin{macrocode}
- { \@@_handle_scripts:Nw }
-% \end{macrocode}
-% Otherwise check if this token we peeked at (which is now stored
-% in \cs{l_peek_token} is a superscript token.
-% \begin{macrocode}
- { \token_if_math_superscript:NTF \l_peek_token
-% \end{macrocode}
-% If found we call the sub/superscript handler.
-% \begin{macrocode}
- { \@@_handle_scripts:Nw }
+ \peek_remove_filler:n
+ {
+% \end{macrocode}
+% To avoid problems hitting on \verb=&= we start with a
+% \cs{group_align_safe_begin:}. That has to be ended with
+% \cs{group_align_safe_end:} when the
+% danger (aka scanning) is over, which, due to the branching below, happens at
+% four different points, i.e., when the \cs{mathcolor} is
+% \begin{enumerate}
+% \item
+% followed by a \enquote{normal} token;
+% \item
+% followed by a braced sub/superscript;
+% \item
+% followed by an unbraced sub/superscript;
+% \item
+% followed by one of the \cs{limits} primitives.
+% \end{enumerate}
+% In each case we have to end the align safe group and we mark the
+% points below in the code for easy reference.
+% \begin{macrocode}
+ \group_align_safe_begin:
+% \end{macrocode}
+% We first parse for \cs{c_math_subscript_token} or
+% \cs{c_math_superscript_token}.
+% After \cs{peek_remove_filler:n} is done, it sets \cs{l_peek_token}
+% equal to the next non-filler token, so we can avoid unnecessary
+% work and just compare that. If either of the tokens is found, call
+% \cs{@@_handle_scripts:Nw}:
+% \begin{macrocode}
+ \token_case_catcode:NnTF \l_peek_token
+ {
+ \c_math_subscript_token { }
+ \c_math_superscript_token { }
+ }
+ { \@@_handle_scripts:Nw }
% \end{macrocode}
% Otherwise we check if it was any of the limit operation
% primitives. If that is the case, e.g., if we have a situation
@@ -256,45 +281,59 @@
% we have to move it directly after the \cs{int} to ensure there
% is no color reset between the operator and the \cs{limits} command.
% \begin{macrocode}
- { \token_case_meaning:NnTF \l_peek_token
{
- \limits { \limits }
- \nolimits { \nolimits }
- \displaylimits { \displaylimits }
- }
+ \token_case_meaning:NnTF \l_peek_token
+ {
+ \limits { \limits }
+ \nolimits { \nolimits }
+ \displaylimits { \displaylimits }
+ }
% \end{macrocode}
% Once that is done, we have to get rid of the token we peeked at
% and then restart scanning for sub or superscripts. Given that
% \cs{@@_scan_for_scripts:w} expands while scanning the simplest
-% solution is to add \cs{use_none:n} in front of the peeked at token.
+% solution is to add \cs{use_none:n} in front of the peeked at
+% token.
+%
+% Here we end the align safe group and
+% \cs{@@_scan_for_scripts:w} will start a new one.
% \begin{macrocode}
- { \@@_scan_for_scripts:w \use_none:n }
+ {
+ \group_align_safe_end: % case 4
+ \@@_scan_for_scripts:w \use_none:n
+ }
% \end{macrocode}
-% If it was one of these we look for a \texttt{'} and if found remove it and
+% If it was not one of these we look for a \texttt{'} and if found remove it and
% replace it by its expansion. The reason we have to do this (and
% not rely on the earlier peeking to expand for us is the fact
% that \texttt{'} is only ``math active'' and that doesn't expand
% under \cs{expanded} or \cs{expandafter}.
% \begin{macrocode}
- { \peek_meaning_remove:NTF '
- { \@@_handle_scripts:Nw ^\c_group_begin_token \prim at s }
+ {
+ \token_if_eq_meaning:NNTF \l_peek_token '
+ {
+ \@@_handle_scripts:Nw ^
+ \c_group_begin_token
+ \exp_after:wN \prim at s \use_none:n
+ }
% \end{macrocode}
% If it is anything else we finish off which means we reset the
% color (because we prevented that before to happen automatically
% after the next group) and pop the color stack setting \cs{current at color}.
% \begin{macrocode}
- { \reset at color
- \seq_gpop:NN \g_@@_seq \current at color
- }
+ {
+ \group_align_safe_end: % case 1
+ \reset at color
+ \seq_gpop:NN \g_@@_seq \current at color
+ }
+ }
}
}
- }
-}
+ }
% \end{macrocode}
% \end{macro}
-
-
-
+%
+%
% \begin{macro}{\@@_handle_scripts:Nw}
% The tricky part of handling sub and superscripts is that we have
% to reset color to the one that is on the stack but reset it back
@@ -306,7 +345,8 @@
% sign, and superscript. So technically the superscript comes first
% and the \cs{sum} that should get colored red is the middle.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_handle_scripts:Nw #1 {
+\cs_new_protected:Npn \@@_handle_scripts:Nw #1
+ {
% \end{macrocode}
% The argument is either \verb=^= or \verb=_=, so we execute it and
% explicitly open two \verb={= groups. We need two because color
@@ -329,7 +369,7 @@
%\begin{verbatim}
% \reset at color } \@@_scan_for_scripts:w
%\end{verbatim}
-% The \cs{_@@_scan_for_scripts:w} then retakes control and initiates
+% The \cs{@@_scan_for_scripts:w} then retakes control and initiates
% parsing for another sub or superscript.
% \begin{macrocode}
\group_insert_after:N \c_group_end_token
@@ -341,76 +381,28 @@
% already supplied the outer one already. In that case we drop
% it. Otherwise we have an unbraced single token sub or superscript
% which means we are missing a closing \verb=}= at the end and need
-% to account for that: this is done in \cs{_@@_handle_unbraced_script:N}.
-% \begin{macrocode}
- \@@_peek_catcode_ignore_filler_expand:NTF \c_group_begin_token
- { \peek_catcode_remove:NT \c_group_begin_token { } }
- { \@@_handle_unbraced_script:N }
- }% \end{macrocode}
-% \end{macro}
-
-
-% \begin{macro}{\@@_handle_unbraced_script:N}
-% All we have to do here is to add the final closing brace.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_handle_unbraced_script:N #1 {
- #1 \c_group_end_token }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \subsection{Utility function for the peek module}
-%
-% This peek is expanding and ignores spaces and \cs{relax} (even
-% though the name doesn't say so)
-% but \cs{relax} is usually allowed in such places where we so it
-% may not be bad to have it in this way in general --- maybe this
-% should move to expl3 peek functions (or otherwise the naming
-% should perhaps be adjusted).
-%
-%
-% \begin{macrocode}
-\tl_new:N \l_@@_peek_tmp_tl
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_peek_catcode_ignore_filler_expand:NTF #1#2#3
- {
- \tl_set:Nn \l_@@_peek_tmp_tl
- { \token_if_eq_catcode:NNTF \l_peek_token #1 {#2} {#3} }
- \@@_peek_expand:w
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_peek_expand:w
- {
- \exp_after:wN \peek_catcode_remove:NTF
- \exp_after:wN \c_space_token
- \exp_after:wN \@@_peek_test_expand:w
- \exp_after:wN \@@_peek_test_relax:w
- \exp:w \exp_end_continue_f:w
- }
-% \end{macrocode}
+% to account for that: this is done in false branch by
+% \cs{use_ii_i:nn}.
%
+% After scanning for a brace all scanning is done, so here are the
+% other two points where we have to end the align safe group (in
+% the true and false case).
% \begin{macrocode}
-\cs_new_protected:Npn \@@_peek_test_expand:w
- {
- \token_if_expandable:NTF \l_peek_token
- { \@@_peek_expand:w }
- { \l_@@_peek_tmp_tl }
+ \peek_remove_filler:n
+ {
+ \token_if_eq_meaning:NNTF \l_peek_token \c_group_begin_token
+ {
+ \group_align_safe_end: % case 2
+ \peek_catcode_remove:NT \c_group_begin_token { }
+ }
+ {
+ \exp_after:wN \group_align_safe_end: % case 3
+ \use_ii_i:nn \c_group_end_token
+ }
+ }
}
% \end{macrocode}
-%
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_peek_test_relax:w
- {
- \peek_meaning_remove:NTF \scan_stop:
- { \@@_peek_expand:w }
- { \@@_peek_test_expand:w }
- }
-% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
%<@@=>
@@ -424,7 +416,6 @@
% \Finale
%
%
-
%%%%%%%%%%%%%%%%
\endinput
%%%%%%%%%%%%%%%%
diff --git a/required/graphics/testfiles/github-0901.lvt b/required/graphics/testfiles/github-0901.lvt
new file mode 100644
index 00000000..f2201f68
--- /dev/null
+++ b/required/graphics/testfiles/github-0901.lvt
@@ -0,0 +1,58 @@
+
+\documentclass{article}
+
+\input{test2e}
+
+\usepackage{color}
+
+
+\begin{document}
+
+\START
+
+% scanning ahead should not raise parsing errors when hitting an &
+% not should avoiding this generate failures.
+
+\typeout{this test should not generate any errors}
+
+\[
+\begin{array}{ccc}
+ a\mathcolor{red}{1}& b
+\end{array}
+\]
+
+\[
+\begin{array}{ccc}
+ a\mathcolor{red}{2} & b \\ bad case
+\end{array}
+\]
+
+\[
+\begin{array}{ccc}
+ a\mathcolor{red}{3}^x& b \\ ?? case
+\end{array}
+\]
+
+\[
+\begin{array}{ccc}
+ a\mathcolor{red}{4}_x & b \\ ?? case
+\end{array}
+\]
+
+\[
+\begin{array}{ccc}
+ a\mathcolor{red}{5} _x & b \\ ?? case
+\end{array}
+\]
+
+\[
+\begin{array}{ccc}
+ a\mathcolor{red}{6} _x^z & b \\ ?? case
+\end{array}
+\]
+
+\END
+
+
+
+
diff --git a/base/testfiles/tlb2049.tlg b/required/graphics/testfiles/github-0901.tlg
similarity index 88%
copy from base/testfiles/tlb2049.tlg
copy to required/graphics/testfiles/github-0901.tlg
index f2680325..f6046953 100644
--- a/base/testfiles/tlb2049.tlg
+++ b/required/graphics/testfiles/github-0901.tlg
@@ -1,8 +1,7 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
+this test should not generate any errors
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
-[1
-] (tlb2049.aux)
diff --git a/required/graphics/testfiles/mathcolor-03.luatex.tlg b/required/graphics/testfiles/mathcolor-03.luatex.tlg
index 8948496a..374d007c 100644
--- a/required/graphics/testfiles/mathcolor-03.luatex.tlg
+++ b/required/graphics/testfiles/mathcolor-03.luatex.tlg
@@ -16,7 +16,7 @@ Completed box being shipped out [1]
....\special{color pop}
..\glue 25.0
..\glue(\lineskip) 0.0
-..\vbox(550.0+0.0)x345.0, glue set 487.03665fil, direction TLT
+..\vbox(550.0+0.0)x345.0, glue set 445.2078fil, direction TLT
...\write-{}
...\glue(\topskip) 10.0
...\hbox(0.0+0.0)x345.0, glue set 122.9979fil, direction TLT
@@ -120,6 +120,110 @@ Completed box being shipped out [1]
....\OT1/cmr/m/n/10 =
...\penalty 0
...\glue(\belowdisplayskip) 10.0 plus 2.0 minus 5.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\hbox(0.0+0.0)x345.0, glue set 122.9979fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\hbox(0.0+0.0)x207.0021, glue set 103.50105fil, direction TLT
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\penalty 10000
+...\glue(\abovedisplayskip) 10.0 plus 2.0 minus 5.0
+...\glue(\lineskip) 1.0
+...\hbox(13.83333+7.0)x128.97316, shifted 108.01343, direction TLT
+....\OML/cmm/m/it/10 B
+....\kern0.50172 (italic)
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OT1/cmr/m/n/10 =
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\hbox(1.0+15.00012)x14.44447, shifted -9.50006, direction TLT
+.....\OMX/cmex/m/n/5 X
+....\vbox(17.0418+0.0)x5.44333, shifted 6.00005, direction TLT
+.....\hbox(3.01389+0.0)x4.60768, direction TLT
+......\OML/cmm/m/it/7 z
+.....\kern11.01402 (font)
+.....\hbox(3.01389+0.0)x5.44333, direction TLT
+......\OML/cmm/m/it/7 n
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OT1/cmr/m/n/10 =
+....\special{color push rgb 1 0 0}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\hbox(1.0+15.00012)x14.44447, shifted -9.50006, direction TLT
+.....\OMX/cmex/m/n/5 X
+....\vbox(17.0418+0.0)x5.44333, shifted 6.00005, direction TLT
+.....\hbox(3.01389+0.0)x4.60768, direction TLT
+......\hbox(3.01389+0.0)x4.10768, direction TLT
+.......\special{color push Black}
+.......\OML/cmm/m/it/7 z
+.......\kern0.28703 (italic)
+......\special{color pop}
+.....\kern11.01402 (font)
+.....\hbox(3.01389+0.0)x5.44333, direction TLT
+......\hbox(3.01389+0.0)x4.94333, direction TLT
+.......\special{color push Black}
+.......\OML/cmm/m/it/7 n
+......\special{color pop}
+....\special{color pop}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OML/cmm/m/it/10 <
+....\special{color push rgb 1 0 0}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\vbox(13.83333+7.0)x13.88893, direction TLT
+.....\kern1.0 (font)
+.....\hbox(3.8889+0.0)x13.88893, glue set 4.63892fil, direction TLT
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\hbox(3.8889+0.0)x4.61111, direction TLT
+.......\special{color push Black}
+.......\OMS/cmsy/m/n/7 0
+.......\OMS/cmsy/m/n/7 0
+......\special{color pop}
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.99998 (font)
+.....\hbox(6.94444+0.0)x13.88893, direction TLT
+......\OT1/cmr/m/n/10 l
+......\OT1/cmr/m/n/10 i
+......\OT1/cmr/m/n/10 m
+.....\kern2.98611 (font)
+.....\hbox(3.01389+0.0)x13.88893, glue set 4.67711fil, direction TLT
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\hbox(3.01389+0.0)x4.53473, direction TLT
+.......\special{color push Black}
+.......\OML/cmm/m/it/7 x
+......\special{color pop}
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.0 (font)
+....\special{color pop}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OT1/cmr/m/n/10 =
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\vbox(13.83333+7.0)x13.88893, direction TLT
+.....\kern1.0 (font)
+.....\hbox(3.8889+0.0)x13.88893, glue set 4.63892fil, direction TLT
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\OMS/cmsy/m/n/7 0
+......\OMS/cmsy/m/n/7 0
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.99998 (font)
+.....\hbox(6.94444+0.0)x13.88893, direction TLT
+......\OT1/cmr/m/n/10 l
+......\OT1/cmr/m/n/10 i
+......\OT1/cmr/m/n/10 m
+.....\kern2.98611 (font)
+.....\hbox(3.01389+0.0)x13.88893, glue set 4.67711fil, direction TLT
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\OML/cmm/m/it/7 x
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.0 (font)
+...\penalty 0
+...\glue(\belowdisplayskip) 10.0 plus 2.0 minus 5.0
...\glue -5.0
...\glue 0.0 plus 1.0fil
...\glue 0.0
diff --git a/required/graphics/testfiles/mathcolor-03.lvt b/required/graphics/testfiles/mathcolor-03.lvt
index bc96a13c..591f72d0 100644
--- a/required/graphics/testfiles/mathcolor-03.lvt
+++ b/required/graphics/testfiles/mathcolor-03.lvt
@@ -18,7 +18,11 @@ A= \mathcolor{red}{\int}\limits_1^2 x =
\mathcolor{red}{\sum}\displaylimits_1^2 x =
\]
+\newcommand\hiddenstuff{\nolimits_n^z}
+\[
+B= \sum\hiddenstuff = \mathcolor{red}{\sum}\hiddenstuff < \mathcolor{red}{\lim}_x'' = \lim_x''
+\]
\newpage
diff --git a/required/graphics/testfiles/mathcolor-03.tlg b/required/graphics/testfiles/mathcolor-03.tlg
index 22f2f90b..564046af 100644
--- a/required/graphics/testfiles/mathcolor-03.tlg
+++ b/required/graphics/testfiles/mathcolor-03.tlg
@@ -16,7 +16,7 @@ Completed box being shipped out [1]
....\special{color pop}
..\glue 25.0
..\glue(\lineskip) 0.0
-..\vbox(550.0+0.0)x345.0, glue set 487.03667fil
+..\vbox(550.0+0.0)x345.0, glue set 445.20781fil
...\write-{}
...\glue(\topskip) 10.0
...\hbox(0.0+0.0)x345.0, glue set 122.9979fil
@@ -115,6 +115,105 @@ Completed box being shipped out [1]
....\OT1/cmr/m/n/10 =
...\penalty 0
...\glue(\belowdisplayskip) 10.0 plus 2.0 minus 5.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\hbox(0.0+0.0)x345.0, glue set 122.9979fil
+....\hbox(0.0+0.0)x15.0
+....\hbox(0.0+0.0)x207.0021, glue set 103.50105fil
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\penalty 10000
+...\glue(\abovedisplayskip) 10.0 plus 2.0 minus 5.0
+...\glue(\lineskip) 1.0
+...\hbox(13.83333+7.0)x128.97316, shifted 108.01343, display
+....\OML/cmm/m/it/10 B
+....\kern0.50172
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OT1/cmr/m/n/10 =
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\hbox(1.0+15.00012)x14.44447, shifted -9.50006
+.....\OMX/cmex/m/n/5 X
+....\vbox(17.0418+0.0)x5.44333, shifted 6.00005
+.....\hbox(3.01389+0.0)x4.60768
+......\OML/cmm/m/it/7 z
+.....\kern11.01402
+.....\hbox(3.01389+0.0)x5.44333
+......\OML/cmm/m/it/7 n
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OT1/cmr/m/n/10 =
+....\special{color push rgb 1 0 0}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\hbox(1.0+15.00012)x14.44447, shifted -9.50006
+.....\OMX/cmex/m/n/5 X
+....\vbox(17.0418+0.0)x5.44333, shifted 6.00005
+.....\hbox(3.01389+0.0)x4.60768
+......\hbox(3.01389+0.0)x4.10768
+.......\special{color push Black}
+.......\OML/cmm/m/it/7 z
+.......\kern0.28703
+......\special{color pop}
+.....\kern11.01402
+.....\hbox(3.01389+0.0)x5.44333
+......\hbox(3.01389+0.0)x4.94333
+.......\special{color push Black}
+.......\OML/cmm/m/it/7 n
+......\special{color pop}
+....\special{color pop}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OML/cmm/m/it/10 <
+....\special{color push rgb 1 0 0}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\vbox(13.83333+7.0)x13.88893
+.....\kern1.0
+.....\hbox(3.8889+0.0)x13.88893, glue set 4.63892fil
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\hbox(3.8889+0.0)x4.61111
+.......\special{color push Black}
+.......\OMS/cmsy/m/n/7 0
+.......\OMS/cmsy/m/n/7 0
+......\special{color pop}
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.99998
+.....\hbox(6.94444+0.0)x13.88893
+......\OT1/cmr/m/n/10 l
+......\OT1/cmr/m/n/10 i
+......\OT1/cmr/m/n/10 m
+.....\kern2.98611
+.....\hbox(3.01389+0.0)x13.88893, glue set 4.67711fil
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\hbox(3.01389+0.0)x4.53473
+.......\special{color push Black}
+.......\OML/cmm/m/it/7 x
+......\special{color pop}
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.0
+....\special{color pop}
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OT1/cmr/m/n/10 =
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\vbox(13.83333+7.0)x13.88893
+.....\kern1.0
+.....\hbox(3.8889+0.0)x13.88893, glue set 4.63892fil
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\OMS/cmsy/m/n/7 0
+......\OMS/cmsy/m/n/7 0
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.99998
+.....\hbox(6.94444+0.0)x13.88893
+......\OT1/cmr/m/n/10 l
+......\OT1/cmr/m/n/10 i
+......\OT1/cmr/m/n/10 m
+.....\kern2.98611
+.....\hbox(3.01389+0.0)x13.88893, glue set 4.67711fil
+......\glue 0.0 plus 1.0fil minus 1.0fil
+......\OML/cmm/m/it/7 x
+......\glue 0.0 plus 1.0fil minus 1.0fil
+.....\kern1.0
+...\penalty 0
+...\glue(\belowdisplayskip) 10.0 plus 2.0 minus 5.0
...\glue -5.0
...\glue 0.0 plus 1.0fil
...\glue 0.0
More information about the latex3-commits
mailing list.