[latex3-commits] [git/LaTeX3-latex3-latex2e] main: raw option lists for issue #580 (#581) (5a5f6a68)

GitHub noreply at github.com
Mon Jun 7 08:59:18 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : main
Link       : https://github.com/latex3/latex2e/commit/5a5f6a68922183271d460cb9006fa2b1ea27a718

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

commit 5a5f6a68922183271d460cb9006fa2b1ea27a718
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Mon Jun 7 07:59:18 2021 +0100

    raw option lists for issue #580 (#581)
    
    * raw option lists for issue #580
    
    * grmmbl rollback tests grmbl
    
    * [ci skip] a year to forget
    
    * [ci skip] add latexchanges entries for this patch and the main release


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

5a5f6a68922183271d460cb9006fa2b1ea27a718
 base/changes.txt                                   | 13 +++++++-
 base/doc/latexchanges.tex                          | 13 +++++++-
 base/ltclass.dtx                                   | 39 ++++++++++++++++++++--
 base/testfiles/github-0479-often.luatex.tlg        |  2 ++
 base/testfiles/github-0479-often.tlg               |  2 ++
 base/testfiles/github-0479-often.xetex.tlg         |  2 ++
 base/testfiles/github-0580.lvt                     | 18 ++++++++++
 base/testfiles/github-0580.tlg                     |  8 +++++
 .../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 ++
 base/testfiles/tlb-rollback-005.luatex.tlg         |  2 ++
 base/testfiles/tlb-rollback-005.tlg                |  2 ++
 base/testfiles/tlb-rollback-005.xetex.tlg          |  2 ++
 17 files changed, 116 insertions(+), 5 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 634eb0e3..20f43334 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -11,7 +11,18 @@ All changes above are only part of the development branch for the next release.
 ================================================================================
 
 #########################
