2

I find that in the presence together of packages hyperref and xeCJK, in either order, raises an Improper alphabetic constant error with an em-dash in commands \section, \subsection, etc. This happens with TeXLive 2012 but not 2011. Here is an MWE:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass{article}    
\usepackage{xeCJK}
\usepackage{hyperref}            % adds clickable links to TOC

\begin{document}
\section{O my swineherd!}
\subsection{Em-dash --- in subsection}
\end{document}

An en-dash does not cause the same problem.

The temporary expedient of

\usepackage[unicode,psdextra]{hyperref}

offered at https://tex.stackexchange.com/a/69354/3935 does not work here; the temporary expedient of

\subsection{Em-dash \texorpdfstring{---}{} in subsection}

following https://tex.stackexchange.com/a/69338/3935 does work, but I'd rather clear up the underlying problem. Any thoughts?

For now, I've reverted to TeXLive 2011.

  • I get no error. – egreg Nov 20 '12 at 13:18
  • @egreg: well, I've tried reinstalling TeXLive 2012 several times from different sources. What could be the problem, if it's not reproducible on your installation? I'm on Mac OS 10.6.8. – brannerchinese Nov 21 '12 at 4:42
2

I get no error.

Update your TeX Live 2012 online (using tlmgr) instead of reinstall it (older version) time and time again.

Use \listfiles in the preamble to show the versions of your packages in the log. Here is mine:

xeCJK.sty    2012/10/27 v3.0.10
expl3.sty    2012/09/29 v4249
fontspec.sty    2012/05/06 v2.2b
hyperref.sty    2012/10/31 v6.83l
  • Right you are — updating from the command line fixed it. – brannerchinese Nov 23 '12 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.