[latex3-commits] [git/LaTeX3-latex3-latex2e] gh203: Fix for #203 (ef7a53a2)

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Nov 2 15:56:37 CET 2019


Repository : https://github.com/latex3/latex2e
On branch  : gh203
Link       : https://github.com/latex3/latex2e/commit/ef7a53a2bb9604a011a19e1f4681b0866f3c2475

>---------------------------------------------------------------

commit ef7a53a2bb9604a011a19e1f4681b0866f3c2475
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sat Nov 2 15:56:37 2019 +0100

    Fix for #203


>---------------------------------------------------------------

ef7a53a2bb9604a011a19e1f4681b0866f3c2475
 base/TEMPLATE-IncludeInRelease.txt              |  2 +-
 base/changes.txt                                |  5 ++++
 base/ltmiscen.dtx                               | 22 +++++++++++++--
 base/ltspace.dtx                                | 33 ++++++++++++++++++----
 base/testfiles/github-0203.lvt                  | 37 +++++++++++++++++++++++++
 base/testfiles/{tlb2049.tlg => github-0203.tlg} |  6 ++--
 base/testfiles/tlb1451.luatex.tlg               |  2 +-
 base/testfiles/tlb1451.tlg                      |  2 +-
 8 files changed, 97 insertions(+), 12 deletions(-)

diff --git a/base/TEMPLATE-IncludeInRelease.txt b/base/TEMPLATE-IncludeInRelease.txt
index ae509a90..de274a12 100644
--- a/base/TEMPLATE-IncludeInRelease.txt
+++ b/base/TEMPLATE-IncludeInRelease.txt
@@ -1,6 +1,6 @@
 %</2ekernel>
 %<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease>\IncludeInRelease{2020/02/01}%
 %<latexrelease>                 {\XXX}{Info}%
 
 
diff --git a/base/changes.txt b/base/changes.txt
index 3675405b..8d7aec41 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2019-11-02  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltmiscen.dtx: Make \\ and \@centercr robust in all situations (gh/203)
+	* ltspace.dtx:  Make \\ and \@normalcr robust in all situations (gh/203)
+
 2019-10-25  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltmiscen.dtx (subsection{Environments}):
diff --git a/base/ltmiscen.dtx b/base/ltmiscen.dtx
index 2a88438d..0a93b1a3 100644
--- a/base/ltmiscen.dtx
+++ b/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmiscen.dtx}
-             [2019/10/25 v1.1q LaTeX Kernel (Misc. Environments)]
+             [2019/11/02 v1.1r LaTeX Kernel (Misc. Environments)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltmiscen.dtx}
@@ -705,9 +705,27 @@
 % \begin{macro}{\@centercr}
 % \changes{v1.0h}{1994/05/03}{\cs{@badcrerr} replaced by \cs{@nolnerr}}
 % \changes{v1.0z}{1995/07/13}{Use \cs{nobreak}}
+% \changes{v1.1r}{2019/11/02}{Make \cs{@centercr} robust (gh/203)}
 %    \begin{macrocode}
-\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/01}%
+%<latexrelease>                 {\@centercr}{Make robust}%
+\protected\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi
        \par\@ifstar{\nobreak\@xcentercr}\@xcentercr}
+%</2ekernel|latexrelease>
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\@centercr}{Make robust}%
+%<latexrelease>
+%<latexrelease>\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi
+%<latexrelease>       \par\@ifstar{\nobreak\@xcentercr}\@xcentercr}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
 %    \end{macrocode}
 % \end{macro}
 %
