[texhax] How to align paragraphs on verso with paragraphs on facing recto page?

Jay Hammond homemade at talktalk.net
Fri Dec 14 19:44:11 CET 2007


On 14 Dec 2007 at 11:23, Matthew Leingang wrote:

> 
> On Dec 14, 2007, at 6:19 AM, Niall Mansfield wrote:
> 
> > How can I align paragraphs on the verso with paragraphs on the
> > facing recto page, like this:
> >
> >           verso               recto
> >     +------------------+------------------+
> >     | one one one on-  | 1111111 1111     |
> >     | e one one one    | 1111 1111 1111   |
> >     |                  | 1111             |
> >     |                  |                  |
> >     | two two two tw-  | 222              |
> >     | o two two two    |                  |
> >     | two              |                  |
> >     |                  |                  |
> >     | three three th-  | 3333333 33333 33 |
> >     | ree three three  | 333 3333 3333 33 |
> >     |                  | 333333 3333 3333 |
> >     |                  | 333 33333 333333 |
> >     |                  |                  |
> >     | four four four   | 444 4444         |
> >     | four             |                  |
> >     +------------------+------------------+
> 
> Greetings,
> 
> That is an interesting problem.  Here's why it's hard:  TeX parses 
> the input as a single stream of tokens.  It basically converts the 
> tokens into words, words into lines, then lines into  pages.  At the
> end of each page it forgets everything (jh*) and starts over with a new
> page.
> 
> If you wanted your two columns to be on the same page, then I would 
> use a table, kind of like old-school HTML hacks.  The array package 
> would extend the tabular environment enough to get what you
> wanted.
> 
> But on different pages?  You would need to alter TeX to ship out two
> pages at a time instead of its usual one.  As well as remember the 
> heights of each paragraph.  And how would it decide where to place 
> the page breaks?
> 
> Sorry to be unhelpful, but the problem gives me a popsicle
> headache.
> 
> --Matt

I think Matt has the right ideas, he's just not optimistic enough.


I'm an amateur. Not a TeXnician. Two thoughts occur. 
1) It might still  be possible to rewrite the output routines - 
chapter 23 TeXbook. My * reminds me to say that all the material that 
has been shipped out is what is forgotten. TeX does not really forget 
"everything" .  Material that has not appeared on a page (yet) is not 
necessarily discarded. Output routines are hard to modify. Better 
TeXxies than I have modified output routines for indexing to prepare 
material for the next page during  the current page  and then used it 
later. 

2) A better idea, (also from Matt...)

Since this design is verso - recto you _could compose each such 
spread as a single  TeX page. You might need to do a separate run 
with "normal" page sizes for the front  and back matter, possibly 
also the  introduction & conclusion if they don't share this special  
layout.  You'll need to think about cut-marks and binding margins, 
but this approach looks a lot easier to me than messing with output 
routines.

Good luck.

Jay
 
> --
> Matthew Leingang
 

Jay Hammond
homemade at homemade.free-online.co.uk


More information about the texhax mailing list