[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Gh617 (#620) (6ffdeb20)

GitHub noreply at github.com
Mon Jul 19 14:25:44 CEST 2021


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

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

commit 6ffdeb20946dd5b65d356cd74e8f5b88fdccc0e5
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Mon Jul 19 13:25:44 2021 +0100

    Gh617 (#620)
    
    * protect raw option list from edef (original option list is expanded later)
    
    * tests for #617
    
    * change log for issue #617


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

6ffdeb20946dd5b65d356cd74e8f5b88fdccc0e5
 base/changes.txt               |  6 +++++-
 base/ltclass.dtx               |  5 +++--
 base/testfiles/github-0617.lvt | 20 ++++++++++++++++++++
 base/testfiles/github-0617.tlg |  9 +++++++++
 4 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 461b0b16..0df325ee 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -10,7 +10,11 @@ are not part of the distribution.
 
 	* ltplain.dtx (section{Plain \TeX}):
 	Use 2 as value for \tracinglostchars so that one gets at least warnings
-	on the terminal (3 would be better as a missing char is an error).
+	on the terminal (3 would be better as a missing char is an error)
+  
+2021-07-12  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* ltclass.dtx:  fix for gh/617 prevent expansion in raw option list.
   
 2021-07-11  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 643587b0..d70604cd 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2021/06/09 v1.4c LaTeX Kernel (Class & Package Interface)]
+             [2021/07/12 v1.4d LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -1979,8 +1979,9 @@
         \ifx\@nnil##1\@nnil\else
 %    \end{macrocode}
 %
+% \changes{v1.4d}{2021/07/12}{add \cs{unexpanded}}
 %    \begin{macrocode}
-         \noexpand\@onefilewithoptions##1[{#2}][{#4}]%
+         \noexpand\@onefilewithoptions##1[{\unexpanded{#2}}][{#4}]%
          \noexpand\@pkgextension
         \fi
         \expandafter\reserved at b
diff --git a/base/testfiles/github-0617.lvt b/base/testfiles/github-0617.lvt
new file mode 100644
index 00000000..92734062
--- /dev/null
+++ b/base/testfiles/github-0617.lvt
@@ -0,0 +1,20 @@
+\begin{filecontents}[overwrite]{gh617.sty}
+\ProvidesPackage{gh617}
+\typeout{^^JSTANDARD^^J  \unexpanded\expandafter\expandafter\expandafter{\csname opt@\@currname.\@currext\endcsname}}
+\typeout{^^JRAW^^J  \unexpanded\expandafter\expandafter\expandafter{\csname @raw at opt@\@currname.\@currext\endcsname}}
+% zero out the standard list as no options declared here
+\expandafter\let\csname opt@\@currname.\@currext\endcsname\@empty
+\end{filecontents}
+
+
+\input{test2e}
+
+\START
+% the raw list should not be expanded (isse #617)
+
+\def\emptyTWO{\empty}
+\def\twelve{12pt}
+\RequirePackage[one=\emptyTWO,two=\unexpanded{\emptyTWO}, a5 paper,\twelve]{gh617}\relax
+
+
+\END
\ No newline at end of file
diff --git a/base/testfiles/github-0617.tlg b/base/testfiles/github-0617.tlg
new file mode 100644
index 00000000..3d3cde35
--- /dev/null
+++ b/base/testfiles/github-0617.tlg
@@ -0,0 +1,9 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+(gh617.sty
+Package: gh617 
+STANDARD
+ one=,two=\emptyTWO ,a5paper,12pt
+RAW
+ one=\emptyTWO ,two=\unexpanded {\emptyTWO }, a5 paper,\twelve 
+)





More information about the latex3-commits mailing list.