5

Consider the following tst package:

\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\ProvidesPackage{tst}[2014/12/01 v1.0 tst package]

\RequirePackage{kvoptions}
\RequirePackage{etoolbox}

\SetupKeyvalOptions{%
  family=TST,
  prefix=TST@}

\DeclareBoolOption{abc}
\DeclareComplementaryOption{cba}{abc}
\DeclareLocalOption{abc}
\ProcessKeyvalOptions*

\newcommand*{\showit}%
  {\ifbool{TST@abc}%
     {TRUE}%
     {FALSE}}

When I use the package the compilation gives an error stating that \DeclareLocalOption is undefined. However the documentation states that this macro exists. Changing it to \DeclareLocalOptions (mind the extra s) solves the problem but this macro is intended for a comma separated list of options. Another solution seems to use the internal \KVO@DeclareLocalOption macro. Is this an error in the kvoptions package?

  • 4
    This question appears to be off-topic because it is about bug that will be fixed in a future release of kvoptions. – Werner Dec 22 '14 at 22:25

1 Answers1

6

Just use \DeclareLocalOptions. It was a bug, that \DeclareLocalOption was not defined in kvoptions.

Heiko Oberdiek
  • 271,626
  • 'Nobody' except the OP? [Were I the OP, your post would come across to me as saying 'nobody important'. I'm guessing that is not what you mean to convey!] – cfr Dec 22 '14 at 22:46
  • @cfr It's a little different to use an undefined command for an expected different functionality ;-). The feature should be present for five years (2009/07/21 v3.3), but where are the bug reports? – Heiko Oberdiek Dec 23 '14 at 02:59
  • I think you are not seeing it from the OP's point of view. The OP tried to use a command with the reasonable belief that it was defined. So to say 'nobody' implies that the OP does not count as anybody at all. Why not just say that nobody needs the singular form, which is surely true. – cfr Dec 23 '14 at 03:20
  • 1
    @cfr I have removed the sentence. – Heiko Oberdiek Dec 23 '14 at 07:13