Re: plain TeX: different \hsize and \vsize for odd and even pages (was: plain TeX: different margins for odd and even pages)
Jim Diamond <[email protected]> Wed, 8 Apr 2026 18:29:42 -0300
| Newsgroups | gmane.comp.tex.texhax |
|---|---|
| Message-ID | <adbIxnHAHx69/[email protected]> |
On Wed, Apr 8, 2026 at 21:34 (+0100), David Carlisle wrote:
>> \global\hsize=\oddhsize
> yes but only if, as in your example, all page breaks are forced.
> if you have any paragraphs breaking over a page (as happens in most documents) that doesn't really work, as a paragraph is broken in to lines with a fixed \hsize (the value in force at the end) so to change hsize mid paragraph you need to guess how many lines are in the first page, then set up a parshape that uses one linewidth for that many lines and then the hsize for the remaining lines for the new page.
David (et al),
I haven't looked at output routines in a long time, but as I recall the
leftover paragraph bit (after the paragraph has been split) becomes the
first \vbox contribution for the new page.
As you say, it has been set with a particular \hsize.
But is there not some unbox trickery which can be used to create a new
paragraph out of the leftover bit?
I suspect the unboxing may (or may not) lose some glue explicitly applied,
but if the OP's paragraphs are just plain text (sequences of words), and
not fancy constructions or math, is this something which might work?
The last 5 or 6 pages of Chapter 15 of The TeXbook might be of interest to
anyone who wants to try this out.
Jim