Re: Language support in XSL-FO Stylesheets
Mike Maxwell <[email protected]> Thu, 23 Jun 2022 12:22:07 -0400
| Newsgroups | gmane.text.docbook.apps |
|---|---|
| Message-ID | <[email protected]> |
This is probably not relevant to your cases, but we typeset and
published (through Mouton) a number of grammars ten or so years ago,
where the languages being described had unusual scripts: Western Panjabi
(Nasta'liq variety of Arabic script, hence right-to-left), Bangla
(Bengali script), and Dhivehi (Thaana script, also right-to-left), and
Pashto (Naskh variety of Arabic script). But we were using dblatex
(http://dblatex.sourceforge.net) to convert our DocBook source to
XeLaTeX (a Unicode-aware version of LaTeX).
Mike Maxwell
University of Maryland
On 6/23/2022 10:35 AM, M. Downing Roberts wrote:
> Hi Frank,
>
> I can't add much except to say that I also hit a wall trying to generate
> a bilingual book (English and Japanese), and the index in particular was
> very difficult.
>
> I got some help from Bob Stayton, but the only solution was a hack to
> generate the index using another application that I wrote, which
> massaged the XSL-FO.
>
> The problem, including more detail from Bob, is recorded in this GitHub
> issue: https://github.com/docbook/xslt10-stylesheets/issues/238
> <https://github.com/docbook/xslt10-stylesheets/issues/238>
>
> All best,
>
> M. Roberts
>
> On Thu, Jun 23, 2022 at 11:07 PM Frank Steimke
> <[email protected]
> <mailto:[email protected]>> wrote:
>
> Dear List Members,
>
> i had already sent this to the docbook List, but probably this list
> docbook-apps fits better.
>
> I am using DocBook for a bi-lingual book. Most of the content is
> written in english, but parts are written in the german language.
> PDF is produced with XSL Stylesheets 1.79.2 shipped within Oxygen 24
> and the Antenna House Formatter v7.
>
> Since most content is english, /book/@xml:lang is 'en'. Fragments in
> german have @xml:lang='de' at the appropriate level, e. g. for
> section or note elements. Sometimes i have phrase or emphasis
> elements only because of the @xml:lang attribute.
>
> Observation is, that hyphenation is wrong in the PDF Document for
> the german fragments. I think i have found the reason, but i am
> puzzled. There are two issues which i can't understand:
>
> 1) There is a template named "language.attribute" in I10n.xsl. It
> calculates the language value looking at the ancestor axis, and
> emits an attribute named @lang with that value. *First Issue: *the
> name of the attribute is wrong, the correct name is @language. See
> section 7.10.2 "Language" <https://www.w3.org/TR/xsl11/#language>
> in Extensible Stylesheet Language (XSL) Version 1.1.
>
> 2) The template named "language.attribute" is rarely used. *2nd
> Issue: *I had to create a customization layer for the templates that
> matches d:para or d:simpara, which do emit an fo:block element, so
> that they call the language.attribute template. Same for d:phrase
> and d:emphasis in inline.xsl
>
> Maybe i have missed something obvious. Are there any reasons for
> this lack of language support?
>
> Sincerely, Frank Steimke
>
--
This email has been checked for viruses by AVG.
https://www.avg.com