[latex3-commits] [git/LaTeX3-latex3-latex2e] gh344: fix for #344 (a622e88a)

Frank Mittelbach frank.mittelbach at latex-project.org
Mon Jun 15 14:16:49 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh344
Link       : https://github.com/latex3/latex2e/commit/a622e88aab353b3e27a867b1b061e00a5f352663

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

commit a622e88aab353b3e27a867b1b061e00a5f352663
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Mon Jun 15 14:16:49 2020 +0200

    fix for #344


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

a622e88aab353b3e27a867b1b061e00a5f352663
 base/changes.txt               |  5 +++++
 base/doc.dtx                   | 15 +++++++++++++--
 base/doc/ltnews32.tex          | 13 +++++++++++++
 base/testfiles/github-0344.lvt | 37 +++++++++++++++++++++++++++++++++++++
 base/testfiles/github-0344.tlg | 28 ++++++++++++++++++++++++++++
 5 files changed, 96 insertions(+), 2 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 401f0d85..5d212002 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2020-06-15  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* doc.dtx (subsection{Macros surrounding the `definition parts'}):
+	Void \@labels for vertical typesetting (gh/344)
+
 2020-05-19  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltfssini.dtx (section{Custom series settings for main document families}):
diff --git a/base/doc.dtx b/base/doc.dtx
index 3011994d..c38aefe5 100644
--- a/base/doc.dtx
+++ b/base/doc.dtx
@@ -35,7 +35,7 @@
 %<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
 %<+package> \ProvidesPackage{doc}
 %<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb>  [2019/12/16 v2.1l
+%<+package|shortvrb>  [2020/06/15 v2.1m
 %<+package|shortvrb>   Standard LaTeX documentation package (FMi)]
 %\catcode`\<=12
 %
@@ -1324,6 +1324,16 @@
    \if at inlabel\leavevmode\fi
    \trivlist \parskip \z@ \item[]%
 %    \end{macrocode}
+%    The \cs{item} command sets the \cs{@labels} box but that box is
+%    never typeset (as \cs{everypar} that normally does this gets
+%    redefined later). That is normally not an issue, but produces a
+%    problem when typesetting in mixed directions, (e.g., in
+%    Japanese), so we explicitly clear it for that use case.
+%  \changes{v2.1m}{2020/06/15}{Void \cs{@labels} for vertical
+%    typesetting (gh/344)}
+%    \begin{macrocode}
+   \global\setbox\@labels\box\voidb at x
+%    \end{macrocode}
 %    Additionally, everything should be set in \texttt{typewriter} font.
 %    Some people might prefer it somewhat differently; because of this
 %    the font choice is
@@ -1448,7 +1458,8 @@
 %    bothered since doc-sources should be up-to-date but since the
 %    request came from someone called David Carlisle \ldots :-)
 % \changes{v1.9y}{1996/01/26}{Support compat mode}
-%  \changes{v2.1l}{2019/12/16}{Use \cs{shapedefault} not \cs{updefault} for extended NFSS}
+%  \changes{v2.1l}{2019/12/16}{Use \cs{shapedefault} not
+%    \cs{updefault} for extended NFSS}
 %    \begin{macrocode}
     \def\MacroFont{\small
                    \usefont\encodingdefault
diff --git a/base/doc/ltnews32.tex b/base/doc/ltnews32.tex
index e6b7e415..99861911 100644
--- a/base/doc/ltnews32.tex
+++ b/base/doc/ltnews32.tex
@@ -447,6 +447,19 @@ are ignored as elsewhere.
 \githubissue{327}
 
 
+
+\subsection{Support vertical typesetting with \pkg{doc}}
+
+The \texttt{macrocode} environment uses a \texttt{trivlist} internally
+and as part of this sets up the \cs{@labels} box to contain some
+horizontal skips, but that box is never used. As a result this
+generates an issue in some circumstances if the typesetting direction
+is vertical. This has now been corrected to support such use cases as
+well.
+%
+\githubissue{344}
+
+
 \subsection{Record the counter name stepped by \cs{refstepcounter}}
 
 \cs{refstepcounter} now stores the name of counter in \cs{@currentcounter}.
diff --git a/base/testfiles/github-0344.lvt b/base/testfiles/github-0344.lvt
new file mode 100644
index 00000000..a51d4fdb
--- /dev/null
+++ b/base/testfiles/github-0344.lvt
@@ -0,0 +1,37 @@
+% \iffalse
+\documentclass{article}
+
+\input{test2e}
+
+\usepackage{doc}
+\begin{document}
+  \DocInput{\jobname.lvt}
+\end{document}
+% \fi
+%
+% \makeatletter
+% \tracingonline1
+% \showboxdepth10000
+% \showboxbreadth10000
+%
+% \START
+% \showbox\@labels  ^^A -> void
+%
+%    \begin{macrocode}
+\def\MACRO{}
+%    \end{macrocode}
+%
+% \showbox\@labels  ^^A -> non-void???
+%
+% \begin{itemize}
+% \showbox\@labels  ^^A -> non-void???
+% \item a
+% \showbox\@labels  ^^A -> void
+% \item b
+% \showbox\@labels  ^^A -> void
+% \end{itemize}
+%
+% \showbox\@labels  ^^A -> void
+%
+\endinput
+
diff --git a/base/testfiles/github-0344.tlg b/base/testfiles/github-0344.tlg
new file mode 100644
index 00000000..a0dca4a6
--- /dev/null
+++ b/base/testfiles/github-0344.tlg
@@ -0,0 +1,28 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+> \box...=void
+! OK.
+l. ...% \showbox\@labels
+                         ^^A -> void
+> \box...=void
+! OK.
+l. ...% \showbox\@labels
+                         ^^A -> non-void???
+> \box...=void
+! OK.
+l. ...% \showbox\@labels
+                         ^^A -> non-void???
+> \box...=void
+! OK.
+l. ...% \showbox\@labels
+                         ^^A -> void
+> \box...=void
+! OK.
+l. ...% \showbox\@labels
+                         ^^A -> void
+> \box...=void
+! OK.
+l. ...% \showbox\@labels
+                         ^^A -> void
+) [1
+] (github-0344.aux)





More information about the latex3-commits mailing list.