[XeTeX] Slightly embarrassed.... why does \newfontfamily not do what I expect?

Wilfred van Rooijen wvanrooijen at yahoo.com
Sat Nov 21 03:05:28 CET 2009


Hi all,

The "problem" happens in a table. In the following example, the 日本語 appears in the normal text, but not in the table (?)

\documentclass[a4paper,draft,oneside,article]{memoir}
\usepackage{fontspec}
\usepackage{hyperref}

\begin{document}

\newfontfamily\cjkfont{Kozuka Mincho Pr6N}
\cjkfont

English, Nederlands, 日本語. But in a table:

\begin{table}[ht]
  \begin{center}
  \caption[]{The caption}
    \begin{tabular}{ccc}
    English & Nederlands & 日本語 \\
    \end{tabular}
  \end{center}
\end{table}

\end{document}

If I put \cjkfont just prior to the 日本語 in the table, the characters do show up. I guess some font settings happen when going into a table? Is it maybe that the font-size is smaller for table entries?

Cheers,
Wilfred



--- On Fri, 20/11/09, Michiel Kamermans <pomax at nihongoresources.com> wrote:

> From: Michiel Kamermans <pomax at nihongoresources.com>
> Subject: Re: [XeTeX] Slightly embarrassed.... why does \newfontfamily not do what I expect?
> To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
> Date: Friday, 20 November, 2009, 6:42 PM
> Wilfred,
> > I am trying to use \newfontfamily to set a document
> with some Japanese characters. I use:
> > 
> > \newfontfamily\cjkfont{Kozuka Mincho Pro-VI}
> > \cjkfont
> > 
> > When I do so, the text is rendered in Kozuka Mincho
> Pro, but the CJK characters are not present. When I say:
> To my knowledge, the font family name is just "Kozuka
> Mincho Pro" without an explicit weight indicator, and the
> individual fonts are called "Kozuka Mincho Pro X" where X is
> the weight factor (either 'I' through 'VI', or 'EL' through
> 'H'). You can tell fontspec to use a particular weight
> version for bold, but you might want to try what I do, which
> is just:
> 
> \newfontfamily\cjkfont{Kozuka Mincho Pro}
> 
> this works fine for me, even though the individual font
> names are 'Kozuka Mincho Pro EL' through 'Kozuka Mincho Pro
> H'. It will pick the regular weight for normal text, and the
> appropriately heavy version in s
n headings.
> 
> - Mike
> 


      New Email addresses available on Yahoo!
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/


More information about the XeTeX mailing list