[XeTeX] Issue with CJK in pdf build

Wilfred van Rooijen wvanrooijen at yahoo.com
Thu Nov 19 01:15:48 CET 2009


Check the fontspec-manual. The command \setmainfont does not set all the other fonts accordingly.

Also note that by using a \setmainfont you are likely to lose a lot of italic, emph, boldface etc which are normally handled inside TeX by implicitly changing to another font. Personally I have yet to find a completely satisfactory solution for this issue.

So if anybody knows how I can set my font for instance to the Kozuka Mincho and still have boldface in my References, please let me know :-))

Wilfred

--- On Thu, 19/11/09, Chris Jones <cjns1989 at gmail.com> wrote:

> From: Chris Jones <cjns1989 at gmail.com>
> Subject: Re: [XeTeX] Issue with CJK in pdf build
> To: xetex at tug.org
> Date: Thursday, 19 November, 2009, 9:03 AM
> On Wed, Nov 18, 2009 at 04:31:17PM
> EST, Jonathan Kew wrote:
> 
> [..]
> 
> > There are subsequent error messages related to
> hyperlinks, etc., which I 
> > don't know anything about; perhaps there are other
> things you need to 
> > include in such a "style" to keep dblatex happy. 
> 
> On a hunch I added a 'mystyle.xsl' to my .dblatex directory
> tree,
> copying the /etc/asciidoc/docbook.xsl to it and pointed
> dblatex to it:
> 
> dblatex -V -d --xsl-user
> ~/.dblatex/mystyle2/xsl/mystyle.xsl --texstyle
> ~/.dblatex/mystyle2/latex/mytexstyle.sty -b xetex
> unicode.xml
>                
> ^               
>                 ^
> 
> Looks like with the --texstyle option, dblatex was no
> longer able to
> find it own .xsl file.
> 
> After explicitly specifying it via the --xsl-user flag
> practically all
> the errors messages disappeared and the .pdf was built
> successfully.
> 
> > Maybe you can locate the default dblatex style (which
> presumably
> > includes the command \setmainfont{DejaVu Serif}, etc)
> and model yours
> > on that.
> 
> I added the recommended lines near the top (¹):
> 
> ------------------------------------------------------------------------
> %% Trying to change to a Unicode font
> %%
> \NeedsTeXFormat{LaTeX2e}
> \ProvidesPackage{mystyle}[2008/06/05 AsciiDoc DocBook
> Style
{docbook}
> 
> \RequirePackage{fontspec}         
>                
>                
> (¹)
> \setmainfont{unifont}         
>                
>                
>     (¹)
> 
> \renewenvironment{sidebar}[1][0.95\textwidth]{
>   \hspace{0mm}\newline%
>   \noindent\begin{Sbox}\begin{minipage}{#1}%
>   \setlength\parskip{\medskipamount}%
> }{
>   \end{minipage}\end{Sbox}\doublebox{\TheSbox}%
> }
> 
> % For DocBook literallayout elements, see
> `./dblatex/dblatex-readme.txt`.
> \usepackage{alltt}
> ------------------------------------------------------------------------
> 
> All the glyphs are now rendered correctly in 'normal'
> text.
> 
> Not the case for 'code blocks' (in asciidoc terminology)
> where I'm still
> getting the default with most glyphs missing.
> 
> Is there a latex command that lets you set the default
> fixed / monospace
> font for text delimited by DocBook tags <screen>
> </screen>? 
> 
> Something like \setfixedfont{} or \setmonofont{}, maybe,
> but I googled
> a bit and looked at LaTeX cheat sheets but I did not find
> anything.
> 
> Thank you for your comments.
> 
> CJ
> 


      Get your new Email address!
Grab the Email name you&#39;ve always wanted before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/


More information about the XeTeX mailing list