Skip to content

kvoptions' \AddToKeyvalOption compilation error if used with space before {code} argument #2

@jfbu

Description

@jfbu

Indeed, \KVO@temp is then a macro with a delimited parameter text (by a space).

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{bugaddtokeyval}[2016/10/29 v1.0 LaTeX package]

% Handle package options via "kvoptions"
\RequirePackage{kvoptions}% tested with kvoptions 2016/05/16 v3.12
\DeclareStringOption[0]{bar0}
\AddToKeyvalOption*{bar0}{\typeout{ok}}% ok
\DeclareStringOption[1]{bar1}
\AddToKeyvalOption*{bar1} {\typeout{ok}}% bug!
% \KVO@temp will be defined with a delimited (by a space) parameter text
% hence bug
\ProcessKeyvalOptions*

\endinput

tex file:

% Time-stamp: <29-10-2016 à 09:56:02 CEST>

% the documentation should say that no space is allowed before {<code>}

\documentclass{article}

% tested with kvoptions 2016/05/16 v3.12
\usepackage{bugaddtokeyval}

\begin{document}

\end{document}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions