-
-
Notifications
You must be signed in to change notification settings - Fork 288
Open
Description
Brief outline of the bug
If one activates an unknown
handler in an l3keys
-set the new option handler does no longer remove known keys from the list of unused options if used inside a class (in a package the handling seems fine).
Minimal example showing the bug
\RequirePackage{latexbug} % <--should be always the first line (see CONTRIBUTING)!
\begin{filecontents}[overwrite]{\jobname.cls}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{\jobname}
\LoadClassWithOptions{article}
\DeclareKeys[testwork]{%
test .code = \newcommand{\foo}{#1},
test .usage = load,
% the following three lines give an equivalent definition of your bertha
% option as defined with `\DeclareOption{bertha}{}`
bertha .code = {},
bertha .value_forbidden:n = true,
bertha .usage = load,
% if you use this unknown handler, you get "test" and "bertha" as unknown
% options, if you omit it you get "a4paper" as unknown option
unknown .code = {}
}
\ProcessKeyOptions[testwork]
\endinput
\end{filecontents}
\documentclass[a4paper,test=wtf,bertha]{\jobname}
\begin{document}
test \foo
\end{document}