LaTeX package: multido

提供 \multido, 方便实现循环. 使用语法 \multido{ variables }{ repetitions }{ stuff }
\begin{picture}(8,1)(0,-.5)
 \put(0,0){\vector(1,0){8}}
 \multido{\i=0+1,\n=0+0.25}{8}{%
   \put(\i,-.1){\line(0,1){.2}}
   \put(\i,-.2){\makebox(0,0)[t]{\n}}}
\end{picture}
\multido{}{10}{\TeX}
\multido{\d=2pt+3pt}{5}{\d, }
\multido{\n=2+3}{10}{\n, }
\multido{\i=2+-3}{10}{\i, }
\multido{\r=2+.305}{6}{\r, }
\multido{\n=2.00+-3.05}{8}{\n, }

No comments: