TeX 在決定如何將其切割成頁面之前,已經準備好了「galley」(未中斷的段落和間距列)。它總是完成一個段落,然後測試 galley 中的所有內容是否加起來構成一個頁面,雖然它試圖合理猜測何時觸發頁面切割,但這些猜測並不完全準確:為了獲得欄平衡、腳註、交叉引用、圖表和側邊欄以及一致的頁尾,我們通常必須嘗試較短的 galley 切割長度。因此,當新頁面開始時,它的 galley 中可能已經堆積了大量的文字、圖表和腳註。
當一個段落開始時(您必須添加額外空間的地方),\pagegoal 和 \pagetotal 是已知的,但實際上,它們只是猜測,程序不知道例如頁面上可能會添加什麼圖片,或者是否有任何調用來拉伸任何可伸縮的內容。
是的,應該可以使其關閉部分頁面,但可能無法手動完成。還有一些副作用可能會非常麻煩。
我剛想到另一個選項是使用可伸縮間距,有點像這樣:
Stretch to page height{
{figures}
Stretch to 35 normal lines{
{Intro paragraph (13.4 normal lines)}
{stretchy bit}
{main text (21 lines)}
}
{stretchy bit}
{footnotes}
}
(新部分是中間部分的「Stretch to 35 lines」,當然「35 lines」需要根據未拉伸的文字運行長度來計算。)
@Martin_Hosken 可能想評論一下為什麼這是一個愚蠢的想法。
TeX has the ‘galley’ (uninterrupted column of paragraphs and spacing) all prepared before it decides how it will chop it into pages. It always finishes a paragraph before it tests to see if everything in the galley adds up to make a page, and while it tries to make a reasonable guess about when to trigger the page-chopping, those guesses aren’t fully accurate: to get column balancing, footnotes, cross-references, figures and sidebars and consistent end-of pages, we often have to try shorter cut-lengths of galley. Thus a new page might have quite a pile of text, figures and footnotes waiting in it’s galley as it starts.
When a paragraph is started (the point in which you’d have to add extra space) the \pagegoal and \pagetotal are known, but really, they are only guesses, and the program doesn’t know e.g. what pictures might be added on top of the page, or if there will be any call to stretch anything that’s flexible.
Yes, it should be possible to make it close out the partial page, but probably not manually. There are also some side effects that might be a complete pain.
It has just occurred to me that one other option would be to use stretchable spacing, a bit like this:
Stretch to page height{
{figures}
Stretch to 35 normal lines{
{Intro paragraph (13.4 normal lines)}
{stretchy bit}
{main text (21 lines)}
}
{stretchy bit}
{footnotes}
}
(The new bit being the ‘Stretch to 35 lines’ for the middle section, and of course the ‘35 lines’ would need to be calculated based on what the un-stretched length of the text run is.)
@Martin_Hosken might want to comment about why this is a silly idea, though.
機器翻譯自 English