Label and non-plain text arguments
I have a custom macro:
\NewDocumentCommand\includefigure{mo}{
...
\label{fig:#2}
}
The optional argument is used for the caption and the label. The problem
is that when I have parts of this argument formatted like
\includefigure{pic}[Hi \textit{there}!] I get errors like "Missing
\endcsname inserted." since \label does not allow arguments with commands
in it.
Is there a meta-command like \plaintext so
\label{\plaintext{\textit{bla}}} would result in \label{bla}.
Or maybe there is an alternative for label.
No comments:
Post a Comment