TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Maybe I misunderstood something but the following example doesn’t compile with out a optional argument defining the kprefix

\documentclass{article}

\usepackage{keyreader}

%   [KV]------\/
\krddefinekeys*{CL}[my]{%
   cmd/test//;
}

\krdsetkeys{CL}{test=x}

\begin{document}
\mytest
\end{document}

It stops with the error text

! Package xkeyval Error: Key 'test' undefined in families 'CL'.

But if one inserts the [KV] it works. Is this optional argument mandatory?

share|improve this question
up vote 1 down vote accepted

Many thanks. It isn't due to a bug as such but something I didn't foresee. I will upload a revised version immediately. In the meantime please use the following patch of \krddefinekeys.

\documentclass{article}
\usepackage{keyreader}
\makeatletter
\protected\def\krddefinekeys{%
  \begingroup\endlinechar\m@ne
  \krd@testst{\@testopt\krd@d@finekeys{KV}}%
}
\makeatother

\krddefinekeys*{CL}[my]{%
   cmd/test//;
}
\krdsetkeys{CL}{test=x}
\begin{document}
\mytest
\end{document}
share|improve this answer
    
It works. Thanks for the fast response :-) – Tobi Mar 4 '12 at 1:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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