<div dir="ltr"><div>Thanks for the report, we'll look.</div><div><br></div><div>Note that tex-live can only distribute unchanged files from ctan, who in turn only distribute unchanged files from the authors. So this isn't the right place to report these things.</div><div><br></div><div>If you could report it at <a href="https://github.com/latex3/latex2e/issues">https://github.com/latex3/latex2e/issues</a> it would help to track any discussion and/or changes that result, <br></div><div><br></div><div>thanks</div><div><br></div><div><br></div><div>However, to answer your question</div><div><br></div><div>
> Wasn<b>'</b>t<b>
\@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}</b></div><div>> good enough to test is global option in current packages
options?
</div><div><br></div><div>the code changed for issue 513</div><div><br></div><div><a href="https://github.com/latex3/latex2e/issues/513">https://github.com/latex3/latex2e/issues/513</a></div><div><br></div><div>But I'll need to check over the weekend if your example is an expected change or a bug or whatever.</div><div><br></div><div>David</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 23 Nov 2023 at 21:29, Linas Stonys <<a href="mailto:lstonys@vtex.lt">lstonys@vtex.lt</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
Hi,<br>
I noticed that \ProcessOptions* acts different in TL2019 and
TL2023. In older Tl if option is global (used in \documentclass)<br>
then inside package it only evaluate that option if it declared
inside package. Now the behavior is changed. If you declare <br>
option in style file and do not use \ProcessOptions then these
options will be processed in other package (in next \ProcessOptions*
). <br>
For example I use same options for many classes and I put them in
separate style file (<b>myoptions.sty</b>) an load it in the class
with .<br>
There is only one option <br>
\DeclareOption{showbug}{\AtEndOfClass{\IamBug}}<br>
and in the class file I add <br>
\let\IamBug\empty<br>
so I expect to compile normally but with TL2023 I'll get "\IamBug
undefined error" because showbug option<br>
will be executed not in class but in the inside class I loaded
package (<b>simplepackage.sty</b>)<br>
<br>
HERE is the \ProcessOptions* responsible macro <br>
\def\@xprocess@ptions{%<br>
\ifx\@currext\@clsextension\else<br>
\ifx\@classoptionslist\relax\else<br>
\@for\CurrentOption:=\@classoptionslist\do{%<br>
\ifx\CurrentOption\@empty\else<br>
% <b>\@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}%
TL2019 was this</b><br>
<b>
\@ifundefined{ds@\detokenize\expandafter{\CurrentOption}}{}{%
% TL2023 </b><br>
\@use@ption<br>
\expandafter\let\csname ds@\CurrentOption\endcsname\@empty<br>
}%<br>
\fi}%<br>
\fi<br>
\fi<br>
<b><br>
</b>Wasn<b>'</b>t<b>
\@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}<br>
</b>good enough to test is global option in current packages
options?<br>
<b><br>
</b>Here is min example files<br>
<b><br>
myclass.tex</b><br>
\documentclass[showbug]{myclass}<br>
\begin{document}<br>
aa<br>
\end{document}<br>
<br>
<b>myclass.cls</b><br>
\NeedsTeXFormat{LaTeX2e}<br>
\ProvidesClass{myclass}[]<br>
\RequirePackage{myoptions}<br>
%\input myoptions.sty<br>
\ProcessOptions<br>
\RequirePackage{simplepackage}<br>
\def\normalsize{}<br>
\let\IamBug\empty<br>
\endinput<br>
<b><br>
myoptions.sty <br>
</b>\ProvidesPackage{myoptions}[]<br>
\DeclareOption{showbug}{\AtEndOfClass{\IamBug}}<br>
\endinput<br>
<b><br>
simplepackage.sty</b><br>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]<br>
\ProvidesPackage{simplepackage}[]<br>
\DeclareOption{opt2}{\dnothing}<br>
\expandafter\show\csname simplepackage.sty-h@@k\endcsname
% here it shows ->. <br>
\ProcessOptions*\relax<br>
\expandafter\show\csname simplepackage.sty-h@@k\endcsname
% here it shows ->\IamBug \expandafter \let \csname
unprocessedoptions-\@currname .\@currext \endcsname \relax . <br>
\endinput<br>
<br>
Is it a bug in \ProcessOptions* and it will be changed to previous
version?<br>
<br>
Thanks,<br>
Linas<br>
<br>
<br>
</div>
</blockquote></div>