On 26 March 2012 07:12, Gour <[email protected]> wrote:
> Hello!
>
> I did resolve my problem of getting all the required glyphs in PDF
> generated from AsciiDoc via dblatex, but considering there are not so
> many complete Unicode fonts covering all the symbols which we might
> regularly need, I wonder if there is some easy way to mix e.g two fonts
> within AsciiDoc document - one would be used for regular text and
> another when we need to display different symbols from the specialized
> 'symbol font' having all the required glyphs?
>
> One way would be, I assume, to use monospaced text and select Symbol
> font as 'monospaced' font, but I wonder if there is something else?
>
> I've asked the same thing in the dblatex thing and the answer was to use
> some trickery in the xetex file or to use something like:
>
> For instance, tag the text with
> <phrase xml:lang='ben'>...</phrase>,
> and create an xsl transform something like
> <xsl:template match="phrase[lang='ben']">
> <xsl:text>\benBengScript{</xsl:text>
> <xsl:apply-templates/>
> <xsl:text>}</xsl:text>
> </xsl:template>
>
>
> but I wonder if there is some mechanism to mix fonts within AsciiDoc
> document?
>
Hi Gour,
Docbook, and therefore asciidoc is a *content* markup, not a
presentation markup. So asciidoc doesn't know anything about fonts or
other presentation information. This is what allows the same content
to be used to generate lots of differing output formats. Each output
processor can perform its own formatting, but each has also chosen its
own method of customisation. So Asciidoc would have to have special
customisations for each toolchain if it was to specify presentation
and that is beyond its scope.
If only they had all chosen CSS <sigh/> :)
But the docbook "role" attribute is intended to mark items that have
particular semantics. The toolchains usually can be configured to
render these differently, eg in a different font. But you would still
have to do something like that suggested by the dblatex folks to
configure their toolchain to do so, eg something like:
<xsl:template match="phrase[@role=symbols]">
<xsl:text>\benBengScript{</xsl:text>
<xsl:apply-templates/>
<xsl:text>}</xsl:text>
</xsl:template>
Role can be specified as an attribute on most blocks eg paragraphs and
can be applied to a piece of text within a paragraph with unquoted
quotes, see http://www.methods.co.nz/asciidoc/userguide.html#X51.
Cheers
Lex
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.