[latex3-commits] [latex3/latex2e] develop: reinsert below display skip correctly, issue tagging-11 (90ae7b18)
github at latex-project.org
github at latex-project.org
Tue Sep 12 15:34:57 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/90ae7b18ab188ae510102cf5535044dab12f3d0c
>---------------------------------------------------------------
commit 90ae7b18ab188ae510102cf5535044dab12f3d0c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Sep 11 15:28:30 2023 +0200
reinsert below display skip correctly, issue tagging-11
>---------------------------------------------------------------
90ae7b18ab188ae510102cf5535044dab12f3d0c
required/latex-lab/latex-lab-math.dtx | 18 ++++++++++++++--
.../latex-lab/testfiles-math/mathcapture-008.tlg | 4 ++--
required/latex-lab/testfiles-math/mtag-tlc3.tlg | 24 +++++++++++-----------
3 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index c36bd7e0..0078d0db 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -369,12 +369,15 @@
\l_@@_tmpa_skip \lastskip
\@kernel at math@end
\penalty \postdisplaypenalty
- \skip_vertical:n { -\l_@@_tmpa_skip }
+% \end{macrocode}
+% This reinserts the below display skips. It must be doubled to
+% get the right amount:
+% \begin{macrocode}
+ \skip_vertical:n { -2\l_@@_tmpa_skip }
%
\@doendpe % this has no \end{...} to take care of it
}
-
% \end{macrocode}
% \end{macro}
%
@@ -814,12 +817,23 @@
\@@_grab_dollar:w
}
}
+
\exp_args:No \tex_everydisplay:D
{
\tex_the:D \tex_everydisplay:D
\iftrue % this may have to be a settable flag!
% {
% \typeout{==>~ in~ everydisplay}
+% \end{macrocode}
+% flipping the \cs{belowdisplay} values is done so that we get (assumption)
+% a negative skip and not make the page bigger then we take that out,
+% then we add the tagging code (in \cs{@@_tag_dollardollar_display_end} ) and
+% then we put a real \cs{postdisplaypenalty} in and
+% the right skip (of which we don't know if it is short or a
+% normal \cs{belowdisplayskip}). This might need some refinement if that skip
+% is actually negative from the start
+% (not sure it ever is and is worth bothering about)
+% \begin{macrocode}
\skip_set:Nn \belowdisplayskip {-\belowdisplayskip}
\skip_set:Nn \belowdisplayshortskip {-\belowdisplayshortskip}
\int_set:Nn \postdisplaypenalty {10000}
diff --git a/required/latex-lab/testfiles-math/mathcapture-008.tlg b/required/latex-lab/testfiles-math/mathcapture-008.tlg
index b3f677f1..4cf1046a 100644
--- a/required/latex-lab/testfiles-math/mathcapture-008.tlg
+++ b/required/latex-lab/testfiles-math/mathcapture-008.tlg
@@ -98,6 +98,8 @@ Math env multline
====>tmpmathcontent=macro:-> \text {Last line of the multline}
====>result=macro:-> \text {Last line of the multline}
====>tmpmathcontent=macro:->
+[1
+]
==> flattened=false on input line ...
==> Structure-end text-unit after displayblock on input line ...
==> @endpe=false on input line ...
@@ -110,8 +112,6 @@ Math env multline
====>formula has subparts
====>result=macro:-> = \sum _{t \notin \mathbf {T}} \int _t^a \biggl \lbrace g(y)^2 \int _t^a f(x)^2 \,dx \biggr \rbrace \,dy
====>tmpmathcontent=macro:->
-[1
-]
==> flattened=false on input line ...
==> Structure-end text-unit after displayblock on input line ...
==> @endpe=false on input line ...
diff --git a/required/latex-lab/testfiles-math/mtag-tlc3.tlg b/required/latex-lab/testfiles-math/mtag-tlc3.tlg
index fd4665c2..3da990b6 100644
--- a/required/latex-lab/testfiles-math/mtag-tlc3.tlg
+++ b/required/latex-lab/testfiles-math/mtag-tlc3.tlg
@@ -41,6 +41,8 @@ Math env align
====>tmpmathcontent=macro:-> &= a^3 + 3a^2b + 3ab^2 + b^3
====>result=macro:-> &= a^3 + 3a^2b + 3ab^2 + b^3
====>tmpmathcontent=macro:->
+[1
+]
-----------------------------------
Math env align
x^2 + y^2 & = 1 \\ x & = \sqrt {1-y^2}
@@ -49,8 +51,6 @@ x^2 + y^2 & = 1 \\ x & = \sqrt {1-y^2}
====>formula has subparts
====>result=macro:-> x & = \sqrt {1-y^2}
====>tmpmathcontent=macro:->
-[1
-]
-----------------------------------
Math env align
\text {Compare } x^2 + y^2 &= 1 & x^3 + y^3 &= 1 \\ x &= \sqrt {1-y^2} & x &= \sqrt [3]{1-y^3}
@@ -99,6 +99,7 @@ Math env equation*
====>first-result=macro:->\begin {rcases} \bm {B}' &=-c\nabla \times \bm {E} \\ \bm {E}' &=c\nabla \times \bm {B} - 4\pi \bm {J}\, \end {rcases} \quad \text {Maxwell's equations}
====>first-tmpmathcontent=macro:->
====>formula has no subparts
+[2]
-----------------------------------
Math env equation
\begin {aligned} V_j &= v_j & X_i &= x_i - q_i x_j & &= u_j + \sum _{i\ne j} q_i \\ V_i &= v_i - q_i v_j & X_j &= x_j & U_i &= u_i \end {aligned}
@@ -111,7 +112,6 @@ A_1 &= N_0 (\lambda ; \Omega ') - \phi ( \lambda ; \Omega ') \\ A_2 &= \phi (\la
====>first-result=macro:->A_1 &= N_0 (\lambda ; \Omega ') - \phi ( \lambda ; \Omega ')
====>first-tmpmathcontent=macro:-> A_2 &= \phi (\lambda ; \Omega ') \phi (\lambda ; \Omega ) \\ \intertext {and finally} A_3 &= \mathcal {N} (\lambda ; \omega )
====>formula has subparts
-[2]
====>result=macro:-> A_2 &= \phi (\lambda ; \Omega ') \phi (\lambda ; \Omega )
====>tmpmathcontent=macro:-> \intertext {and finally} A_3 &= \mathcal {N} (\lambda ; \omega )
====>result=macro:-> \intertext {and finally} A_3 &= \mathcal {N} (\lambda ; \omega )
@@ -159,6 +159,7 @@ f &= g \label {eq:2A} \\ f' &= g' \label {eq:2B} \\ \mathcal {L}f &= \mathcal {L
====>first-result=macro:->f &= g \label {eq:2A}
====>first-tmpmathcontent=macro:-> f' &= g' \label {eq:2B} \\ \mathcal {L}f &= \mathcal {L}g + K \label {eq:2C}
====>formula has subparts
+[3]
====>result=macro:-> f' &= g' \label {eq:2B}
====>tmpmathcontent=macro:-> \mathcal {L}f &= \mathcal {L}g + K \label {eq:2C}
====>result=macro:-> \mathcal {L}f &= \mathcal {L}g + K \label {eq:2C}
@@ -179,7 +180,6 @@ Math env equation
====>first-result=macro:->\begin {split} \lvert I_2 \rvert &= \left \lvert \int _{0}^T \psi (t) \left \{ u(a, t) - \int _{\gamma (t)}^a \frac {d\theta }{k} (\theta , t) \int _{a}^\theta c (\xi ) u_t (\xi , t) \,d\xi \right \} dt \right \rvert \\ &\le C_6 \Biggl \lvert \left \lvert f \int _\Omega \left \lvert \widetilde {S}^{-1,0}_{a,-} W_2(\Omega , \Gamma _l) \right \rvert \ \right \rvert \left \lvert \lvert u \rvert \overset {\circ }{\to } W_2^{\widetilde {A}} (\Omega ; \Gamma _r,T) \right \rvert \Biggr \rvert \end {split}
====>first-tmpmathcontent=macro:->
====>formula has no subparts
-[3]
Overfull \hbox (27.91791pt too wide) detected at line 227
[]
\hbox(8.39996+3.60004)x241.49895
@@ -222,6 +222,7 @@ Math env multline
====>formula has subparts
====>result=macro:-> = \sum _{t \notin \mathbf {T}} \int _t^a \biggl \lbrace g(y)^2 \int _t^a f(x)^2 \,dx \biggr \rbrace \,dy
====>tmpmathcontent=macro:->
+[4]
-----------------------------------
Math env gather*
\begin {matrix} 0 & 1 \\ 1 & 0 \end {matrix} \quad \begin {pmatrix} 0 & -i \\ i & 0 \end {pmatrix} \\[10pt] \begin {bmatrix} 0 & -1 \\ 1 & 0 \end {bmatrix} \quad \begin {Bmatrix} 1 & 0 \\ 0 & -1 \end {Bmatrix} \\[10pt] \begin {vmatrix} a & b \\ c & d \end {vmatrix} \quad \begin {Vmatrix} i & 0 \\ 0 & -i \end {Vmatrix}
@@ -238,7 +239,6 @@ Math env math
====>first-result=macro:->\left (\begin {smallmatrix} -1 & 0 \\ 0 & -1 \end {smallmatrix}\right )
====>first-tmpmathcontent=macro:->
====>formula has no subparts
-[4]
-----------------------------------
Math env subnumcases
{f(x) = \label {L1}} -1 & if $x<0$\,, \\ 0 & if $x=0$\,, \tag {$*$} \\ 1 & if $x>0$\,. \label {L2}
@@ -275,6 +275,7 @@ A \xLeftarrow {\ x} B \xRightarrow [y\ ]{} C \xLeftrightarrow [y]{\ x\ } D \\ A
====>first-result=macro:->A \xLeftarrow {\ x} B \xRightarrow [y\ ]{} C \xLeftrightarrow [y]{\ x\ } D
====>first-tmpmathcontent=macro:-> A \xhookleftarrow {x} B \xhookrightarrow [bbb]{a} C \\ \xleftharpoondown {} \xleftharpoonup {} \xleftrightharpoons {xxx} \xrightleftharpoons [yy]{} \xrightharpoondown {} \xrightharpoonup {} \\ \xmapsto {x>0} A \xleftrightarrow [\text {letters}]{} Z
====>formula has subparts
+[5]
====>result=macro:-> A \xhookleftarrow {x} B \xhookrightarrow [bbb]{a} C
====>tmpmathcontent=macro:-> \xleftharpoondown {} \xleftharpoonup {} \xleftrightharpoons {xxx} \xrightleftharpoons [yy]{} \xrightharpoondown {} \xrightharpoonup {} \\ \xmapsto {x>0} A \xleftrightarrow [\text {letters}]{} Z
====>result=macro:-> \xleftharpoondown {} \xleftharpoonup {} \xleftrightharpoons {xxx} \xrightleftharpoons [yy]{} \xrightharpoondown {} \xrightharpoonup {}
@@ -295,7 +296,6 @@ Math env equation*
====>first-result=macro:->\interval [open right]{a}{d} = \interval {a}{b} + \interval [open left]{b}{c} + \interval [open]{c}{e} - \interval [open right]{d}{e}
====>first-tmpmathcontent=macro:->
====>formula has no subparts
-[5]
-----------------------------------
Math env gather*
\ket {\psi }\bra {\phi } : \ket {\xi } \mapsto \ket {\psi } \braket {\psi |\xi } \\ \Braket { \phi | \frac {\partial ^2}{\partial t^2} | \psi } \\ \intertext {Also:} \Set { x\in \Re ^2 | 0 < |x| < 5 }
@@ -334,6 +334,7 @@ Math env gather
====>first-result=macro:->\aSb {x} \neq \aSb *{x} \neq \aSb [\hat ]{x} \neq \bSa {X}
====>first-tmpmathcontent=macro:-> \bS {\delta } \neq \bS *{\delta } \neq \bS [\hat ]{\delta } \\ \bCSb {a} \cdot \bS {c} = \bS {a} \times \bS {c}
====>formula has subparts
+[6]
====>result=macro:-> \bS {\delta } \neq \bS *{\delta } \neq \bS [\hat ]{\delta }
====>tmpmathcontent=macro:-> \bCSb {a} \cdot \bS {c} = \bS {a} \times \bS {c}
====>result=macro:-> \bCSb {a} \cdot \bS {c} = \bS {a} \times \bS {c}
@@ -362,7 +363,6 @@ Math env gather*
====>first-result=macro:->\aoverbrace [L1U3R] {a^3 +3ab^2 + 3a^2b +b^3}
====>first-tmpmathcontent=macro:-> \aunderbrace [l1U1D1U1r] {\text {Some text with a brace}} \\ \aunderbrace [l10@{\ldots }04r] {x_1,x_2,x_3,\dots ,x_n} \\ \aunderbrace ['1'] {\smash [b]{(a+b)}}\nolimits ^2 = \aunderbrace ['1,[5pt]1'] {\smash [b]{\; a^2+2ab+b^2}}
====>formula has subparts
-[6]
====>result=macro:-> \aunderbrace [l1U1D1U1r] {\text {Some text with a brace}}
====>tmpmathcontent=macro:-> \aunderbrace [l10@{\ldots }04r] {x_1,x_2,x_3,\dots ,x_n} \\ \aunderbrace ['1'] {\smash [b]{(a+b)}}\nolimits ^2 = \aunderbrace ['1,[5pt]1'] {\smash [b]{\; a^2+2ab+b^2}}
====>result=macro:-> \aunderbrace [l10@{\ldots }04r] {x_1,x_2,x_3,\dots ,x_n}
@@ -525,12 +525,12 @@ Overfull \hbox (9.05542pt too wide) detected at line 434
.....\mathoff
....\glue(\tabskip) 0.0
.\pdfliteral page{EMC}
-.\marks4{e-,294,325,}
-.\marks4{e+,294,325,}
-.\write1{\newlabeldata{mcid-295}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{295}{tagmcid}{\__ref_attribute_tagmcid: }}}
+.\marks4{e-,295,325,}
+.\marks4{e+,295,325,}
+.\write1{\newlabeldata{mcid-296}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{296}{tagmcid}{\__ref_attribute_tagmcid: }}}
.\pdfliteral shipout page{/Formula <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
-.\marks4{b-,295,326,Formula,,,}
-.\marks4{b+,295,326,Formula,,,}
+.\marks4{b-,296,326,Formula,,,}
+.\marks4{b+,296,326,Formula,,,}
.\mathoff
.\glue 0.0 plus 1.0fil
) [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
More information about the latex3-commits
mailing list.