cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

AG006 Bilingual Publication

ptc-1775095
1-Newbie

AG006 Bilingual Publication

Hello,

I was wondering if anybody has ever developed an AG006 PDF publication with APE (either using FOSI or XSL-FO).

The AG006 is a specification from the Canadian Department of Defense.

Basically, the principle is to publish two languages (english/french) in one document, on two columns. The difficulty is to align vertically languages content. Every content block is aligned to the other language one ; but content size is different between languages. Numbering is duplicated. For a better understanding, I have attached a sample.

From my background (several years developing publications), I know it is not an easy task and what I want to know if it is only feasible. I think I'd rather use FOSI than XSLFO for such a complexity.

Thanks for your advices !

Gilles Beaugeais.

9 REPLIES 9

It's feasible. I've seen it done, and helped maintain FOSIs that
supported it for various customers back in the 90s.



You will need to do this in a FOSI to set up the logic that keeps the
two columns in sync with one another, amongst other things. A
significant amount of algroup (side-by-side alignment) is used to do
this.



Unfortunately, that's about all I remember off the top of my head.
There may be others out there who remember more...



-Jean


Hi Gilles,

I haven't worked with AG006 specifically, but I have produced a lot of
bilingual documentation in this style for the Canadian Government. My
experience has always been with separate XML instances for the English
and French files that have been combined at publication time into a
single document where the two languages are aligned with one another.
I have always used a table for layout and it then becomes a matter of
defining the XML elements in each instance that should start a new
cell. From the snapshots that you sent, it seems that you may have
instances in which every paragraph has a corresponding paragraph in
the opposite language in which case it should not be very hard to
combine them into a single table. I would warn you though that the
documents that I've worked with do not necessarily match up exactly:
in some cases, there would be a Section 3 in English with paragraphs
a, b and c whereas the French document would have only Section 3 with
all the content contained in a single block of text. If that's the
case then it can be more complicated to come up with the formula for
building the table rows - you have to make sure that the correct
alignment points match up with each other.

