[latex3-commits] [git/LaTeX3-latex3-latex2e] gh274: fix for #274 (9da55af5)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Feb 14 19:19:35 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh274
Link       : https://github.com/latex3/latex2e/commit/9da55af59b08e9334a776b3684e685014ef8801e

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

commit 9da55af59b08e9334a776b3684e685014ef8801e
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Feb 14 19:19:35 2020 +0100

    fix for #274


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

9da55af59b08e9334a776b3684e685014ef8801e
 base/changes.txt               |   5 +
 base/doc/ltnews32.tex          |   7 +
 base/ltpictur.dtx              |   5 +-
 base/testfiles/github-0274.lvt |  31 +++++
 base/testfiles/github-0274.tlg | 291 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 337 insertions(+), 2 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index d332d4c5..e373bc58 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.
 =======================================================================
 
+2020-02-14  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltpictur.dtx (section{Picture Mode}):
+	Suppress spaces following \linethickness declaration (gh/274)
+
 #########################
 # 2020-02-02 PL 2 Release
 #########################
diff --git a/base/doc/ltnews32.tex b/base/doc/ltnews32.tex
index 410f1c64..3755623f 100644
--- a/base/doc/ltnews32.tex
+++ b/base/doc/ltnews32.tex
@@ -157,6 +157,13 @@ this limitation has now been lifted.
 \githubissue{124}
 
 
+\subsection{Spacing issues when using \cs{linethickness}}
+
+In some circumstances the use of \cs{linethickness} introduced a spurious space that shifted objects
+in a \texttt{picture} environments to the right. This has been corrected.
+%
+\githubissue{270}
+
 \section{Changes to packages in the \pkg{tools} category}
 
 \subsection{Support stretchable glue in \texttt{w}-columns}
diff --git a/base/ltpictur.dtx b/base/ltpictur.dtx
index 9440fc78..4018adba 100644
--- a/base/ltpictur.dtx
+++ b/base/ltpictur.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
       \ProvidesFile{ltpictur.dtx}
-                      [2019/08/27 v1.1m LaTeX Kernel (Picture Mode)]
+                      [2020/02/14 v1.1n LaTeX Kernel (Picture Mode)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltpictur.dtx}
@@ -284,9 +284,10 @@
 % \end{macro}
 %
 % \begin{macro}{\linethickness}
+% \changes{v1.1n}{2020/02/14}{Suppress spaces following the declaration (gh/274)}
 %    \begin{macrocode}
 \DeclareRobustCommand\linethickness[1]
