This pull request adds \NewCommandCopy support for \newrobustcmd-defined commands. Two macros are defined here:
\etb@if@robustcmd<cstoken>{<true>}{<false>} checks if <cstoken> is a \newrobustcmd-defined macro, and returns the appropriate conditional branch.
\etb@copy@robustcmd<cstoken-to><cstoken-from> copies <cstoken-from> to <cstoken-to> as well as the internal structure for the case of an optional argument.
These macros do not work as a general-purpose “is this macro defined with \newrobustcmd, then copy it” because they may fail for macros with parameters, as other conditionals of the same type implemented in the LaTeX kernel. Thus the choice to make them internal macros.
This pull request adds
\NewCommandCopy
support for\newrobustcmd
-defined commands. Two macros are defined here:\etb@if@robustcmd<cstoken>{<true>}{<false>}
checks if<cstoken>
is a\newrobustcmd
-defined macro, and returns the appropriate conditional branch.\etb@copy@robustcmd<cstoken-to><cstoken-from>
copies<cstoken-from>
to<cstoken-to>
as well as the internal structure for the case of an optional argument.These macros do not work as a general-purpose “is this macro defined with
\newrobustcmd
, then copy it” because they may fail for macros with parameters, as other conditionals of the same type implemented in the LaTeX kernel. Thus the choice to make them internal macros.