[latex3-commits] [git/LaTeX3-latex3-latex2e] gh335: added fix for #335 added documentation for #22 fixed documentation for #323 (and moved it to a different place as it isn't about babel) (ce4d4542)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri May 15 13:33:04 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh335
Link       : https://github.com/latex3/latex2e/commit/ce4d4542c9d2968eaef5f857009f2d2bdd161e7f

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

commit ce4d4542c9d2968eaef5f857009f2d2bdd161e7f
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri May 15 13:33:04 2020 +0200

    added fix for #335
    added documentation for #22
    fixed documentation for #323 (and moved it to a different place as it isn't about babel)


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

ce4d4542c9d2968eaef5f857009f2d2bdd161e7f
 base/changes.txt                                   |  6 ++++
 base/doc/ltnews32.tex                              | 40 ++++++++++++++++------
 base/ltdefns.dtx                                   | 22 ++++++++++--
 base/testfiles/github-0335.lvt                     | 17 +++++++++
 base/testfiles/github-0335.tlg                     |  5 +++
 .../tlb-latexrelease-rollback-003-often.luatex.tlg |  4 +++
 .../tlb-latexrelease-rollback-003-often.tlg        |  4 +++
 .../tlb-latexrelease-rollback-003-often.xetex.tlg  |  4 +++
 base/testfiles/tlb-rollback-004-often.luatex.tlg   |  2 ++
 base/testfiles/tlb-rollback-004-often.tlg          |  2 ++
 base/testfiles/tlb-rollback-004-often.xetex.tlg    |  2 ++
 11 files changed, 95 insertions(+), 13 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 4d662ee6..540decc6 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2020-05-15  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltdefns.dtx (subsection{Initex initialisations}):
+	Allow \par in the argument of \typeout and turn it into an empty line
+	if expanded, if not it remains \par (gh/335)
+
 2020-05-07  Ulrike Fischer <Ulrike.Fischer at latex-project.org>
 
 	* ltxref.dtx:
diff --git a/base/doc/ltnews32.tex b/base/doc/ltnews32.tex
index 60147965..cf6f8591 100644
--- a/base/doc/ltnews32.tex
+++ b/base/doc/ltnews32.tex
@@ -211,6 +211,17 @@ The Unicode slot for \=y was incorrectly pointing to the slot for
 %
 \githubissue{326}
 
+\subsection{Add support for Unicode soft hyphens}
+
+For a long time, the UTF-8 option for \pkg{inputenc} made the Unicode
+soft hyphen character (U+00AD) an alias for the \LaTeX\ soft hyphen
+\cs{-}. The Unicode engines \XeTeX{} and \LuaTeX{} behaved
+different though: They either ignored U+00AD or interpreted it as an
+unconditional hyphen. This inconsistency is fixed now and \LaTeX{}
+always treats \texttt{U+00AD} as \cs{-}.
+%
+\githubissue{323}
+
 
 
 \subsection{Fix capital accents in Unicode engines}
@@ -308,7 +319,13 @@ been corrected.
 
 \subsection{Avoid spurious package option warning}
 
-\emph{to write}
+When a package is loaded with a number of options, say \texttt{X},
+\texttt{Y} and \texttt{Z}, and then later another loading attempt was
+made with a subset of the options or no options, it was possible that
+you got an error message that option \texttt{X} is not known to the
+package. This obviously incorrect error was due to some timing issue
+where the list of available options got lost prematurely. This has now
+been fixed.
 %
 \githubissue{22}
 
@@ -402,6 +419,7 @@ are ignored as elsewhere.
 
 
 \subsection{Record the counter name stepped by \cs{refstepcounter}}
+
 \cs{refstepcounter} now stores the name of counter in \cs{\@currentcounter}. 
 This allows packages like \pkg{zref} and \pkg{hyperref} to store the name without
 having to patch \cs{refstepcounter}.
@@ -409,6 +427,17 @@ having to patch \cs{refstepcounter}.
 \githubissue{300}
 
 
+\subsection{Allow \cs{par} commands inside \cs{typeout}}
+
+\cs{typeout} used to choke when seeing an empty line or a \cs{par}
+command in its argument.  However, sometimes it is used to display
+arbitrary user input or code (wrapped, for example, in
+\cs{unexpanded}) which may contain explicit \cs{par} commands. This is
+now allowed.
+%
+\githubissue{335}
+
+
 \section{Changes to packages in the \pkg{graphics} category}
 
 \subsection{Generate a warning if existing color definition is changed}
@@ -517,15 +546,6 @@ documentation~\cite{32:babel}.
 
 
 
-\subsection{Add support for Unicode soft hyphens}
-
-For a long time, the UTF-8 option for \pkg{inputenc} made the Unicode
-soft hyphen character (U+00AD) an alias for the \LaTeX\ soft hyphen
-|\-|. The Unicode engines \XeTeX{} and \LuaTeX{} behaved
-different though: They either ignored U+00AD or interpreted it as an
-unconditional hyphen. This inconsistency is fixed now and \LaTeX{}
-always treats \texttt{U+00AD} as |\-|.
-
 
 
 \begin{thebibliography}{9}
diff --git a/base/ltdefns.dtx b/base/ltdefns.dtx
index 303b9e56..c7688752 100644
--- a/base/ltdefns.dtx
+++ b/base/ltdefns.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltdefns.dtx}
-             [2020/02/27 v1.5g LaTeX Kernel (definition commands)]
+             [2020/05/15 v1.5h LaTeX Kernel (definition commands)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltdefns.dtx}
@@ -118,9 +118,25 @@
 %
 %  \begin{macro}{\typeout}
 %    Display something on the terminal.
