[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Multiple languages in PDF?
hi,here is a n example of how I generate English/Chinese/Pinyin in a docbook text: works perfectly
**************** <tbody> <row> <entry><foreignphrase xml:lang="cmn-Latn-pinyin">WÇ kÇolÇ kÇolÇ.</foreignphrase>
</entry> </row> <row><entry><foreignphrase xml:lang="cmn-Hani"
>æèçèçã</foreignphrase></entry> </row> <row><entry>I'll think it over. (non-committal)</entry>
</row> <row><entry><foreignphrase xml:lang="cmn-Latn-pinyin" >FÄichÃng hÇo.</foreignphrase></entry>
</row> *************** I use a customization part in : xls/fo/docbook_custom.xslIt can be another name or location (I use oXygen editor), but the principle is here
*************** <xsl:template match="d:foreignphrase[@xml:lang='cmn-Hani']"> <!--<fo:inline font-family="UKIJ CJK"> --> <fo:inline font-family="NotoSansCJKjp-Light"><!--<fo:inline font-family="AR PL KaitiM GB"> jolie fonte mais moins lisible--> <!--<xsl:attribute name="background-color">#FFFFFF</xsl:attribute> -->
<xsl:attribute name="color">#FF0000</xsl:attribute> <xsl:attribute name="font-size">1.3em</xsl:attribute> <xsl:call-template name="inline.charseq"/> </fo:inline> </xsl:template> <xsl:template match="d:foreignphrase[@xml:lang='cmn-Latn-pinyin']"> <fo:inline> <xsl:attribute name="color">#0000FF</xsl:attribute><!--<xsl:attribute name="background-color">#FFFF00</xsl:attribute>-->
<xsl:call-template name="inline.charseq"/> </fo:inline> </xsl:template> ***************link to the document I'm editing at the moment (not finished, there are 1400 pages min) :
https://git.yojik.eu/eric/FSI-Chinese-docbook/src/master/out/pdf/FSI-Chinese.pdf Best regards Eric Le 22/12/2021 Ã 04:01, M. Downing Roberts a ÃcritÂ:
I'm back with another question.I'd like to combineÂEnglish and Japanese text in a single book. I can set the @lang attribute on various elements, but the problem is that I need to switch fonts, too. The font that I want to use for body text doesn't include Japanese characters. I'm not sure how to embed Japanese text within a <para> of English and get it to render properly. E.g.:<para>The HÅjÅki [æäè] is an important and popular short work of the early Kamakura period.</para>It seems like I need something akin to <span lang="ja"> to mark the Japanese text, and then a customization in the stylesheet to detect this and specify a suitable font. However, I'm not sure how I should handle either ofÂthese issues.I would also like to specify a different font for the <subtitle> element. I've tried this customization:<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode"> <fo:block xsl:use-attribute-sets="section.titlepage.recto.style" font-family="Hiragino Mincho ProN"> <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="subtitle" mode="titlepage.mode"> Â <fo:block font-family="Hiragino Mincho ProN"> Â Â <xsl:apply-templates mode="titlepage.mode"/> Â </fo:block> </xsl:template>...but it seems to have no effect. The font is not found, though it is installed on my machine.What am I doing wrong? What's the best way to approach this? Thanks! M.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]