My solution was:
- edit lang.xsl file from dblatex
- add to ~/asciidoc/a2x.conf: DBLATEX_OPTS = '-b xetex'
I have edited `lang.xsl` like this:
<!--
<xsl:param name="xetex.font">
<xsl:text>\setmainfont{DejaVu Serif} </xsl:text>
<xsl:text>\setsansfont{DejaVu Sans} </xsl:text>
<xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
</xsl:param>
-->
<xsl:param name="xetex.font">
<xsl:text>\setmainfont{FreeSerif} </xsl:text>
<xsl:text>\setsansfont{FreeSans} </xsl:text>
<xsl:text>\setmonofont{FreeMono} </xsl:text>
</xsl:param>
And I have added to my ~/asciidoc/a2x.conf:
DBLATEX_OPTS = '-b xetex'
I don't know what effect it will have using xetex instead of pdftex
(default) :)
But it will be a problem of an other day :D
Thanks!
Em quarta-feira, 10 de dezembro de 2014 16h46min10s UTC-3, Eduardo Santana
escreveu:
>
> i also got this reply from dblatex mail-list:
>
>
> `dblatex -t pdf -b xetex yourinput.xml' should produce these glyphs in the
> pdf output just fine, no?
> at least if you tell `dblatex' to use a font containing these glyphs. the
> standard font family (DejaVu) seems
> not to contain them.
>
> but I know for a fact the the `FreeType' fonts do. so install these and put
>
> <xsl:text>\setmainfont{FreeSe
> rif} </xsl:text>
> <xsl:text>\setsansfont{FreeSans} </xsl:text>
> <xsl:text>\setmonofont{FreeMono} </xsl:text>
>
> in your xsl user stylesheet (the one which you pass to dblatex with the
> `-p' option). as I have seen your question
> on the asciidoc list as well: you might just copy the global
> asciidoc-dblatex.xsl to `~/.asciidoc' and edit it accordingly
> if you are calling `dblatex' via `a2x'. I believe `a2x' will then
> recognize it.
>
> hth
> joerg
>
>
> Em domingo, 30 de novembro de 2014 08h23min19s UTC-3, jvdh escreveu:
>>
>>
>>
>> On Saturday, 29 November 2014 23:13:42 UTC+1, Eduardo Santana wrote:
>>
>> Hi, I'm producing books for distance learning. And I would link to use
>> checkbox on activities. Does ant one know how to use checkbox with dblatex?
>>
>> - ☐ (hex: ☐ / dec: ☐): ballot box (empty, that's how it's
>> supposed to be)
>> - ☑ (hex: ☑ / dec: ☑): ballot box with check
>> - ☒ (hex: ☒ / dec: ☒): ballot box with x
>> - ✓ (hex: ✓ / dec: ✓): check mark, equivalent to
>> `&checkmark`; and ✓ in most browsers
>> - ✔ (hex: ✔ / dec: ✔): heavy check mark
>> - ✗ (hex: ✗ / dec: ✗): ballot x
>> - ✘ (hex: ✘ / dec: ✘): heavy ballot x
>>
>> the last four work for me even with the standard (pdftex) backend. the
>> first three require to use the xetex backend of dblatex. below are my notes
>> of a few years ago including a response from the dblatex maintainer. the
>> notes are now partly obsolete and are also (partly) MacOS specific but
>> maybe it helps:
>>
>>
>> Use of special symbols and system font access under MacOS
>>
>> Where there are empty cells in the glyph column of Table [19][tab:
>> chars],
>> this simply means that the used font does not contain the glyph.
>> Glyphs
>> which appear as character codes in the glyph column simply are not (
>> yet?)
>> in the respective translation table (unient.py) from XML to LaTeX
>> which is
>> required when the default pdftex backend is used. The dblatex
>> maintainer
>> (Ben Guillon) clarified this issue:
>>
>> There are two options:
>>
>> 1) either use the xetex backend that natively handles any Unicode
>> characters: dblatex -bxetex file.xml,
>>
>> 2) or patch the lib/dbtexmf/dblatex/unient.py with attached patch.
>>
>> I recommend the first method, since the char mapping in traditional
>> latex
>> macros will never be complete and can have side effects.
>>
>> The patch in unient.py looks like this:
>>
>> +0x00398: r"\ensuremath{\Theta}", # GREEK CAPITAL LETTER THETA
>> +0x0039E: r"\ensuremath{\Xi}", # GREEK CAPITAL LETTER XI
>> +0x003A8: r"\ensuremath{\Psi}", # GREEK CAPITAL LETTER PSI
>> +0x003A9: r"\ensuremath{\Omega}", # GREEK CAPITAL LETTER OMEGA
>> +0x003D6: r"\ensuremath{\pi}", # GREEK PI SYMBOL
>> +0x02032: r"\ensuremath{'}", # PRIME
>> +0x02033: r"\ensuremath{''}", # DOUBLE PRIME
>> +0x02034: r"\ensuremath{'''}", # TRIPLE PRIME
>>
>> With Macports unient.py currently resides in
>> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/
>> python2.7/site-packages/dbtexmf/dblatex
>>
>> As of now, the following two symbols are defined there but do not
>> work and
>> cause the pdflatex backend to fail:
>>
>> 0x003B8: r"\texttheta{}", # GREEK SMALL LETTER THETA
>> 0x003D1: r"\textvartheta{}", # GREEK THETA SYMBOL
>>
>> which occur in Table [20][tab:chars] as:
>>
>> |\θ |\θ (html only) |θ |greek small letter theta
>> |\ϑ |\ϑ (html only)|ϑ |greek small letter theta symbol
>>
>> XeTeX can cope with these, though.
>>
>> Note For the time being this implies, that the current document
>> requires
>> XeTeX to be used for pdf generation.
>>
>> The XeTeX route works only flawlessly when using fonts that
>> comprehensively support special symbols. I know of four suitable fonts
>> :
>>
>> * DejaVu (the dblatex -b xetex default choice)
>>
>> * Cambria
>>
>> * STIX ([21]http://www.stixfonts.org)
>>
>> * GNU FreeFont ([22]http://www.gnu.org/software/freefont/index.html)
>>
>> Only the last two of these (STIX and FreeFont) are truly complete
>> regarding glyphs (at least the coverage of the glyphs in Table
>> [23][tab:chars]) and styles (regular, italics, bold). Cambria has
>> quite
>> complete glyph coverage, nearly as complete as Cambria Math (but, at
>> least
>> under MacOS Cambria Math does only provide the standard style, regular
>> ).
>>
>> The Nimbus Roman No9 L URW++ font which is essentially identical
>> to
>> Times Roman and chosen as default main font by dblatex when the
>> pdftex backend is used is a subset of STIX (restricted to latin1
>> coverage or similar). In other words: STIX looks essentially
>> indistinguishable from Nimbus/Times Roman as far as normal text
>> is
>> concerned. This can be verified by typesetting the same document
>> via
>> Note the pdftex and the xetex backend, respectively. The only
>> discernible
>> difference is that line breaks sometimes (quite rarely) are
>> different. Maybe the kerning is
>>
>> ...
>
>
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.