-   {\@wholewidth #1\relax \@halfwidth .5\@wholewidth}
+   {\@wholewidth #1\relax \@halfwidth .5\@wholewidth \ignorespaces}
 %    \end{macrocode}
 % \end{macro}
 %
diff --git a/base/testfiles/github-0274.lvt b/base/testfiles/github-0274.lvt
new file mode 100644
index 00000000..162110b7
--- /dev/null
+++ b/base/testfiles/github-0274.lvt
@@ -0,0 +1,31 @@
+\documentclass{minimal}
+
+% one can argue if this is really supported syntax but a similar problem happens with pict2e
+% so best to fix it.
+
+\input{test2e}
+
+\showoutput
+
+\begin{document}
+
+\START
+
+Common usage of picture command, \textbackslash linethickness with
+or without space does not matter.\\
+Without space: \begin{picture}(144,10)\put(0,5){\line(1,0){72}}
+\linethickness{2pt}\put(72,5){\line(1,0){72}}\end{picture}\\
+With space: \phantom{out}\begin{picture}(144,10)\put(0,5){\line(1,0){72}}
+\linethickness{2pt} \put(72,5){\line(1,0){72}}\end{picture}
+
+But naughty input makes a difference.\\
+Without space:
+\begin{picture}(144,10)
+\put(0,5){\line(1,0){72}\linethickness{2pt}\line(1,0){72}}%
+\end{picture}\\
+With space: \phantom{out}%
+\begin{picture}(144,10)
+\put(0,5){\line(1,0){72}\linethickness{2pt} \line(1,0){72}}%
+\end{picture}
+\end{document}
+
diff --git a/base/testfiles/github-0274.tlg b/base/testfiles/github-0274.tlg
new file mode 100644
index 00000000..6fc4c5d3
--- /dev/null
+++ b/base/testfiles/github-0274.tlg
@@ -0,0 +1,291 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+LaTeX Font Info:    Trying to load font information for OMS+cmr on input line ....
+LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <10> not available
+(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line ...
+Completed box being shipped out [1]
+\vbox(578.15999+0.0)x469.75499
+.\glue 0.0
+.\vbox(578.15999+0.0)x469.75499
+..\vbox(0.0+0.0)x469.75499
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x469.75499
+..\glue 0.0
+..\glue(\lineskip) 0.0
+..\vbox(578.15999+0.0)x469.75499, glue set 507.65999fil
+...\glue(\topskip) 2.5
+...\hbox(7.5+2.5)x469.75499, glue set 51.0598fil
+....\hbox(0.0+0.0)x20.0
+....\OT1/cmr/m/n/10 C
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 n
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 f
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 d
+....\OT1/cmr/m/n/10 ,
+....\glue 3.33333 plus 2.08331 minus 0.88889
+....\OMS/cmsy/m/n/10 n
+....\OT1/cmr/m/n/10 l
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 c
+....\kern-0.27779
+....\OT1/cmr/m/n/10 k
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 s
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 w
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 r
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 w
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 d
+....\OT1/cmr/m/n/10 o
+....\kern0.27779
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 s
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 .
+....\penalty 10000
+....\glue 0.0 plus 1.0fil
+....\penalty -10000
+....\glue(\rightskip) 0.0
+...\penalty 150
+...\glue(\lineskip) 0.0
+...\hbox(10.0+1.94444)x469.75499, glue set 254.86597fil
+....\OT1/cmr/m/n/10 W
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\hbox(10.0+0.0)x144.0
+.....\hbox(10.0+0.0)x144.0, glue set 144.0fil
+......\glue 0.0
+......\hbox(6.0+0.0)x0.0
+.......\hbox(0.19998+0.19998)x0.0, glue set - 72.0fil, shifted -5.0
+........\kern 0.0
+........\rule(0.19998+0.19998)x72.0
+........\glue 0.0 plus 1.0fil minus 1.0fil
+.......\hbox(1.0+1.0)x0.0, glue set - 144.0fil, shifted -5.0
+........\kern 72.0
+........\rule(1.0+1.0)x72.0
+........\glue 0.0 plus 1.0fil minus 1.0fil
+......\glue 0.0 plus 1.0fil minus 1.0fil
+....\penalty 10000
+....\glue 0.0 plus 1.0fil
+....\penalty -10000
+....\glue(\rightskip) 0.0
+...\penalty 150
+...\glue(\baselineskip) 0.05556
+...\hbox(10.0+1.94444)x469.75499, glue set 254.86597fil
+....\OT1/cmr/m/n/10 W
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\hbox(6.15079+0.0)x14.44449
+....\hbox(10.0+0.0)x144.0
+.....\hbox(10.0+0.0)x144.0, glue set 144.0fil
+......\glue 0.0
+......\hbox(6.0+0.0)x0.0
+.......\hbox(0.19998+0.19998)x0.0, glue set - 72.0fil, shifted -5.0
+........\kern 0.0
+........\rule(0.19998+0.19998)x72.0
+........\glue 0.0 plus 1.0fil minus 1.0fil
+.......\hbox(1.0+1.0)x0.0, glue set - 144.0fil, shifted -5.0
+........\kern 72.0
+........\rule(1.0+1.0)x72.0
+........\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
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 3.11111
+...\hbox(6.94444+1.94444)x469.75499, glue set 282.03242fil
+....\hbox(0.0+0.0)x20.0
+....\OT1/cmr/m/n/10 B
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 g
+....\OT1/cmr/m/n/10 h
+....\kern-0.27779
+....\OT1/cmr/m/n/10 t
+....\kern-0.27779
+....\OT1/cmr/m/n/10 y
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 k
+....\kern-0.27779
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 s
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 a
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 d
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 ^^K (ligature ff)
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 n
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 .
+....\penalty 10000
+....\glue 0.0 plus 1.0fil
+....\penalty -10000
+....\glue(\rightskip) 0.0
+...\penalty 150
+...\glue(\baselineskip) 0.05556
+...\hbox(10.0+1.94444)x469.75499, glue set 254.86597fil
+....\OT1/cmr/m/n/10 W
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 t
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\hbox(10.0+0.0)x144.0
+.....\hbox(10.0+0.0)x144.0, glue set 144.0fil
+......\glue 0.0
+......\hbox(6.0+0.0)x0.0
+.......\hbox(1.0+1.0)x0.0, glue set - 144.0fil, shifted -5.0
+........\kern 0.0
+........\rule(0.19998+0.19998)x72.0
+........\rule(1.0+1.0)x72.0
+........\glue 0.0 plus 1.0fil minus 1.0fil
+......\glue 0.0 plus 1.0fil minus 1.0fil
+....\penalty 10000
+....\glue 0.0 plus 1.0fil
+....\penalty -10000
+....\glue(\rightskip) 0.0
+...\penalty 150
+...\glue(\baselineskip) 0.05556
+...\hbox(10.0+1.94444)x469.75499, glue set 254.86597fil
+....\OT1/cmr/m/n/10 W
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 h
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\hbox(6.15079+0.0)x14.44449
+....\hbox(10.0+0.0)x144.0
+.....\hbox(10.0+0.0)x144.0, glue set 144.0fil
+......\glue 0.0
+......\hbox(6.0+0.0)x0.0
+.......\hbox(1.0+1.0)x0.0, glue set - 144.0fil, shifted -5.0
+........\kern 0.0
+........\rule(0.19998+0.19998)x72.0
+........\rule(1.0+1.0)x72.0
+........\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
+...\glue -1.94444
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+..\glue(\baselineskip) 0.0
+..\hbox(0.0+0.0)x469.75499
+(github-0274.aux)





More information about the latex3-commits mailing list.