groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Aligning Poetry on Facing Pages


From: brian m. carlson
Subject: Re: [Groff] Aligning Poetry on Facing Pages
Date: Tue, 11 Aug 2009 19:04:30 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Aug 11, 2009 at 02:08:23PM -0400, Paul O'Leary McCann wrote:
> If you take a look at some of the sections, you'll notice that (using
> frames) lines from different fragments are laid out opposite each other.
> 
> In print this would mean that each line would have a mate on the facing
> page. Since the lines are not generally the same length, I have trouble
> figuring out how I'd manage to do this in groff. I've come up with some
> ideas, but they're all more sophisticated than anything I've done
> before. 
> 
> Has anyone ever done anything like this? What's a good way to accomplish
> this? -POLM

The immediate way that comes to mind for me is to use diversions.
Create a macro for something on the left page and one for something on
the right page.  Interleave the lines (.LEFT Let foo... and .RIGHT For
foo...).  You can have the LEFT macro determine where the line is on the
page and then have the RIGHT macro move to that position within the
diversion (and output into the diversion).  When you get to the bottom
of the page, have a trap that outputs the diversion and then breaks the
page.

This is just an idea; there's probably a different way to do it.  The
code itself is left as an exercise.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]