New answers tagged

4

One could redefine \KV@errx which will be expanded in case of undefined keys. For example: \documentclass{article} \usepackage{keyval} \begin{document} %\setkeys{test}{unknown=something} \makeatletter \let\KV@errx@ORI\KV@errx % Save original error handling \let\KV@errx\@gobble % Ignore unknown keys \setkeys{test}{unknown=something} \...


0

This (almost) answers the whole question. I'm going with FN in this solution as the new trigger instead of \fn. It's less elegant, but works for now. This document lays out the process that'll take \mymessage, which contains FN..., creates a new command using that name, and replaces the original FN... with that new command; additionally, it generates a new ...


1

Is this what you are looking for? \documentclass{scrartcl} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand \command { m m } { \group_begin: \keyval_parse:NNn \use_none:n \jshivers_command:nn { #1 } #2 \group_end: } \cs_generate_variant:Nn \seq_set_split:Nnn { NnV } \cs_new_protected:Npn \jshivers_command:nn #1 #2 { \tl_set:Nn \...


2

The following code defines and illustrates a macro \images{}. \images takes one mandatory argument which should be a key-value list of options. The minimum sensible list sets the key images to a list of one or more image files. I've defined this as a macro but it could be easily defined using \NewDocumentEnvironment{images}{m} ... instead, or used within ...



Top 50 recent answers are included