[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: issue #242 spaces in hhline (cb7a2e83)

David Carlisle d.p.carlisle at gmail.com
Sat Jan 4 16:15:33 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/cb7a2e830366c5c2d5af3a72a53158aaeab0afc3

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

commit cb7a2e830366c5c2d5af3a72a53158aaeab0afc3
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sat Jan 4 15:15:33 2020 +0000

    issue #242 spaces in hhline


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

cb7a2e830366c5c2d5af3a72a53158aaeab0afc3
 required/tools/hhline.dtx                           | 19 ++++++++++++++++---
 required/tools/testfiles/github-0242-hhline.lvt     | 21 +++++++++++++++++++++
 .../tools/testfiles/github-0242-hhline.tlg          |  2 +-
 3 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/required/tools/hhline.dtx b/required/tools/hhline.dtx
index 1da01d75..b9234b5a 100644
--- a/required/tools/hhline.dtx
+++ b/required/tools/hhline.dtx
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 1993-2019
+% Copyright (C) 1993-2020
 %
 % The LaTeX3 Project and any individual authors listed elsewhere
 % in this file.
@@ -25,7 +25,7 @@
 %
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{hhline}
-%<package>         [2014/10/28 v2.03 Table rule package (DPC)]
+%<package>         [2020/01/04 v2.04 Table rule package (DPC)]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -55,6 +55,8 @@
 %    {Update for LaTeX2e.}
 % \changes{v2.03}{1994/05/23}
 %    {New style warning.}
+% \changes{v2.04}{2020/01/04}
+%    {Ignore spaces.}
 %
 %
 %
@@ -301,12 +303,16 @@
 %    \begin{macrocode}
   \ifx\@tempb b\HH at add{\rlap{\HH at box\z@\doublerulesep}}\else
 %    \end{macrocode}
+% "space", Gobble the space and loop again.
+%    \begin{macrocode}
+  \ifx\@tempb\@sptoken\let\next\HH at spacelet\else
+%    \end{macrocode}
 % Otherwise ignore the token, with a warning.
 %    \begin{macrocode}
   \PackageWarning{hhline}%
       {\meaning\@tempb\space ignored in \noexpand\hhline argument%
        \MessageBreak}%
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
 %    \end{macrocode}
 % Go around the loop again.
 %    \begin{macrocode}
@@ -314,6 +320,13 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\HH at spacelet}
+% Helper macro to gobble a space token and continue the loop.
+%    \begin{macrocode}
+\lowercase{\def\HH at spacelet} {\futurelet\@tempb \HH at loop}
+%    \end{macrocode}
+% \end{macro}
+%
 %    \begin{macrocode}
 %</package>
 %    \end{macrocode}
diff --git a/required/tools/testfiles/github-0242-hhline.lvt b/required/tools/testfiles/github-0242-hhline.lvt
new file mode 100644
index 00000000..395f6ad2
--- /dev/null
+++ b/required/tools/testfiles/github-0242-hhline.lvt
@@ -0,0 +1,21 @@
+\documentclass{article}
+\pagestyle{empty}
+\usepackage{hhline}
+\input{test2e}
+
+
+\begin{document}
+
+\START
+% should get bo errors here
+\begin{tabular}{||cc||c|c||c}   \hhline{|t: = = :t: = =  :t|  }
+ a & b & c & d               \\ \hhline{|:  = = :|  ~|~  | |  }
+ 1 & 2 & 3 & 4               \\ \hhline{ #  = =  #  ~|=  :b| -}
+ i & j & k & l
+   & \multicolumn{1}{c|}{?}  \\ \hhline{||  - - ||  - -      -}
+ w & x & y & z               \\ \hhline{|b: = = :b: = =  :b|  }
+\end{tabular}
+
+
+
+\end{document}
\ No newline at end of file
diff --git a/base/testfiles/tlb2049.tlg b/required/tools/testfiles/github-0242-hhline.tlg
similarity index 91%
copy from base/testfiles/tlb2049.tlg
copy to required/tools/testfiles/github-0242-hhline.tlg
index f2680325..eb8679cc 100644
--- a/base/testfiles/tlb2049.tlg
+++ b/required/tools/testfiles/github-0242-hhline.tlg
@@ -5,4 +5,4 @@ LaTeX Font Info:    External font `cmex10' loaded for size
 LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <5> on input line ....
 [1
-] (tlb2049.aux)
+] (github-0242-hhline.aux)





More information about the latex3-commits mailing list