1

Consider this code:

\documentclass{article}
%\usepackage[latvian]{babel}                                                                                                                                                                                
\usepackage{tikz}
\usetikzlibrary{angles, quotes}
\begin{document}
\begin{tikzpicture}
  \coordinate(A) at (0, 0);
  \coordinate(B) at (1, 1);
  \coordinate(C) at (1, 0);
  \draw   pic [draw, "$\theta_{p}$" font=\tiny] {angle=A--B--C};
\end{tikzpicture}
\end{document}

If I uncomment the line

%\usepackage[latvian]{babel}   

I get an error:

(/usr/local/texlive/2018/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
! Missing \endcsname inserted.
<to be read again> 
                   \theta 
l.12     "$\theta_{p}$" font=\tiny]
                                    {angle=A--B--C};

What is the problem and how to fix it?

The solution proposed by @marmot works in an article. Now, consider the same example in beamer:

\documentclass{beamer}
\usepackage[latvian]{babel}
\usepackage{tikz}
\usetikzlibrary{angles, quotes, babel}
\begin{document}
\begin{frame}
  \begin{tikzpicture}
    \coordinate(A) at (0, 0);
    \coordinate(B) at (1, 1);
    \coordinate(C) at (1, 0);
    \draw   pic [draw, "$\theta_{p}$" font=\tiny] {angle=A--B--C};
  \end{tikzpicture}
\end{frame}
\end{document}

We get a similar problem even when using tikz library babel:

(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-theorem-dic
tionary-English.dict) (./latvianpres.nav)
! Missing \endcsname inserted.
<to be read again> 
                   \theta 
l.13 \end{frame}
AndréC
  • 24,137
Viesturs
  • 7,895

0 Answers0