[latex3-commits] [git/latex2e] master: adjust definition of \IncludeInRelease to check delimiters and fix reported errors (a366cab)

David Carlisle d.p.carlisle at gmail.com
Tue Jan 9 00:03:54 CET 2018


Repository : https://github.com/latex3/latex2e
On branch  : master
Link       : https://github.com/latex3/latex2e/commit/a366cab53a665b9c00c8e651ae08a3cc0111b283

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

commit a366cab53a665b9c00c8e651ae08a3cc0111b283
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Mon Jan 8 23:03:38 2018 +0000

    adjust definition of \IncludeInRelease to check delimiters and fix reported errors


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

a366cab53a665b9c00c8e651ae08a3cc0111b283
 base/changes.txt                        |    6 ++++++
 base/ltclass.dtx                        |    5 ++++-
 base/ltdefns.dtx                        |   10 ++++++++-
 base/ltfiles.dtx                        |    3 ++-
 base/ltoutput.dtx                       |    5 +++--
 base/ltvers.dtx                         |   34 +++++++++++++++++++++++++++----
 base/testfiles/tlb-latexrelease-002.lvt |   20 ++++++++++++++++++
 base/testfiles/tlb-latexrelease-002.tlg |    4 ++++
 8 files changed, 78 insertions(+), 9 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index dc8f5b3..37c4763 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2018-01-08  David Carlisle  <latex-bugs at latex-project.org>
+
+	* ltvers.dtx: Modify \IncludeInRelease code to check matching \EndIncluderelease
+	* ldefns.dtx ltfiles.dtx ltoutput.dtx ltclass.dtx  fixes to \EndIncludeInRelease
+	* tlb-latexrelease.lvt check \IncludeInRelease markup
+
 2018-01-06  David Carlisle  <latex-bugs at latex-project.org>
 
 	* ltvers.dtx: possible 2018-02-01 release
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 30741b5..95b7895 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2017/03/08 v1.2c LaTeX Kernel (Class & Package Interface)]
+             [2018/01/08 v1.2d LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -716,6 +716,7 @@
 %<latexrelease>  \fi
 %<latexrelease> }%
 %<latexrelease> \reserved at a}
+%<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
 %
@@ -1043,6 +1044,7 @@
 %<latexrelease>             {\csname ds@\CurrentOption\endcsname}%
 %<latexrelease>    \edef\CurrentOption{##1}}%
 %<latexrelease>  \expandafter\reserved at a\CurrentOption\@nil}
+%<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
 %
@@ -1362,6 +1364,7 @@
 %<latexrelease>        \expandafter\reserved at b\reserved at a,\@nil,}%
 %<latexrelease>  \fi
 %<latexrelease>  \reserved at a}
+%<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
 %
diff --git a/base/ltdefns.dtx b/base/ltdefns.dtx
index 76be419..09a9682 100644
--- a/base/ltdefns.dtx
+++ b/base/ltdefns.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltdefns.dtx}
-             [2018/01/06 v1.5c LaTeX Kernel (definition commands)]
+             [2018/01/08 v1.5d LaTeX Kernel (definition commands)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltdefns.dtx}
@@ -1284,6 +1284,7 @@
 %<latexrelease>  \else
 %<latexrelease>    \expandafter\@secondoftwo
 %<latexrelease>  \fi}
+%<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
 % \end{macro}
@@ -1525,6 +1526,13 @@
 %<*2ekernel>
 %    \end{macrocode}
 % \end{macro}
+%
+% Delayed from |ltvers.dtx| 
+%    \begin{macrocode}
+\newif\if at includeinrelease
+\@includeinreleasefalse
+%    \end{macrocode}
+%
 %    \begin{macrocode}
 %</2ekernel>
 %    \end{macrocode}
diff --git a/base/ltfiles.dtx b/base/ltfiles.dtx
index aa604a2..1b21d36 100644
--- a/base/ltfiles.dtx
+++ b/base/ltfiles.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfiles.dtx}
-             [2017/03/10 v1.1n LaTeX Kernel (File Handling)]
+             [2018/01/08 v1.1m LaTeX Kernel (File Handling)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfiles.dtx}
@@ -459,6 +459,7 @@
 %<latexrelease>  \global\let \@nodocument \relax
 %<latexrelease>  \global\let\do\noexpand
 %<latexrelease>  \ignorespaces}
+%<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
 %
diff --git a/base/ltoutput.dtx b/base/ltoutput.dtx
index 829aee7..254b104 100644
--- a/base/ltoutput.dtx
+++ b/base/ltoutput.dtx
@@ -30,14 +30,14 @@
 %%% From File: ltoutput.dtx
 %<flafter>\ProvidesPackage{flafter}
 %<fltrace>\ProvidesPackage{fltrace}
