I want to make a macro "\mymacro" which has two string variables and returns array.
The two variables are arbitrary string characters and has the same length.
The length of the strings are also arbitrary.
"\mymacro" returns an array whose rows are the string variables.
For example,
\mymacro{abc}{def}
should return
\begin{array}{ccc}
a&b&c\\\hline
d&e&f
\end{array}
Can I make such macro?
Thank you for your cooperation.
Best Answer
You can iterate over the list the tricky bit is to avoid adding a
&
at the end here I do add it but use\omit
to avoid generating a visible empty column (with an over-long\hline
)