我有一个列表,我想在该列表上每出现偶数项后就分页。
我该怎么做呢?
\documentclass{article}
\usepackage{ifthen}
\usepackage{pgf}
\usepackage{pgffor}
\begin{document}
\foreach \x in {1,...,20}
{\x \linebreak}
% I want to divide each \x by 2
% If the remainder is 0 then insert \pagebreak, else nothing.
\end{document}
答案1
\ifodd\x\relax\else\pagebreak\fi