This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Symbols in HTML OK, PDF not OK
- From: Tristan Fiedler <fiedler at cshl dot edu>
- To: Docbook-Apps <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 5 Apr 2005 12:03:49 -0400
- Subject: [docbook-apps] Symbols in HTML OK, PDF not OK
Hi All,
I am using
<para>Here is alpha test 1 : <symbol
role="symbolfont">&agr;</symbol> </para>
<para>Here is alpha test 2 : <symbol
role="symbolfont">α</symbol> </para>
<para>Here is alpha test 3 : <symbol
role="symbolfont">&b.alpha;</symbol> </para>
<para>Here is beta test 1 : <symbol
role="symbolfont">&bgr;</symbol> </para>
<para>Here is beta test 2 : <symbol
role="symbolfont">β</symbol> </para>
<para>Here is beta test 3 : <symbol
role="symbolfont">&b.beta;</symbol> </para>
But the resulting PDF is :
Here is alpha test 1 : Î -- correct
Here is alpha test 2 : Î -- correct
Here is alpha test 3 : ## -- incorrect **
Here is beta test 1 : Î -- correct
Here is beta test 2 : Î -- correct
Here is beta test 3 : ## -- incorrect **
And the resulting HTML is :
Here is alpha test 1 : Î -- correct
Here is alpha test 2 : Î -- correct
Here is alpha test 3 : ð -- incorrect, this is an uppercase A in a box
Here is beta test 1 : Î -- correct
Here is beta test 2 : Î -- correct
Here is beta test 3 : ð -- incorrect, this is an uppercase A in a box
The character entities in the DocBook XML 'ent' directory show :
isogrk4.ent:<!ENTITY b.alpha "𝛂" ><!--MATHEMATICAL
BOLD SMALL ALPHA -->
isogrk4.ent:<!ENTITY b.beta "𝛃" ><!--MATHEMATICAL
BOLD SMALL BETA -->
My XSL customization layer for PDF :
<xsl:param name="symbol.font.family" select="'Symbol,
ZapfDingbats'"></xsl:param>
<xsl:template match="symbol[@role = 'symbolfont']">
<fo:inline font-family="Symbol,ZapfDingbats">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
From previous postings, a list of fonts (e.g. Symbol,ZapfDingbats) in
the font-family property doesn't work in FOP yet, and I must specify a
single font-family.
Software: Mac OSX, Docbook XSL 1.67.2, Docbook XML 4.4CR2, Saxon 6.5.3,
FOP 0.20.5,Firefox 1.0.2, and Adobe Acrobat Reader 7.0.
Is the reason that b.alpha and b.beta don't properly convert because
neither the Symbol, nor the ZapfDingbats fonts contain the x1D6C2 nor
x1D6C3 ?
('agr' and 'alpha', likewise 'bgr' and 'beta' are the same, and both
indeed appear in the Symbol font as x03B1 and x03b2)
So, how can one display the b.alpha and b.beta ?
Thank you,
Tristan
----
Tristan J. Fiedler
Postdoctoral Fellow - Stein Lab
Cold Spring Harbor Laboratory