I have a macro \lip
defined with xparse which takes several arguments.
I would like to define some macro \slip
which applies macro \eset
after macro \lip
.
Is there a way to define \slip
without defining a new macro with as many arguments as \lip
and passing them to this latter command?
\documentclass{article}
\usepackage{xparse}
\newcommand{\eset}[1]{\mathchoice{\left \{#1\right \}}{\{#1\}}{\{#1\}}{\{#1\}}}
\ExplSyntaxOn
\NewDocumentCommand \lip { D||{A} m D||{B} m } {
#1^#2, #3^#4
}
\ExplSyntaxOff
% How can I define slip without the xparse boilerplate?
\ExplSyntaxOn
\NewDocumentCommand \slip {D||{A} m D||{B} m } {
\eset{\lip |#1| {#2} |#3| {#4}}
}
\ExplSyntaxOff
\begin{document}
\[\lip |a| {1} |b| {2}\]
\[\slip |a| {1} |b| {2}\]
\end{document}
\ExplSyntaxOn...\ExplSyntaxOff
at all there?\def\lip|#1|#2|#3|#4{#1^#2, #3^#4}
, then\def\slip|#1|#2|#3|#4{\eset{#1^#2, #3^#4}}
?\lip
command is way more complicated than that :p\slip{ |a| {1} |b| {2}}\]
?