siefkenj / unified-latex

Utilities for parsing and manipulating LaTeX ASTs with the Unified.js framework
MIT License
85 stars 20 forks source link

Ignore macros with problematic argument specifications in `listNewcommands` #64

Open theseanl opened 7 months ago

theseanl commented 7 months ago

For example, xparse allows specifying more than 1 characters as argument delimiters, such as in r{ab}c, but it simply ignores such macros. Trying to use a macro with such an argspec generates an error saying that there is no known macro with that name.

Currently, the argspec parser also accepts such argspecs, but for additional safety, we may implement some validator in unified-latex-utils-argspec which may be used in listNewcommands.

siefkenj commented 7 months ago

I think this is more an error in xparse. Has it been reported?