-# 2020-06-01 Release
+# 2021-06-01 PL1 Release
+#########################
+
+2021-06-06  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* ltclass.dtx: ensure raw option lists are copied in short circuit
+	loading by \LoadClassWithOptions, expand one step so
+	\CurrentOption expanded (gh #580)
+
+
+#########################
+# 2021-06-01 Release
 #########################
 
 2021-05-31  David Carlisle  <David.Carlisle at latex-project.org>
diff --git a/base/doc/latexchanges.tex b/base/doc/latexchanges.tex
index bc8e8dd0..b4f213c5 100644
--- a/base/doc/latexchanges.tex
+++ b/base/doc/latexchanges.tex
@@ -41,7 +41,7 @@
 \author{\copyright~Copyright 2015--2021, \LaTeX\ Project Team.\\
    All rights reserved.}
 
-\date{2021-01-08}
+\date{2021-06-06}
 
 % a few commands from doc
 \newcommand\Lpack[1]{\mbox{\textsf{#1}}}
@@ -111,7 +111,18 @@ see for example
 
 %\section{Introduction}
 
+\section{Changes introduced in 2021-06-01 patch~1}
 
+A further refinement to the handling of ``raw'' option lists added
+in the last release, see \ghissue{508}.
+
+\section{Changes introduced in 2021-06-01}
+
+The focus of this release is to provide further important building
+blocks for the future production of reliable tagged PDF output.  Many
+other improvements have been made. Please see \ltnewsissue{33} for an
+overview of the new features and the change log in
+\texttt{changes.txt} for a more detailed list of individual changes.
 
 \section{Changes introduced in 2020-10-01 patch~4}
 
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index a0ab0fa3..68a2040e 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2021/05/18 v1.4b LaTeX Kernel (Class & Package Interface)]
+             [2021/06/06 v1.4c LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -1237,10 +1237,14 @@
     \csname opt@\reserved at a\endcsname
 %    \end{macrocode}
 % Extend raw option list
+% \changes{v1.4c}{2021/06/06}
+%         {apply \cs{expandafter} to raw options for gh/580}
 %    \begin{macrocode}
     \@ifundefined{@raw at opt@#3.#1}%
-      {\expandafter\gdef\csname @raw at opt@#3.#1\endcsname{#2}}%
-      {\expandafter\g at addto@macro\csname @raw at opt@#3.#1\endcsname{,#2}}%
+      {\expandafter\gdef\csname @raw at opt@#3.#1\expandafter\endcsname
+                \expandafter{#2}}%
+      {\expandafter\g at addto@macro\csname @raw at opt@#3.#1\expandafter\endcsname
+                \expandafter{\expandafter,#2}}%
 }
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
@@ -1680,15 +1684,39 @@
 %
 % \begin{macro}{\@loadwithoptions}
 % \changes{v1.0t}{1995/11/14}{macro added}
+% \changes{v1.4c}{2021/06/06}
+%         {handle raw options for gh/580}
 % Pass the current option list on to a class or package.
 % |#1| is |\@|\emph{cls-or-pkg}|extension|,
 % |#2| is |\RequirePackage| or |\LoadClass|,
 % |#3| is the class or package to be loaded.
 %    \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2021/06/01}%
+%<latexrelease>                 {\@loadwithoptions}{Raw option lists load with options}%
+%<*2ekernel|latexrelease>
 \def\@loadwithoptions#1#2#3{%
   \expandafter\let\csname opt@#3.#1\expandafter\endcsname
        \csname opt@\@currname.\@currext\endcsname
+  \expandafter\let\csname @raw at opt@#3.#1\expandafter\endcsname
+       \csname @raw at opt@\@currname.\@currext\endcsname
    #2{#3}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}
+%<latexrelease>                 {\@loadwithoptions}{Raw option lists load with options}%
+%<latexrelease>\def\@loadwithoptions#1#2#3{%
+%<latexrelease>  \expandafter\let\csname opt@#3.#1\expandafter\endcsname
+%<latexrelease>       \csname opt@\@currname.\@currext\endcsname
+%<latexrelease>   #2{#3}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \@onlypreamble\@loadwithoptions
 %    \end{macrocode}
 % \end{macro}
@@ -2234,10 +2262,15 @@
 %    \end{macrocode}
 % \changes{v1.3u}{2020/11/20}
 %         {Copy option list to the requested package.}
+% \changes{v1.4c}{2021/06/06}
+%         {Copy raw raw options for gh/580}
 %    \begin{macrocode}
     \expandafter\let
       \csname opt@\@currpkg at reqd\expandafter\endcsname
       \csname opt@\@currname.\@currext\endcsname
+    \expandafter\let
+      \csname @raw at opt@\@currpkg at reqd\expandafter\endcsname
+      \csname @raw at opt@\@currname.\@currext\endcsname
     \global\expandafter
     \let\csname ver@\@currname.\@currext\endcsname\@empty
 %    \end{macrocode}
diff --git a/base/testfiles/github-0479-often.luatex.tlg b/base/testfiles/github-0479-often.luatex.tlg
index f8a7b348..4ce60acc 100644
--- a/base/testfiles/github-0479-often.luatex.tlg
+++ b/base/testfiles/github-0479-often.luatex.tlg
@@ -524,6 +524,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Applying: [....-..-..] Unused options issue on input line ....
 Already applied: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/github-0479-often.tlg b/base/testfiles/github-0479-often.tlg
index 48c6a655..8f79851c 100644
--- a/base/testfiles/github-0479-often.tlg
+++ b/base/testfiles/github-0479-often.tlg
@@ -513,6 +513,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Applying: [....-..-..] Unused options issue on input line ....
 Already applied: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/github-0479-often.xetex.tlg b/base/testfiles/github-0479-often.xetex.tlg
index 58f009e7..34caf433 100644
--- a/base/testfiles/github-0479-often.xetex.tlg
+++ b/base/testfiles/github-0479-often.xetex.tlg
@@ -514,6 +514,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Applying: [....-..-..] Unused options issue on input line ....
 Already applied: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/github-0580.lvt b/base/testfiles/github-0580.lvt
new file mode 100644
index 00000000..d1abcb9b
--- /dev/null
+++ b/base/testfiles/github-0580.lvt
@@ -0,0 +1,18 @@
+\begin{filecontents}{class_test.cls}
+\ProvidesClass{class_test}
+\LoadClassWithOptions{article}
+\end{filecontents}
+\documentclass[twocolumn]{class_test}
+\input{test2e}
+
+
+% These should all show twocolumn (github #580)
+\makeatletter
+\START
+\typeout{Main class_test: \csname opt at class_test.cls\endcsname}
+\typeout{RAW class_test: \csname @raw at opt@class_test.cls\endcsname}
+\typeout{Main article: \csname opt at article.cls\endcsname}
+\typeout{RAW article : \csname @raw at opt@article.cls\endcsname}
+\typeout{Main class: \@classoptionslist}
+\typeout{RAW  class: \@raw at classoptionslist}
+\END
\ No newline at end of file
diff --git a/base/testfiles/github-0580.tlg b/base/testfiles/github-0580.tlg
new file mode 100644
index 00000000..789c02ca
--- /dev/null
+++ b/base/testfiles/github-0580.tlg
@@ -0,0 +1,8 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+Main class_test: twocolumn
+RAW class_test: twocolumn
+Main article: twocolumn,
+RAW article : twocolumn,
+Main class: twocolumn
+RAW class: twocolumn
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 2bf3175e..696f9379 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -439,6 +439,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Skipping: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
@@ -1016,6 +1018,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index aa431190..6753e335 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -433,6 +433,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Skipping: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
@@ -1000,6 +1002,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  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 98e5bfb1..c5c031cb 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -433,6 +433,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Skipping: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
@@ -1009,6 +1011,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.luatex.tlg b/base/testfiles/tlb-rollback-004-often.luatex.tlg
index c5bedc99..744ddc86 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -520,6 +520,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.tlg b/base/testfiles/tlb-rollback-004-often.tlg
index 0be90dbc..d2677f3c 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -508,6 +508,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.xetex.tlg b/base/testfiles/tlb-rollback-004-often.xetex.tlg
index 34762baf..1dba8a2d 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -509,6 +509,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Skipping: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] Unused options issue on input line ....
 Skipping: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/tlb-rollback-005.luatex.tlg b/base/testfiles/tlb-rollback-005.luatex.tlg
index b9d63c61..69ca5ee7 100644
--- a/base/testfiles/tlb-rollback-005.luatex.tlg
+++ b/base/testfiles/tlb-rollback-005.luatex.tlg
@@ -528,6 +528,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Applying: [....-..-..] Unused options issue on input line ....
 Already applied: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/tlb-rollback-005.tlg b/base/testfiles/tlb-rollback-005.tlg
index 64e9524a..ef3d738a 100644
--- a/base/testfiles/tlb-rollback-005.tlg
+++ b/base/testfiles/tlb-rollback-005.tlg
@@ -517,6 +517,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Applying: [....-..-..] Unused options issue on input line ....
 Already applied: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....
diff --git a/base/testfiles/tlb-rollback-005.xetex.tlg b/base/testfiles/tlb-rollback-005.xetex.tlg
index ab5b7cb1..00a14c24 100644
--- a/base/testfiles/tlb-rollback-005.xetex.tlg
+++ b/base/testfiles/tlb-rollback-005.xetex.tlg
@@ -518,6 +518,8 @@ Skipping: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] filter unused option list on input line ....
 Applying: [....-..-..] Spaces in \ExecuteOptions  on input line ....
 Already applied: [....-..-..] Spaces in \ExecuteOptions  on input line ....
+Skipping: [....-..-..] Raw option lists load with options on input line ...
+Applying: [....-..-..] Raw option lists load with options on input line ...
 Applying: [....-..-..] Unused options issue on input line ....
 Already applied: [....-..-..] Unused options issue on input line ....
 Applying: [....-..-..] ifx tests in \@fileswith at pti@ns  on input line ....





More information about the latex3-commits mailing list.