[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSL:FO approach for facing-page translation

Subject: Re: [xsl] XSL:FO approach for facing-page translation
From: Martin Holmes <mholmes@xxxxxxx>
Date: Fri, 7 Feb 2014 14:30:34 -0800

On 14-02-07 01:52 PM, Graydon wrote:
On Fri, Feb 07, 2014 at 01:41:54PM -0800, Martin Holmes scripsit:
I'm beginning to wonder about a far cruder approach: render both
languages and see which is longer, then implement hard page-breaks
in both versions at the point the longer one would break. Then run
XSLT to interleave the two versions to create a continuous document.
Very fragile, of course, and likely to require a lot of tinkering,
but it would work.

If you're going crude, maybe do the first pass with a double-length page -- the flow should take arbitrary page lengths just fine -- and issue each original-translation pair of paragraphs inside a block container set to keep-together-within page, so you're sure you're getting things in units of facing pages?

Then the second pass takes each double sized page and splits the
languages recto-verso onto the proper page size, with the spacing down
the page set based on whichever of the two languages was longer?

It might be less fragile than all those hard page breaks.

Indeed -- that's a very good idea. Thanks!

-- Graydon

Current Thread