\usepackage{tkz-base}
after解决了和\usetikzlibrary{babel}
之间的兼容性问题,但是如果使用编译成功,而除非注释掉,否则会导致编译陷入无限循环。tkz-base
babel
[utf8]{inputenc}
tikzpicture 1.
tikzpicture 2.
\documentclass{article}
% RN. 4 Oct 2017
%=======================
\usepackage{comment}
%
\usepackage[utf8]{inputenc}
\usepackage[greek,russian,frenchb,english]{babel}
\usepackage{tkz-base}
\usetikzlibrary{babel}
%
\begin{document}
1.\\
\begin{tikzpicture}[scale=1]
\begin{scope}[rotate=30]
\tkzDefPoint(2,3){A}
\begin{scope}[shift=(A)]
\tkzDefPoint(90:5){B}
\tkzDefPoint(30:5){C}
\end{scope}
\end{scope}
\tkzDrawSegments[color=blue](A,B B,C C,A)
\tkzDrawPoints(A,B,C)
\tkzLabelPoints[above](B,C)
\tkzLabelPoints[below](A)
\end{tikzpicture}
\begin{comment}
2.\\
\begin{tikzpicture}[scale=1]
\tkzInit[xmax=6,ymax=6]
\tkzGrid
\tkzSetUpPoint[shape = circle,color = red,%
size = 8,fill = red!30]
\tkzDefPoint(-1+1,-1+4){O}
\tkzDefPoint({3*ln(exp(1))},{exp(1)}){A}
\tkzDefPoint({4*sin(FPpi/6)},{4*cos(FPpi/6)}){B}
\tkzDefPoint({4*sin(FPpi/3)},{4*cos(FPpi/3)}){B’}
\tkzDefPoint(30:5){C}
\tkzDefPoint[shift={(1,3)}](45:4){A’}
\begin{scope}[shift=(A)]
\tkzDefPoint(30:3){C’}
\end{scope}
\tkzDrawPoints[color=blue](O,B,C)
\tkzDrawPoints[color=red,%
shape=cross out](B’,A,A’,C’)
\tkzLabelPoints(A,O,B,B’,A’,C,C’)
\end{tikzpicture}
\end{comment}
\end{document}
答案1
问题不在于[utf8]{inputenc}
和tkz-base
包之间的不兼容,而在于curved apostrophes
写成 而不是straights apostrophes
,您必须用直撇号替换它们:\tkzDefPoint({4*sin(FPpi/3)},{4*cos(FPpi/3)}){B'}
此问题最常发生在从tkz-euclide
手册中复制和粘贴时。这里您已从手册第 21 页(版本 1.16 c)复制并粘贴了代码。这写有弯曲的撇号:Unicode 符号' 右单引号' (U+2019)而不是直撇号Unicode 符号 ‘撇号’ (U+0027)。
\documentclass{article}
% RN. 4 Oct 2017
%=======================
\usepackage{comment}
%
\usepackage[utf8]{inputenc}
\usepackage[greek,russian,frenchb,english]{babel}
\usepackage{tkz-base}
\usetikzlibrary{babel}
%
\begin{document}
1.\\
\begin{tikzpicture}[scale=1]
\begin{scope}[rotate=30]
\tkzDefPoint(2,3){A}
\begin{scope}[shift=(A)]
\tkzDefPoint(90:5){B}
\tkzDefPoint(30:5){C}
\end{scope}
\end{scope}
\tkzDrawSegments[color=blue](A,B B,C C,A)
\tkzDrawPoints(A,B,C)
\tkzLabelPoints[above](B,C)
\tkzLabelPoints[below](A)
\end{tikzpicture}
%\begin{comment}
2.\\
\begin{tikzpicture}[scale=1]
\tkzInit[xmax=6,ymax=6]
\tkzGrid
\tkzSetUpPoint[shape = circle,color = red,%
size = 8,fill = red!30]
\tkzDefPoint(-1+1,-1+4){O}
\tkzDefPoint({3*ln(exp(1))},{exp(1)}){A}
\tkzDefPoint({4*sin(FPpi/6)},{4*cos(FPpi/6)}){B}
\tkzDefPoint({4*sin(FPpi/3)},{4*cos(FPpi/3)}){B'}
\tkzDefPoint(30:5){C}
\tkzDefPoint[shift={(1,3)}](45:4){A'}
\begin{scope}[shift=(A)]
\tkzDefPoint(30:3){C'}
\end{scope}
\tkzDrawPoints[color=blue](O,B,C)
\tkzDrawPoints[color=red,%
shape=cross out](B',A,A',C')
\tkzLabelPoints(A,O,B,B',A',C,C')
\end{tikzpicture}
%\end{comment}
\end{document}
现在结果是正确的: