You are on page 1of 3

sign up log in tour help

TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related
Take the 2-minute tour ×
typesetting systems. It's 100% free, no registration required.

Vertical Chinese text that contains characters in a “CJK fallback family font”
I am having trouble with vertical (i.e. rotated) Chinese text that contains characters in two different fonts. Rare characters requiring the "CJK
fallback family font" are not displaying in the typeset output, although the font (PMingLiU-ExtB) is correctly installed and these characters do
display in other applications, and even in LaTeX with the xeCJK package but without character-rotation. I've tried another font containing one of
the characters in question, with the same result.

Here is a MWE, incorporating code from http://tex.stackexchange.com/a/38585/3935 and http://tex.stackexchange.com/a/16087/3935:

%!TEX TS-program = xelatex


%!TEX encoding = UTF-8 Unicode

\documentclass{article}

\usepackage{xeCJK}
\newfontlanguage{Chinese}{CHN}
\setCJKmainfont[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]{SimSun}
\setCJKfallbackfamilyfont{rm}{PMingLiU-ExtB}

\newcommand*\CJKmovesymbol[1]{\raise.35em\hbox{#1}}
\newcommand*\CJKmove{\punctstyle{plain}% do not modify the spacing between
punctuations
\let\CJKsymbol\CJKmovesymbol
\let\CJKpunctsymbol\CJKsymbol}

\usepackage{everypage}
\AddEverypageHook{\CJKmove\special{pdf: put @thispage <</Rotate 90>>}}

\begin{document}
秋夜思

旅夢何時盡、征途望每賖、晩秋淮上⽔、新⽉楚⼈家

嘯空⼭近、鴻⾶極浦斜、明朝南岸去、⾔折桂枝花
\end{document}

The character that produces the problem is (U+24814), the first character in the third "paragraph" of the text.

I am using

revision: 28816
cat-version: 3.1.2

of xeCJK on OS 10.6.8 and 10.8.3; my LaTeX client is TeXShop v. 2.47.

If I change

\usepackage{xeCJK}

to

\usepackage[fallback]{xeCJK}[2011/05/01] % ver 2.3.19

following http://tex.stackexchange.com/a/16087/3935, the character in question displays correctly but the text is no longer rotated. Is there a
way to get both effects simultaneously?

Added, 20130426:

Using

\usepackage[AutoFallBack=true]{xeCJK}
\newfontlanguage{Chinese}{CHN}
\setCJKmainfont[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]{SimSun}
\setCJKfallbackfamilyfont{rm}[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]
{MingLiU-ExtB}
as in @Leo Liu's answer produces overstriking of the graphs and 嘯:

{xetex} {rotating} {cjk} {xecjk}

edited Apr 26 '13 at 10:03 asked Apr 25 '13 at 1:24


brannerchinese
1,963 2 12 27

1 Answer

Newer xeCJK disables fallback fonts by default to improve the performence. So you should enable
it manually.

\documentclass{article}

\usepackage[AutoFallBack=true]{xeCJK}
\newfontlanguage{Chinese}{CHN}
\setCJKmainfont[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]{SimSun}
\setCJKfallbackfamilyfont{rm}[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]
{PMingLiU-ExtB}

\newcommand*\CJKmovesymbol[1]{\raise.35em\hbox{#1}}
\newcommand*\CJKmove{\punctstyle{plain}% do not modify the spacing between
punctuations
\let\CJKsymbol\CJKmovesymbol
\let\CJKpunctsymbol\CJKsymbol}

\usepackage{everypage}
\AddEverypageHook{\CJKmove\special{pdf: put @thispage <</Rotate 90>>}}

\begin{document}
秋夜思

旅夢何時盡、征途望每賖、晩秋淮上⽔、新⽉楚⼈家

嘯空⼭近、鴻⾶極浦斜、明朝南岸去、⾔折桂枝花
\end{document}
edited Apr 26 '13 at 14:26 answered Apr 26 '13 at 4:21
Leo Liu
41.8k 3 100 189

However, this does not produce the desired effect — the characters and 嘯 are overstruck, one on top of the other. I
am appending a graphic to the original post. – brannerchinese Apr 26 '13 at 10:00

@brannerchinese: It works fine on my computer. – Leo Liu Apr 26 '13 at 14:27

@brannerchinese: I guess you use a bad PMingLiU-ExtB font. You can try another font like SimSun-ExtB ,
HanaMin (花園明朝), etc. – Leo Liu Apr 26 '13 at 14:33

Yes, SimSun-ExtB works. I'm not sure what was wrong with PMingLiU-ExtB , but anyway I've got something
that works now. Thanks. – brannerchinese Apr 26 '13 at 23:52

You might also like