![\foreach 中的交替分页符](https://linux22.com/image/361220/%5Cforeach%20%E4%B8%AD%E7%9A%84%E4%BA%A4%E6%9B%BF%E5%88%86%E9%A1%B5%E7%AC%A6.png)
我有一个列表,我想在该列表上每出现偶数项后就分页。
我该怎么做呢?
\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