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)?

Heiko Oberdiek
  • 271,626

1 Answers1

6

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}
Heiko Oberdiek
  • 271,626