Support repeat/logic control for `newcommand` extension
I want to simulate some commands which supported by amsmath package, but without logic control, it won't be possible, so I wonder is there any way to do this, or will you add this feature?
Syntax might like this:
\newcommand\hdotsfor[1]{%
\foreach \index in {1, ..., #1} {%
\ifnum\index!=1{$} \cdots %
}}
Invoke \hdotsfor{3}
will get:
$$
\cdots & \cdots & \cdots
$$