\newcounter{x}
\forloop{x}{0}{\value{x} < 5}{
value is \value{x} \\
}
如何從 for 迴圈內部列印 x 的值?
答案1
\documentclass[12pt]{article}
\usepackage{forloop}
\begin{document}
\newcounter{x}
\forloop{x}{0}{\value{x}<5}{\noindent value is \arabic{x}\\}
\end{document}