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...\ExplSyntaxOffat all there? – Mar 24 '17 at 13:57\def\lip|#1|#2|#3|#4{#1^#2, #3^#4}, then\def\slip|#1|#2|#3|#4{\eset{#1^#2, #3^#4}}? – Steven B. Segletes Mar 24 '17 at 14:02\lipcommand is way more complicated than that :p – Fabian Pijcke Mar 24 '17 at 14:05\slip{ |a| {1} |b| {2}}\]? – Mar 24 '17 at 14:09\slipthere's not much that can be done other than repeat the definition. – Mar 24 '17 at 14:16