diff --git a/base/ltspace.dtx b/base/ltspace.dtx
index d840b13b..bfae7b9a 100644
--- a/base/ltspace.dtx
+++ b/base/ltspace.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltspace.dtx}
-             [2019/08/27 v1.3j LaTeX Kernel (spacing)]
+             [2019/11/02 v1.3k LaTeX Kernel (spacing)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltspace.dtx}
@@ -393,15 +393,38 @@
 % so now it is explicitly robust, like |\\|.
 %  \begin{macro}{\@normalcr}
 % The internal definition of the `normal' definition of |\\|.
+% \changes{v1.3k}{2019/11/02}{Make also \cs{@normalcr} robust}
 %    \begin{macrocode}
-\DeclareRobustCommand\\{%
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/02/01}%
+%<latexrelease>                 {\@normalcr}{make robust}%
+\protected\def\@normalcr{%
   \let \reserved at e \relax
   \let \reserved at f \relax
   \@ifstar{\let \reserved at e \vadjust \let \reserved at f \nobreak
              \@xnewline}%
-          \@xnewline}
-\expandafter\let\expandafter\@normalcr
-     \csname\expandafter\@gobble\string\\ \endcsname
+  \@xnewline}
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+\let\\\@normalcr
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\@normalcr}{make robust}%
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\\{%
+%<latexrelease>   \let \reserved at e \relax
+%<latexrelease>   \let \reserved at f \relax
+%<latexrelease>   \@ifstar{\let \reserved at e \vadjust \let \reserved at f \nobreak
+%<latexrelease>             \@xnewline}%
+%<latexrelease>  \@xnewline}
+%<latexrelease>\expandafter\let\expandafter\@normalcr
+%<latexrelease>     \csname\expandafter\@gobble\string\\ \endcsname
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
diff --git a/base/testfiles/github-0203.lvt b/base/testfiles/github-0203.lvt
new file mode 100644
index 00000000..1ef937c3
--- /dev/null
+++ b/base/testfiles/github-0203.lvt
@@ -0,0 +1,37 @@
+\documentclass{article}
+
+\input{test2e}
+
+\begin{document}
+
+\START
+
+
+\makeatletter
+
+\protected at edef\test{a\\b}
+
+\typeout{Top-level: \meaning\test}
+
+\parbox{3cm}{%
+
+  \protected at edef\test{a\\b}
+
+  \typeout{In box: \meaning\test}
+}
+
+\raggedright
+
+\protected at edef\test{a\\b}
+
+\typeout{Raggedright: \meaning\test}
+
+\raggedleft
+
+\protected at edef\test{a\\b}
+
+\typeout{Raggedleft: \meaning\test}
+
+\makeatother
+
+\END
diff --git a/base/testfiles/tlb2049.tlg b/base/testfiles/github-0203.tlg
similarity index 75%
copy from base/testfiles/tlb2049.tlg
copy to base/testfiles/github-0203.tlg
index f2680325..b75dae15 100644
--- a/base/testfiles/tlb2049.tlg
+++ b/base/testfiles/github-0203.tlg
@@ -1,8 +1,10 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+Top-level: macro:->a\\b
+In box: macro:->a\\b
 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)
+Raggedright: macro:->a\\b
+Raggedleft: macro:->a\\b
diff --git a/base/testfiles/tlb1451.luatex.tlg b/base/testfiles/tlb1451.luatex.tlg
index 9985f8ee..e189788d 100644
--- a/base/testfiles/tlb1451.luatex.tlg
+++ b/base/testfiles/tlb1451.luatex.tlg
@@ -183,7 +183,7 @@ Underfull \vbox (badness 2073) has occurred while \output is active
 .\penalty -51
 .\glue 10.0 plus 3.0 minus 5.0
 .\glue 15.00002
-.\mark{{Michael Downes}{Here is a title\protect \\with a line break in it}}
+.\mark{{Michael Downes}{Here is a title\\with a line break in it}}
 .\glue(\parskip) 0.0 plus 1.0
 .\glue(\baselineskip) 5.05556
 .\hbox(6.94444+1.94444)x345.0, glue set - 0.01045, direction TLT
diff --git a/base/testfiles/tlb1451.tlg b/base/testfiles/tlb1451.tlg
index 614f43e8..18fb00eb 100644
--- a/base/testfiles/tlb1451.tlg
+++ b/base/testfiles/tlb1451.tlg
@@ -161,7 +161,7 @@ Underfull \vbox (badness 2073) has occurred while \output is active
 .\penalty -51
 .\glue 10.0 plus 3.0 minus 5.0
 .\glue 15.00002
-.\mark{{Michael Downes}{Here is a title\protect \\with a line break in it}}
+.\mark{{Michael Downes}{Here is a title\\with a line break in it}}
 .\glue(\parskip) 0.0 plus 1.0
 .\glue(\baselineskip) 5.05556
 .\hbox(6.94444+1.94444)x345.0, glue set - 0.01045





More information about the latex3-commits mailing list