diff options
author | Karl Berry <karl@freefriends.org> | 2021-06-15 20:07:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-06-15 20:07:05 +0000 |
commit | ffabcfdaa53caa031688bf8c81ec835d5d29b391 (patch) | |
tree | f75f5bbd70a80bd7c7633e552be24d8f377c6a79 /Master/texmf-dist/source/latex/base/ltclass.dtx | |
parent | b1a5ae16842772228c63f9adfb509ec929aab68f (diff) |
circuitikz (15jun21)
git-svn-id: svn://tug.org/texlive/trunk@59599 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltclass.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/base/ltclass.dtx | 69 |
1 files changed, 64 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltclass.dtx b/Master/texmf-dist/source/latex/base/ltclass.dtx index a0ab0fa3547..2ab3081bf74 100644 --- a/Master/texmf-dist/source/latex/base/ltclass.dtx +++ b/Master/texmf-dist/source/latex/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} @@ -757,14 +757,40 @@ % needed here to insert a \cs{@empty} to prevent the loss of braces. % \changes{v1.3u}{2020/11/20}{Macro added} % \changes{v1.3w}{2021/01/21}{Add empty entry for latexrelease} +% \changes{v1.4c}{2021/06/03}% +% {Take care of \cs{@kernel@currpathstack} when rolling +% back/forward.} % \begin{macrocode} %</2ekernel> %<*2ekernel|latexrelease> %<latexrelease> %<latexrelease>\IncludeInRelease{2020/10/01}{\@kernel@currpathstack}% %<latexrelease> {Add \@kernel@currpathstack}% -\gdef\@kernel@currpathstack{} -%<latexrelease>\g@addto@macro\@kernel@currpathstack{{}} +% \end{macrocode} +% If rolling backwards to this release, \cs{@kernel@currpathstack} +% will be defined, so the \cs{gdef} line should not be executed, thus +% the \cs{@gobblethree} will take it out, so the satck isn't touched. +% \begin{macrocode} +%<latexrelease>\@ifundefined{@kernel@currpathstack}{}{\@gobblethree} +\gdef\@kernel@currpathstack{}% +% \end{macrocode} +% If rolling forward to this release, then the \cs{gdef} line above +% will define the path stack to be empty (which it can't be, inside a +% file), so the code below will traverse the \cs{@currnamestack}, and +% add as many empty items to \cs{@kernel@currpathstack} as there are +% items in \cs{@currnamestack}, so both are back in sync. Most of the +% time \pkg{latexrelease} is loaded on top-level, so only one item is +% needed, but \pkg{platexrelease} loads it internally, so the more +% complicated loop is needed. +% \begin{macrocode} +%<latexrelease>\ifx\@kernel@currpathstack\@empty +%<latexrelease> \def\reserved@a#1#2#3{% +%<latexrelease> \ifx\relax#3\else +%<latexrelease> \g@addto@macro\@kernel@currpathstack{{}}% +%<latexrelease> \expandafter\reserved@a +%<latexrelease> \fi}% +%<latexrelease> \expandafter\reserved@a\@currnamestack{}{}{\relax}% +%<latexrelease>\fi \def\@p@pfilepath#1{% \gdef\@currpath{#1}\@p@pfilepath@aux\@empty} \def\@p@pfilepath@aux#1\@nil{% @@ -1237,10 +1263,14 @@ \csname opt@\reserved@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@opt@#3.#1}% - {\expandafter\gdef\csname @raw@opt@#3.#1\endcsname{#2}}% - {\expandafter\g@addto@macro\csname @raw@opt@#3.#1\endcsname{,#2}}% + {\expandafter\gdef\csname @raw@opt@#3.#1\expandafter\endcsname + \expandafter{#2}}% + {\expandafter\g@addto@macro\csname @raw@opt@#3.#1\expandafter\endcsname + \expandafter{\expandafter,#2}}% } %</2ekernel|latexrelease> %<latexrelease>\EndIncludeInRelease @@ -1680,15 +1710,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@opt@#3.#1\expandafter\endcsname + \csname @raw@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 +2288,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@reqd\expandafter\endcsname \csname opt@\@currname.\@currext\endcsname + \expandafter\let + \csname @raw@opt@\@currpkg@reqd\expandafter\endcsname + \csname @raw@opt@\@currname.\@currext\endcsname \global\expandafter \let\csname ver@\@currname.\@currext\endcsname\@empty % \end{macrocode} |