After reading https://www.texdev.net/2020/08/19/the-good-the-bad-and-the-ugly-creating-document-commands I’m now looking for an example how I would use \NewDocumentCommand
to create an overlay-aware macro for beamer.
Here an example with both the classic \newcommand
syntax and \NewDocumentCommand
. The key difference is that within the macro definition the #1
needs to be surrounded by <>
.