Closed Sophanatprime closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity.
The aim of ltcmd
is to provide a generic way to define commands with a 'LaTeX-like' interface. The proposal here is outside this area, so after discussion we have decided to turn this down.
Brief outline of the enhancement
I would like to propose a new argument specification for
ltcmd
:p
, which is used to test if one of the tokens in a token list appears in the input. This would be useful for cases where we want to check if one of several tokens is present, without using multiplet
arguments. For example, if we define\NewDocumentCommand\foo{ p{+-*} }{#1}
, then\foo -
and\foo\relax
would give 2 and 0, respectively.Minimal example showing the desired new behaviour