<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
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>
</body>
</html>