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.



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.

\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.

  • 19
    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

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.