+% \changes{v1.5g}{2020/05/15}{Allow \cs{par} in the argument (gh/335)}
 %    \begin{macrocode}
-\def\typeout#1{\begingroup\set at display@protect
-    \immediate\write\@unused{#1}\endgroup}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease>                 {\typeout}{Allow "par" in \typeout}%
+\long\def\typeout#1{\begingroup
+  \set at display@protect
+  \def\par{^^J^^J}%
+  \immediate\write\@unused{#1}\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\typeout}{Allow "par" in \typeout}%
+%<latexrelease>
+%<latexrelease>\def\typeout#1{\begingroup\set at display@protect
+%<latexrelease>    \immediate\write\@unused{#1}\endgroup}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %
diff --git a/base/testfiles/github-0335.lvt b/base/testfiles/github-0335.lvt
new file mode 100644
index 00000000..cf12b2e5
--- /dev/null
+++ b/base/testfiles/github-0335.lvt
@@ -0,0 +1,17 @@
+\documentclass{article}
+
+\input{test2e}
+
+\START
+
+\newcommand\showinput[1]{\typeout{Your input was: \unexpanded{#1}}}
+
+\showinput{Some material $\alpha$ \par with \commands}
+
+
+\typeout{This is some info text
+
+It has 2 paragraphs! (Note that in the .tlg
+the empty line is thrown away)}
+
+\END
diff --git a/base/testfiles/github-0335.tlg b/base/testfiles/github-0335.tlg
new file mode 100644
index 00000000..fb453202
--- /dev/null
+++ b/base/testfiles/github-0335.tlg
@@ -0,0 +1,5 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+Your input was: Some material $\alpha $ \par with \commands 
+This is some info text 
+It has 2 paragraphs! (Note that in the .tlg the empty line is thrown away)
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 76dd481d..15e77976 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -10,6 +10,8 @@ Skipping: [....-..-..] LuaTeX (prefixed names) on input line ....
 Applying: [....-..-..] LuaTeX (prefixed names) on input line ....
 Skipping: [....-..-..] Final dot for extension on input line ....
 Applying: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Skipping: [....-..-..] \MakeRobust  on input line ....
 Skipping: [....-..-..] \MakeRobust  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
@@ -325,6 +327,8 @@ Applying: [....-..-..] LuaTeX (prefixed names) on input line ....
 Already applied: [....-..-..] LuaTeX (prefixed names) on input line ....
 Applying: [....-..-..] Final dot for extension on input line ....
 Already applied: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index 274dccb7..56278df4 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -8,6 +8,8 @@ LaTeX Info: Redefining \IfTargetDateBefore on input line ...
 Package: latexrelease ....-..-.. v... LaTeX release emulation and tests (including releases up to ....-..-..)
 Skipping: [....-..-..] Final dot for extension on input line ....
 Applying: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Skipping: [....-..-..] \MakeRobust  on input line ....
 Skipping: [....-..-..] \MakeRobust  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
@@ -317,6 +319,8 @@ LaTeX Info: Redefining \IfTargetDateBefore on input line ....
 Package: latexrelease ....-..-.. v... LaTeX release emulation and tests (including releases up to ....-..-..)
 Applying: [....-..-..] Final dot for extension on input line ....
 Already applied: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
index 3a474b4e..192ce3fa 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -8,6 +8,8 @@ LaTeX Info: Redefining \IfTargetDateBefore on input line ...
 Package: latexrelease ....-..-.. v... LaTeX release emulation and tests (including releases up to ....-..-..)
 Skipping: [....-..-..] Final dot for extension on input line ....
 Applying: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Skipping: [....-..-..] \MakeRobust  on input line ....
 Skipping: [....-..-..] \MakeRobust  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
@@ -326,6 +328,8 @@ LaTeX Info: Redefining \IfTargetDateBefore on input line ....
 Package: latexrelease ....-..-.. v... LaTeX release emulation and tests (including releases up to ....-..-..)
 Applying: [....-..-..] Final dot for extension on input line ....
 Already applied: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.luatex.tlg b/base/testfiles/tlb-rollback-004-often.luatex.tlg
index 8840e86b..676bd0f6 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -7,6 +7,8 @@ Applying: [....-..-..] LuaTeX (prefixed names) on input line ....
 Already applied: [....-..-..] LuaTeX (prefixed names) on input line ....
 Applying: [....-..-..] Final dot for extension on input line ....
 Already applied: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.tlg b/base/testfiles/tlb-rollback-004-often.tlg
index 5f32c231..3f750b7a 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -5,6 +5,8 @@ LaTeX Info: Redefining \IfTargetDateBefore on input line ...
 Package: latexrelease ....-..-.. v... LaTeX release emulation and tests (including releases up to ....-..-..)
 Applying: [....-..-..] Final dot for extension on input line ....
 Already applied: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.xetex.tlg b/base/testfiles/tlb-rollback-004-often.xetex.tlg
index 0fd10b12..9a2832bc 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -5,6 +5,8 @@ LaTeX Info: Redefining \IfTargetDateBefore on input line ...
 Package: latexrelease ....-..-.. v... LaTeX release emulation and tests (including releases up to ....-..-..)
 Applying: [....-..-..] Final dot for extension on input line ....
 Already applied: [....-..-..] Final dot for extension on input line ....
+Skipping: [....-..-..] Allow "par" in \typeout  on input line ....
+Applying: [....-..-..] Allow "par" in \typeout  on input line ....
 Applying: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....
 Already applied: [....-..-..] \MakeRobust  on input line ....





More information about the latex3-commits mailing list.