3

Given the following declarations in a tst package using kvoptions

\ProvidesPackage{tst}
 ...
\DeclareBoolOption{abc}
\DeclareComplementaryOption{cba}{abc}

Which is the correct way of declaring both options as local: \DeclareLocalOptions{abc} or \DeclareLocalOptions{abc,cba} since they both share the same internal representation (flag)?

6
+50

The "Local" in \DeclareLocalOptions does refer to the place, where options are recognized, e.g. \usepackage. But such "local" options are not recognized, if specified as global option in \documentclass.

Therefore this meaning of "local" does not refer to the implementation of the option, both options need to be specified in \DeclareLocalOptions, if both should not be recognized as global option:

\ProvidesPackage{tst}
...
\DeclareBoolOption{abc}
\DeclareComplementaryOption{cba}{abc}
\DeclareLocalOptions{abc, cba}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.