-%<flafter,fltrace>       [2017/12/17 v1.4b
+%<flafter,fltrace>       [2018/01/08 v1.4c
 %<flafter>                  Standard LaTeX floats after reference (FMi)]
 %<fltrace>                  Tracing LaTeX floats algorithm (FMi)]
 %
 %<*driver>
 % \fi
 \ProvidesFile{ltoutput.dtx}
-             [2017/12/17 v1.4b LaTeX Kernel (Output Routine)]
+             [2018/01/08 v1.4c LaTeX Kernel (Output Routine)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltoutput.dtx}
@@ -2285,6 +2285,7 @@
 %<latexrelease>  \stepcounter{page}%
 %<latexrelease>  \let\firstmark\botmark
 %<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
 %  \end{macro}
diff --git a/base/ltvers.dtx b/base/ltvers.dtx
index 295dc8f..f491166 100644
--- a/base/ltvers.dtx
+++ b/base/ltvers.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltvers.dtx}
-             [2016/06/20 v1.0w LaTeX Kernel (Version Info)]
+             [2018/01/08 v1.1a LaTeX Kernel (Version Info)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltvers.dtx}
@@ -180,7 +180,16 @@
 %
 %    \begin{macrocode}
 %<*2ekernel|latexrelease>
-\def\IncludeInRelease#1{\kernel at ifnextchar[%
+%<latexrelease>\newif\if at includeinrelease
+%<latexrelease>\@includeinreleasefalse
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\IncludeInRelease#1{%
+ \if at includeinrelease
+  \PackageError{latexrelease}{mis-matched IncludeInRelease}{}%
+  \@includeinreleasefalse
+  \fi
+  \kernel at ifnextchar[%
   {\@IncludeInRelease{#1}}
   {\@IncludeInRelease{#1}[#1]}}
 %    \end{macrocode}
@@ -201,6 +210,7 @@
      \expandafter\expandafter\expandafter\@gobble at IncludeInRelease
     \else
       \GenericInfo{}{Applying: \the\toks@}%
+      \@includeinreleasetrue
       \expandafter\let\csname\string#2+\@currname+IIR\endcsname\@empty
     \fi
   \else
@@ -211,8 +221,24 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\long\def\@gobble at IncludeInRelease#1\EndIncludeInRelease{}
-\let\EndIncludeInRelease\relax
+\def\EndIncludeInRelease{%
+\if at includeinrelease
+  \@includeinreleasefalse
+\else
+  \PackageError{latexrelease}{mis-matched EndIncludeInRelease}{}%
+\fi}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\long\def\@gobble at IncludeInRelease#1\EndIncludeInRelease{%
+  \@includeinreleasefalse
+  \@check at IncludeInRelease#1\IncludeInRelease\@check at IncludeInRelease\@end at check@IncludeInRelease}
+%    \end{macrocode}
+%    \begin{macrocode}
+\long\def\@check at IncludeInRelease#1\IncludeInRelease#2#3\@end at check@IncludeInRelease{%
+  \ifx\@check at IncludeInRelease#2\else
+    \PackageError{latexrelease}{skipped IncludeInRelease}{}%
+  \fi}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
diff --git a/base/testfiles/tlb-latexrelease-002.lvt b/base/testfiles/tlb-latexrelease-002.lvt
new file mode 100644
index 0000000..501fada
--- /dev/null
+++ b/base/testfiles/tlb-latexrelease-002.lvt
@@ -0,0 +1,20 @@
+%
+% Check that latexrelease generates no errors,
+% eg from mis-matched \(End)IncludeInRelease
+
+% Input the test macros for LaTeX2e
+\input{test2e}
+\START
+
+% silence normal latexrelease logging
+\def\GenericInfo#1#2{}
+% stop xetex and luatex differences showing
+\let\XeTeXinterchartoks\@undefined
+\let\XeTeXcharclass\@undefined
+\def\directlua#1{}
+
+\RequirePackage[000/00/00]{latexrelease}
+
+
+\END
+
diff --git a/base/testfiles/tlb-latexrelease-002.tlg b/base/testfiles/tlb-latexrelease-002.tlg
new file mode 100644
index 0000000..8e2c656
--- /dev/null
+++ b/base/testfiles/tlb-latexrelease-002.tlg
@@ -0,0 +1,4 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+(latexrelease.sty
+)





More information about the latex3-commits mailing list