I have a mathematical symbol with 6 labels but there are multiple conventions for displaying such a symbol. One way would be [F^{abc}_d]_{ef}
but other people use, e.g., [F^{abc}_d]^{e}_{f}
or other forms. Since I'm at the start of writing a thesis I'd prefer not to make an absolute choice and decided to define a command with 6 labels as input such as
\newcommand{\F}[6]{[F^{{#1} {#2} {#3}}_{#4}]^{#5}_{#6}}
but then I have to type \F{a}{b}{c}{d}{e}{f}
which is a bit cumbersome. Is there any way that I could call the new command using a comma separated list, e.g. \F{a,b,c,d,e,f}
, instead of the standard way??
Best Answer
The
listofitems
package can parse lists, using a comma (default) or other designated tokens.Note that your list will need at least 5 commas, or an error will occur when calling
\Fvar[6]
.