[XeTeX] Extraneous comma shows conflict between memoir and xecjk package?

Qing Lee sobenlee at gmail.com
Thu Jun 7 02:01:17 CEST 2012


Hello Jon,

2012/6/7 jon <jon at newkanji.com>:
> Greetings,
>
> After switching to Tex Live 2012/Debian, upon compiling my book,  an
> extraneous comma is inserted into the body text directly before every
> footnote number.
>
> THE BAD
> The following does not produce expected results. There is an *extraneous
> comma* (or superscripted comma) inserted  into the body text directly before
> every footnote number.
>
> \documentclass[12pt]{memoir}
> \usepackage{fontspec}
> \setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
> 
\usepackage{xeCJK}
> \setCJKmainfont[]{AR PL UKai TW}
> \begin{document}
> But if I don't ``\emph{See through it and let it
> go},"\footnote{看得破,放得下。\emph{Kàn de pò, fàng de xià}.} the karma will carry
> forward....
> \end{document}

Sorry about that. This problem is caused by a new version of the xeCJK
in TL2012. We didn't notice this issue. You can temporarily use the
following means to deal with this problem.

\documentclass[12pt]{memoir}
\usepackage{xeCJK}
\ExplSyntaxOn
\cs_set_nopar:Nn \xeCJK_default_kern:
  { \tex_kern:D -6 sp  \tex_kern:D 6 sp }
\ExplSyntaxOff
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
\setCJKmainfont{AR PL UKai TW}
\begin{document}
But if he doesn't ``\emph{See through it and let it
go},"\footnote{看得破,放得下。\emph{Kàn de pò, fàng de xià}.} the karma will
carry forward....
\end{document}

If you use only a small amount of Chinese materials or you do not mind
the loss of he special progress for Chinese punctuations and spacing,
you don't need xeCJK package. In this case, you can directly use
fontspec to select the Chinese fonts. It is very suitable for
temporaryly typesetting a few Chinese words.

\documentclass[12pt]{memoir}
\usepackage{fontspec}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
\newfontfamily\arplukai{AR PL UKai TW}
\newcommand\textchinese[1]{{\arplukai #1}}
\begin{document}
But if he doesn't ``\emph{See through it and let it
go},"\footnote{\textchinese{看得破,放得下。}\emph{Kàn de pò, fàng de xià}.}
the karma will carry forward....
\end{document}

Best
Qing Lee



More information about the XeTeX mailing list