How to only \include as much data as fits on a single page in ConTeXt? 3m
由 Village 通过 Recent Questions - TeX - LaTeX Stack Exchange
翻译文章
I need to \include data from several different files, showing the contents of each file on a separate page (e.g. file1.tex on page 1, file2.tex on page 2), but cut off any extra data if the contents of the files does not fit into just one page.
I have a simple ConTeXt document like this:
\starttext \subject{File 1} \startitemize[n] \input file1 \stopitemize \pagebreak \subject{File 2} \startitemize[n] \input file2 \stopitemize \pagebreak \subject{File 3} \startitemize[n] \input file3 \stopitemize ... \stoptext
Each file contains items, with \item in front of each line. For simplicity, here is a sample contents of file1.tex (and the same in the other files):
\dorecurse{100}{\item hello}
Normally, ConTeXt will include the file, and then wrap the next items to the next page. In the example above, it gets to item #23, then puts #23-100 on later pages. If item #23 was a longer paragraph, split between pages, it should cut off at #22 (never splitting an item up).
The contents of the included files is automatically generated data, but I only want as much that fits to appear on the page, any extra data is too much data and is to be thrown away and doesn't need to be reported.
How can I get ConTeXt to just stop at item #23, the last item to fit on the first page, and stop including the rest of the document, and just to go to the next page?


雷达卡
京公网安备 11010802022788号







