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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

\usepackage{hyperref}            % adds clickable links to TOC

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

An en-dash does not cause the same problem.

The temporary expedient of


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

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

following http://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.

share|improve this question
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
up vote 2 down vote accepted

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
share|improve this answer
Right you are — updating from the command line fixed it. – brannerchinese Nov 23 '12 at 17:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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