Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No warning for unused options using keyval approach #938

Closed
josephwright opened this issue Oct 20, 2022 · 2 comments
Closed

No warning for unused options using keyval approach #938

josephwright opened this issue Oct 20, 2022 · 2 comments

Comments

@josephwright
Copy link
Member

Brief outline of the bug

As title: the behaviour is inconsistent with classical option processing.

Minimal example showing the bug

\RequirePackage{latexbug}
\begin{filecontents}[overwrite]{myclass.cls}
\ProvidesClass{myclass}[9999/12/31]
\LoadClass{minimal}
\DeclareKeys{foo .store = \myclassfoo,foo .default:n = {},baz .store=\myclassbaz}
\ProcessKeyOptions
\end{filecontents}
\documentclass[foo,bar,baz=foo]{myclass}
\begin{document}
\end{document}

Log file (required) and possibly PDF file

test.log

@Skillmon
Copy link
Contributor

Skillmon commented Oct 20, 2022

Additionally, used/known options aren't removed from the unused options list for a class file:

\RequirePackage{latexbug}
\begin{filecontents}[overwrite]{myclass.cls}
\ProvidesClass{myclass}[9999/12/31]
\LoadClassWithOptions{article}
\DeclareKeys{foo .store = \myclassfoo,foo .default:n = {},baz .store=\myclassbaz}
\ProcessKeyOptions
\end{filecontents}
\documentclass[foo,bar,baz=foo]{myclass}
\begin{document}
\end{document}

throws warnings about unused global options for both foo and baz.

@josephwright
Copy link
Member Author

I have pushed an initial fix. @Skillmon asks if this should include zapping spaces in the unused option name: I am not so sure so I've not done that yet. Thoughts welcome.

@josephwright josephwright added the fixed in dev Fixed in development branch, not in stable release label Oct 22, 2022
@FrankMittelbach FrankMittelbach added this to Pool (unscheduled issues) in upcoming LaTeX2e releases via automation Oct 24, 2022
@FrankMittelbach FrankMittelbach added this to the Release 2022 Fall milestone Oct 24, 2022
@FrankMittelbach FrankMittelbach moved this from Pool (unscheduled issues) to Done in dev in upcoming LaTeX2e releases Oct 24, 2022
@josephwright josephwright removed the fixed in dev Fixed in development branch, not in stable release label Oct 31, 2022
upcoming LaTeX2e releases automation moved this from Done in dev to Done Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants