Take the 2-minute tour ×
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.

When compiling a beamer document using xelatex, I encountered a problem with the macro \C. Basically, I want to use that to stand for the set of complex numbers so I want to redefine it to be \mathbb{C}, but xelatex complains that it is already defined. Using \show, I can see that it is defined to be:

> \C=macro:
->\PU-cmd \C \PU\C .

but a texmf-wide grep doesn't show me anything sensible on what that actually means! So I don't know if it's safe to clobber it or not.

Here's the minimal test case. Note that the issue only shows up with xelatex, not with pdflatex or lualatex.

\documentclass{beamer}

\begin{document}
\show\C
\end{document}

It feels like something font-y, since if I remove the \show (i.e., actually try to use the command), then I get the error:

! LaTeX Error: Command \C unavailable in encoding OT1.
share|improve this question

1 Answer 1

up vote 9 down vote accepted

\C is defined in puenc.def from hyperref and is e.g. loaded if you use the "unicode" option which beamer does probably if you run xelatex. It encodes U+030F "COMBINING DOUBLE GRAVE ACCENT". The same unicode char is encoded in puenc.def by \textdoublegrave and \G. \textdoublegrave is also defined in T3 encoding (tipa). I don't know if \C and \G are defined in other packages. You can probably safely redefine it, but I personally avoid to define one-char commands as they are often used for accents commands.

share|improve this answer
12  
I take your point about the one-char commands, but I use ℂ far more than I use a "combining double grave accent"! –  Loop Space Sep 10 '10 at 9:25

Your Answer

 
discard

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.