So I have this tikzpicture environment (dot2texi-generated):
\documentclass{beamer}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\begin{document}
\begin{frame}[fragile]
\begin{tikzpicture}[>=latex,line join=bevel,]
%%
\node (а) at (5bp,51bp) [draw,ellipse] {а};
\node (б) at (5bp,5bp) [draw,ellipse] {б};
\draw [->] (а) ..controls (5bp,39.554bp) and (5bp,29.067bp) .. (б);
%
\end{tikzpicture}
\end{frame}
\end{document}
with Cyrillic "а" and "б" nodes. pdfLaTeX, though, gives me the following error:
! Missing \endcsname inserted.
<to be read again>
\T2A\cyra
l.4 \node (а) at (5bp,51bp) [draw,ellipse] {а};
So the question is: how to use Cyrillic characters in tikzpicture nodes?
UPD:
I should've actually include contents of original dot2tex
environment. Andrey has given the basic idea of a possible solution: instead of
\begin{dot2tex}[]
digraph { "а" -> "б" };
\end{dot2tex}
one can use:
\begin{dot2tex}[]
digraph { a [label="а"]; b [label="б"]; a -> b }
\end{dot2tex}
б
, for instance, is translated by LaTeX into its internal representation, which is\cyrb
, which in turn is subject to further processing that ultimately is transformed into\char"E1
(where hexadecimal E1 is the letter position in the T2A encoding) and this is disallowed in those contexts. This wouldn't happen with a Unicode savvy engine such asxelatex
orlualatex
.