Without knowing more about your particular situation I can't really
provide a lot more information and if the documents that you need to
print are in a single XML instance containing English and Frenhc then
this might not apply, but just in case it's useful; the most efficient
method that I found to solve this problem was to create an
intermediate file with a table used for the layout of the two
languages and then to parse the English and French instances in a
forward-looking XML reader (I used C#), adding a new row to the table
with each alignment point from the two documents. For one client,
this intermediate file was in WordML so that they could adjust the
document on screen before printing it out, for another client, it was
XSL-FO that was rendered to PDF with Antenna House's Formatter
product. I haven't used FOSI to produce side-by-sides of this type of
document.

I can provide more information if you're interested,

Dugald

Quoting Gilles Beaugeais <->:

> Hello,
> I was wondering if anybody has ever developed an AG006 PDF
> publication with APE (either using FOSI or XSL-FO).
>
> The AG006 is a specification from the Canadian Department of Defense.
>
> Basically, the principle is to publish two languages
> (english/french) in one document, on two columns. The difficulty is
> to align vertically languages content. Every content block is
> aligned to the other language one ; but content size is different
> between languages. Numbering is duplicated. For a better
> understanding, I have attached a sample.
> From my background (several years developing publications), I know
> it is not an easy task and what I want to know if it is only
> feasible. I think I'd rather use FOSI than XSLFO for such a
> complexity.
>
> Thanks for your advices !
> Gilles Beaugeais.
>
>
>

FOSI algroup formatting would definitely be the way to do this.
Controlling page breaks might be tricky for extremely mismatched text
formatting, but two-column algroup formatting on a single-column page
would probably work. I envision lots of pages with an unusually large
area of white space at the bottom.


It would be really ugly to edit, also, because algroup formatting does
not render on screen.


Ed is correct that algroup is not supported for Edit window display. Ideally, you should have different screen and print formatting, either in separate screen and print FOSIs, or in the same FOSI using specval and system-var. If your DTD is cooperative, suppress and savetext won't be needed, and the formatting in col1.fmt and col2.fmt can be coded directly in the first two e-i-cs.

For print/PDF output using FOSI, you need code along the lines of the following.

e-i-c gi=lang1-content-block
charlist inherit=1 charsubsetref=SUPPRESS
savetext textid=lang1-content-block.txt conrule=#CONTENT
...
e-i-c gi=lang2-content-block
charlist inherit=1 charsubsetref=SUPPRESS
savetext textid=lang2-content-block.txt conrule=#CONTENT
usetext placemnt=after source=<col1.fmt>,lang1-content-block.txt,</col1.fmt>
<col2.fmt>,lang2-content-block.txt,</col2.fmt>
...
e-i-c gi=col1.fmt
charlist inherit=1 charsubsetref=lang1-hyphenation
indent inherit=1leftind=0 firstln=* rightind=*+20pi
algroup refpoint=first
...
e-i-c gi=col2.fmt
charlist inherit=1 charsubsetref=lang2-hyphenation
indent inherit=1leftind=22pi firstln=* rightind=*+20pi
...

An e-i-c with algroup does not allow page breaks, so don't code algroup for col2.fmt. It is not necessary. Without algroup in col2.fmt,if col1 ends before col2 (col2 is deeper), a page break can occur in col2. If algroup is coded in both e-i-cs, then the whole structure is unbreakable. If it doesn't fit on the current page, it moves to the top of a new page. If the whole structure is deeper than a page, it oversets the page unless deepcontentsplitting is enabled.

It may be tempting to use gentables for this, buttables take longer to format than flowing text, and "deep" rows require the use of deepcontentsplitting.

Good luck!
Suzanne Napoleon
"WYSIWYG is last-century technology!"
www.FOSIexpert.com



Thanks for your replies.

I think I will go to FOSI and algroup feature.

The editing process does not reflect side by side content but it is not really important for my perspective.

Just for your information, data uses the DND CALS DTD. French text follows english text. Each text block contains english and/or french elements, like this for example: <para><english>English text</english><french>Texte en français</french></para>

Regards,

Gilles,

With your DTD,suppress, savetext, col1.fmt, and col2.fmt aren't necessary.The formattingfor col1.fmt and col2.fmt can be coded directly in the eics for<english> and <french>, respectively. Also,I'd move the usetext with placemnt=after to e-i-c gi=para, but I don't have a reason except symmetry 🙂

Good luck!
Suzanne


It occurs to me that if English and French need to be displayed (not edited)side by side in the Edit window, a gentable would be the way to go (with the tagged input suppresed). Formatting speed and deepcontentsplitting are irrelevant for screen FOSI formatting.

Suzanne


Hi Gilles,

I suspect you would have a very hard time doing this task in XSL-FO!

The Arbortext Advanced Print Publisher (3B2) product has exactly this
function, and is in production use by both Senate of Canada and Canada
House of Representatives (for legislative documents, obviously).

This feature handles the vertical alignments and page breaks
across two independent streams of XML content. You can align on the
same page, on facing pages, etc. Alignment points may be paragraphs,
tables, images, maths, a certain line of text, and so on.

However, Arbortext APP does not use FOSI or XSL-FO.

Cheers,
Gareth

Quoting Gilles Beaugeais <->:

> Hello,
> I was wondering if anybody has ever developed an AG006 PDF
> publication with APE (either using FOSI or XSL-FO).
>
> The AG006 is a specification from the Canadian Department of Defense.
>
> Basically, the principle is to publish two languages
> (english/french) in one document, on two columns. The difficulty is
> to align vertically languages content. Every content block is
> aligned to the other language one ; but content size is different
> between languages. Numbering is duplicated. For a better
> understanding, I have attached a sample.
> From my background (several years developing publications), I know
> it is not an easy task and what I want to know if it is only
> feasible. I think I'd rather use FOSI than XSLFO for such a
> complexity.
>
> Thanks for your advices !
> Gilles Beaugeais.
>
>
>