[Home] [By Thread] [By Date] [Recent Entries]
On 14-02-07 12:57 PM, Tony Graham wrote:
On Fri, February 7, 2014 6:43 pm, Martin Holmes wrote: ...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 Unfortunately I'm using XEP, which doesn't appear to support flow-maps.
I've just been looking at it -- very intriguing. The Print and Page Layout Community Group @ W3C [3] has an extension function for use with Saxon or Xalan and either FOP or Antenna House that runs the XSL-FO formatter within the XSLT transform so you can make decisions based on formatted sizes as you go. That would give you the flexibility to format each paragraph pair in turn to work out their sizes, which could make things simpler or harder, depending on how you approach it. This does seem very promising, but the rest of the web application I'm working with is dependent on XEP, and I don't think FOP yet supports some of the features I'm depending on XEP for (although it's a good while since I've done a detailed test of this). I have no funding to buy into the AH Formatter (and the price is frankly jaw-dropping for an academic user) so it would have to be FOP. 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. Cheers, Martin
|

Cart



