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}
6
  • 5
    Use the tikzlibrary babel: \usetikzlibrary{angles, quotes,babel},
    – user121799
    Dec 6, 2018 at 20:09
  • @marmot please see an update of my question regarding your solution in beamer
    – Viesturs
    Dec 6, 2018 at 20:49
  • It's more of a beamer interference problem, isn't it?
    – AndréC
    Dec 6, 2018 at 21:02
  • 2
    @Viesturs The solution proposed by @ marmot works fine, you just need a fragile frame Dec 6, 2018 at 22:41
  • 1
    @marmot I found some duplicates for the two problems - have fun in your meeting! Dec 6, 2018 at 23:12

0

Browse other questions tagged .