Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uakari.primate.wisc.edu!sdd.hp.com!mips!spool.mu.edu!munnari.oz.au!uhccux!uhunix2.uhcc.Hawaii.Edu!julian From: julian@uhunix2.uhcc.Hawaii.Edu (Julian Cowley) Newsgroups: comp.text.tex Subject: Re: TeX bug or feature? Message-ID: <13067@uhccux.uhcc.Hawaii.Edu> Date: 16 May 91 08:02:11 GMT References: <13021@uhccux.uhcc.Hawaii.Edu> <1991May15.223441.23055@csrd.uiuc.edu> Sender: news@uhccux.uhcc.Hawaii.Edu Organization: University of Hawaii at Manoa Lines: 41 Victor Eijkhout writes: >julian@uhunix2.uhcc.Hawaii.Edu (Julian Cowley) writes: >>Can anyone explain to me why TeX sets \pagegoal to the g present >>at the end of the page breaking algorithm rather than the g for >>the best break? >The \pagegoal is set to the \vsize when the first nondiscardable item is >added to the current page. After that it doesn't change, except when an >insertion occurs: rather than adding insertions to the \pagetotal they >are subtracted from the \pagegoal, which makes sense, because the text of >the page has to fit in \vsize so why not decrease that? That does make sense, but really what I was after is the height of all insertions present when the \output routine is called. >>% t=1066.0 plus 17.0 minus 12.0 g=1063.1112 b=1 p=100 c=201 > ^^^^ >>% split254 to -16.83324,12.0 p=-10000 > ^^^^ >>% t=1078.0 plus 17.0 minus 12.0 g=1051.1112 b=* p=0 c=* > ^^^^ >And this looks like a split insertion, leaving 12pt (that is, one line) to >be placed on the current page. Beats me how you can force to split to a >negative value, but hey, they're your macros. >Anyhow, the \pagegoal is again diminished by 12pt. And that's the problem. To get the height of all insertions, I expected to use \vsize - \pagegoal, but since \pagegoal is set to something different, I got the wrong answer. However, I've since discovered that I can use the height of \box255, since that's what TeX uses as the final page height sans insertions. In my subject line I contemplated it being a bug, but now I'm not so sure of myself since TeX has been working that way for quite some time without much outcry from users. But, it's something that I wish Knuth had taken into consideration when he decided to make all the \page* primitives available. Julian Cowley / U. of Hawaii at Manoa | "God is love." -- John, c. 60 A. D. julian@uhunix.uhcc.hawaii.edu | "All you need is love." -- John, 1967