1

In using pdflatex on a document in English that will include some Cyrillic text. For math, I'd like to use $\C$ for the set of complex numbers. But the T2A encoding needed for babel with its russian option gives error:

Command \C already defined.

Here's the source:

\documentclass{article}

\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
%\usepackage[main=english,russian]{babel}

\usepackage{amssymb}
\newcommand{\C}{\mathbb{C}}

\begin{document}

%{\Russian Алекс\'{а}ндров}, {\Russian Т\'{и}хонов}, and {\Russian Урыс\'{o}н}.

$\C$ denotes the set of all complex numbers.

\end{document}

The workaround

\renewcommand{\C}{\mathbb{C}}

seems to work, as in the following:

\documentclass{article}

\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=english,russian]{babel}
\usepackage{csquotes}

\usepackage{amssymb}
\renewcommand{\C}{\mathbb{C}}

\begin{document}

{\Russian Алекс\'{а}ндров}, {\Russian Т\'{и}хонов}, and {\Russian Урыс\'{o}н}.

$\C$ denotes the set of all complex numbers.

\end{document}

Question 1: Where is \C defined in the packages loaded (I have not been able to find it so far) and what is its meaning?

If it gives some accent or some character I'll never need, then I can use the \renewcommand workaround indicated.

If not, then...

Question 2: Except for using something less terse such as $\CC$, for the complex numbers, is there some other, safer workaround?

  • Have you checked russian.ldf? In any case safe to use a macro name which is longer – daleif Jun 7 at 19:56
  • 2
    Wth or without Russian, I always use $\Cbb$ after a\newcommand{\Cbb}{\mathbb{C}}. In fact declaring single letter macro is a weird practice as most of them arre are already defined... By the way, I prefer \matbbbm{ } with \usepackege{bbm} – Jhor Jun 7 at 20:01
  • @Jhor: But when composing a lot of math in LaTeX, It's a lot more readable (and writeable) to be able to use $\C$ instead of $\Cbb$ or some other circumlocution. – murray Jun 7 at 20:43
  • @Jhor: With the Lucida Bright math fonts I'm actually using, $\mathbb{C}$ is nearly the same as what you get with amssymb and bbm. – murray Jun 7 at 20:45
  • I find no file russian.ldf in my TeXLive distribution. – murray Jun 7 at 20:46
3

The definition of \C can be found in t2aenc.def:

\DeclareTextAccent{\C}{\LastDeclaredEncoding}{19}

It denotes a double grave accent.

Some alternatives if you don't want to redefine the macro could be to define it only in math mode, or to use a Unicode character, or to choose a different one letter macro.

MWE:

\documentclass{article}

\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[main=english,russian]{babel}

\usepackage{amssymb}

\let\oldC\C
\def\C{\textormath{\oldC}{\mathbb{C}}}

\DeclareUnicodeCharacter{2102}{\mathbb{C}}

\newcommand{\K}{\mathbb{C}}

\begin{document}
\C{и}

$\C$ denotes the set of all complex numbers.

$ℂ$ denotes the set of all complex numbers.

$\K$ denotes the set of all complex numbers.

\end{document}

Result:

enter image description here

  • Aha! And according to Wikipedia, the double-grave is used for Cyrillic only in Serbo-Croatian and Slovenian. So your work-around still allowing $\C$ will be safe for my document, thanks (I had considered using $\K$ instead of $\C$, but alas I needed to reserve that for the Cantor ternary set!) – murray Jun 7 at 20:38

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.