[Top][All Lists]

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

Re: [Groff] parallel text processing ; vertical and horizontal mode

From: Ted Harding
Subject: Re: [Groff] parallel text processing ; vertical and horizontal mode
Date: Wed, 06 Sep 2017 18:20:33 +0100

     A. On Wed, 2017-09-06 at 18:13 +0200, E. Hoffmann wrote:
> Hello *roffers.
> Excuse me if this question has been answered zillions of time,
> or if it is all absurd, but I don't find an answer ...
>    I want to typeset parallel texts, like a translation, the original
> *always* in the left column, the translation *always* right.  TeX has
> the "parallel" package which does exactly that.
>    Is a thing like that possible in groff, any macro package?
> Moreover, is a thing possible not to have vertical columns, but
> horizontal texts, above and below, like
> page 1               page 2
> aaaaaaaaaaaaaaa      ...aaaaaaaaaaaa
> aaaaaaaaaaaaaaa...   aaaaaaaaaaaaaaa
> ---------------      ---------------
> bbbbbbbbbbbbbbb      ...bbbbbbbbbbbb
> bbbbbbbbbbbbbbb...   bbbbbbbbbbbbbbb
> What would I have to learn to write a page trap macro or a diversion
> &c. to get this effect?  Perhaps a modification of footnotes?
> Cheers, Erich

I'm not aware of any groff macros that cope with this. You've
probably been there too, but I've done this kind of formatting
a number of times (including translations) by what are essentially
bare-hands methods.

Essentially, I open two-column mode (e.g. '.2C' in ms macros),
and put each sentence or paragraph (etc.) of the original text
in the left-hand column, and its translation in the right-hand
column. They will be alighned so that the first lines of each
are in the same vertical position. This may involve moving one
or the other down by a manually-determined vertical space.

In terms of input text, the first column of the original is
input first, followed by the first column of the translation
(preceded by a macro which forces the translation to spill into
the second column, such as '.ne NN' in ms macros, where "NN" is
more space than is available in the first column).

How you determine where to set the bottom end of the first
and of the second columns is essentially an empirical matter.
The way I do it is to work down item by item until one of the
two columns is about to break in the middle of the item (i.e.
not enough space left for it in the current column), and then
a page-break is inserted and both items are carried over to
the next page (with again a '.ne ...' or similar to force
the translation into the secnd column).

Tedious at times, but it works! And, as I suspect, you have
probably done much the same yourself.

In the case of poetry, it is much more straightforward, since
each verse and its translation will have the same number of lines.

It's a while since I last did this, but if an example is needed
I could grope back into my archives and find one (that might
take a little time ...).

Best wishes,

reply via email to

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