楼主: oliyiyi
89225 2410

【latex版】水贴   [推广有奖]

2331
oliyiyi 发表于 2019-5-3 10:44:29
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?

2332
oliyiyi 发表于 2019-5-4 20:24:11
Statistical Analysis with Missing Data, 3rd Edition

2333
oliyiyi 发表于 2019-5-4 20:24:31
Statistical Analysis with Missing Data, 3rd Edition

2334
oliyiyi 发表于 2019-5-4 20:25:19
Statistical Analysis with Missing Data, 3rd Edition

2335
oliyiyi 发表于 2019-5-4 20:25:56
Statistical Analysis with Missing Data, 3rd Edition

2336
oliyiyi 发表于 2019-5-4 20:39:56
Statistical Analysis with Missing Data, 3rd Edition

2337
oliyiyi 发表于 2019-5-5 08:27:12
Statistical Analysis with Missing Data, 3rd Edition

2338
oliyiyi 发表于 2019-5-5 08:29:07
Statistical Analysis with Missing Data, 3rd Edition

2339
oliyiyi 发表于 2019-5-5 08:35:59
Statistical Analysis with Missing Data, 3rd Edition

2340
oliyiyi 发表于 2019-5-5 20:16:39
Statistical Analysis with Missing Data, 3rd Edition

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-26 22:12