Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

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.