I need a simple example of how to make key-value parameters.
The scenario I want to do is as follows.
Code: Select all
\documentclass{minimal}
\begin{document}
% Assume I have a command \foo that has 2 optional key-value parameters.
% The explicitly specified parameters will override the defaults.
% Example One: Using the defaults.
\foo{Some Contents}
% Example Two: Override one parameter.
\foo[keyone=valueone]{Some Contents}
% Example Three: Override both parameters.
\foo[keyone=valueone,keytwo=valuetwo]{Some Contents}
\end{document}
Thank you in advance.
regards,
Yoyo