Suppose I define a \newcommand
with multiple arguments, such as in this example:
\documentclass{article}
\newcommand{\testing}[9]{#1,\ #2,\ #3,\ #4,\ #5,\ #6,\ #7,\ #8,\ #9}
\begin{document}
\title{Test}
\maketitle
\begin{equation}
\testing{S_1}{S_2}{S_3}{S_4}{S_5}{S_6}{S_7}{S_8}{S_9}
\end{equation}
\end{document}
If I call the command \testings
, I have to put each separate argument inside its own curly braces (to the best of my knowledge). Is there a more efficient way to pass these arguments into the command \testings
? For example, something more along the lines of \testings{S_1,S_2,S_3,S_4,S_5,S_6,S_7,S_8,S_9}
?
Note: The example above is very simple. A more realistic example might be something like \newcommand{\limset}[3]{\lim_{#1 \rightarrow #2^{#3}}
.
\newcommand
is the most natural interface\foo(a,b,c)
is only two characters less than\foo{a}{b}{c}
and if a,b,c are really single characters\foo abc
is even shorter, so it is hard to see how significant gains could be made by changing the syntax.