[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL:FO approach for facing-page translation

Subject: Re: XSL:FO approach for facing-page translation
From: Martin Holmes <mholmes@xxxxxxx>
Date: Fri, 07 Feb 2014 12:52:42 -0800
 Re: XSL:FO approach for facing-page translation
On 14-02-07 11:04 AM, Michael MC<ller-Hillebrand wrote:
Hi Martin,

I am not sure if it is possible to have two separate flows, one for recto and the other for verso pages.

If this is possible, then I would try a two-column table where each column has the width of the regular text. This should force the formatter to adjust the cell height according to the longer of both paragraphs. In the source language flow you would make sure to position the table in a way so that the source language is in the regular position, the target language should print white or transparent (and be mostly off the page). In the target language flow you do the opposite.

I saw something like this in a DTP program.

This is a very cunning strategy that hadn't occurred to me. It might be the simplest way to go (and the easiest thing to test), assuming my ancient version of XEP doesn't balk at half of each table being off the page.


Cheers,
Martin


- Michael


Am 07.02.2014 um 19:43 schrieb Martin Holmes <mholmes@xxxxxxx>:

Hi all,

I have an interesting problem to solve with an edition of a source text which has an accompanying translation.

The text is in paragraphs, with each paragraph in the original matching one in the translation. In XHTML, I'm easily able to render the two texts in a borderless table, with a row for each paragraph, giving a nice readable parallel-text view.

I need to do something similar in PDF, using XSL:FO. The ideal would be to have the original text on the verso page, with the equivalent translation on the facing recto. But I can't figure out a practical approach to this. For one thing, I don't see how I can render individual pages from one text and then the other text in alternating fashion, and for another, I don't see any way to keep the two texts in sync. I can disallow page-breaks within paragraphs, but I'd have to be extraordinarily lucky for the two texts to end up breaking at the same points every time; it would just take one slightly-shorter paragraph on one side to put them out of sync by a paragraph. Such a strategy would also be rather a paper-waster, because many pages would have a lot of blank space at the bottom.

Has anyone every done anything like this, and if so, do you have any advice? I can imagine that it might be done in a horribly manual fashion by trial and error, working page-by-page, but I really don't want to get into that. I'm happy to pre-process the text multiple times before it goes to the XSL:FO stage., Perhaps there are ways to measure (for instance) how much space a paragraph will take, and then adjust page-margins or spacing by small increments to preserve alignment between the two texts, but I haven't seen examples of such an approach.

All advice much appreciated.

Cheers,
Martin


-- Michael MC<ller-Hillebrand mmh@xxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.