MWE 中的tikzpicture
可以毫无问题地编译greek
、French
和Italian
,但是English
,如果将Russian
、ngerman
或Spanish
中的任何一个Portuguese
添加到babel
,ERROR ! Missing \endcsname inserted. <to be read again> \alpha l.32 pic ["$\alpha$", draw, fill=yellow] {angle = F--X--A} The control sequence marked <to be read again> should not appear between \csname and \endcsname
则会产生 。
\documentclass{article}
% RN. 1 July 2019
%=======================
\usepackage{tikz}
\usetikzlibrary{angles}
\usetikzlibrary{calc}
\usetikzlibrary{quotes}
\usepackage[greek,french,italian,english]{babel}
%\usepackage[greek,russian,ngerman,french,spanish,italian,portuguese,english]{babel}
%-----------------------
\begin{document}
\begin{tikzpicture}[angle radius=.75cm]
\node (A) at (-2,0) [red,left] {$A$};
\node (B) at ( 3,.5) [red,right] {$B$};
\node (C) at (-2,2) [blue,left] {$C$};
\node (D) at ( 3,2.5) [blue,right] {$D$};
\node (E) at (60:-5mm) [below] {$E$};
\node (F) at (60:3.5cm) [above] {$F$};
\coordinate (X) at (intersection cs:first line={(A)--(B)}, second line={(E)--(F)});
\coordinate (Y) at (intersection cs:first line={(C)--(D)}, second line={(E)--(F)});
\path
(A) edge [red, thick] (B)
(C) edge [blue, thick] (D)
(E) edge [thick] (F)
pic ["$\alpha$", draw, fill=yellow] {angle = F--X--A}
pic ["$\beta$", draw, fill=green!30] {angle = B--X--F}
pic ["$\gamma$", draw, fill=yellow] {angle = E--Y--D}
pic ["$\delta$", draw, fill=green!30] {angle = C--Y--E};
\end{tikzpicture}
\end{document}
答案1
添加shorthands=off
作品:
\usepackage[greek,russian,ngerman,french,spanish,italian,portuguese,english, shorthands=off]{babel}
但现在你也应该使用
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
或者使用基于unicode的引擎之一。