tkz-euclide 软件包问题

tkz-euclide 软件包问题

这是我的第一个问题,也是我第一次使用 LaTeX!我知道大多数基本符号和命令,\usepackage{}或者\frac{3}{4}我正在使用 WinEdt 作为我的文本编辑器。

我正在看一篇名为 tkz-euclide 的论文,其中包含有关如何使用 tikz 包绘制几何图形的信息(法语) 并且我希望能够制作出像论文中那样的图形,并且我安装了 tikz 包。我该怎么做?{tkz-euclide}

问题如下:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=.6]
\tkzSetUpLine[line width=2pt,color=orange!80!black]
\tkzSetUpCompass[line width=2pt,color=orange!80!black]
\tkzDefPoint(0,0){O} \tkzDefPoint(2.25,0){A}
\tkzDrawCircle(O,A)
\foreach \i in {0,...,5}{
\tkzDefPointBy[rotation= center O angle 30+60*\i](A) \tkzGetPoint{a\i}
\tkzDefPointBy[rotation= center {a\i} angle 120](O) \tkzGetPoint{b\i}
\tkzDefPointBy[rotation= center {a\i} angle 180](O) \tkzGetPoint{c\i}
\tkzDefPointBy[rotation= center {c\i} angle 120](a\i) \tkzGetPoint{d\i}
\tkzDefPointBy[rotation= center {c\i} angle 60](d\i) \tkzGetPoint{f\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](b\i) \tkzGetPoint{e\i}
\tkzDefPointBy[rotation= center {f\i} angle 60](d\i) \tkzGetPoint{g\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](e\i) \tkzGetPoint{h\i}
\tkzDefPointBy[rotation= center {e\i} angle 180](b\i) \tkzGetPoint{k\i}
\tkzDrawCircle(a\i,O) \tkzDrawCircle(b\i,a\i)
\tkzDrawCircle(c\i,a\i)
\tkzDrawArc[rotate](f\i,d\i)(-120)
\tkzDrawArc[rotate](e\i,d\i)(180)
\tkzDrawArc[rotate](d\i,f\i)(180)
\tkzDrawArc[rotate](g\i,f\i)(60)
\tkzDrawArc[rotate](h\i,d\i)(60)
\tkzDrawArc[rotate](k\i,e\i)(60) }
\tkzClipCircle(O,f0)
\end{tikzpicture}
\end{document} 

结果如下:

! Undefined control sequence.
l.6 \tkzSetUpLine
                 [line width=2pt,color=orange!80!black]
? 

Process has been terminated ...

它看起来应该是这样的:花

答案1

这有效。您还需要说\usetkzobj{all},如果您不懂法语的话,这可能很难理解。

\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}[scale=.6]
\tkzSetUpLine[line width=2pt,color=orange!80!black]
\tkzSetUpCompass[line width=2pt,color=orange!80!black]
\tkzDefPoint(0,0){O} \tkzDefPoint(2.25,0){A}
\tkzDrawCircle(O,A)
\foreach \i in {0,...,5}{
\tkzDefPointBy[rotation= center O angle 30+60*\i](A) \tkzGetPoint{a\i}
\tkzDefPointBy[rotation= center {a\i} angle 120](O) \tkzGetPoint{b\i}
\tkzDefPointBy[rotation= center {a\i} angle 180](O) \tkzGetPoint{c\i}
\tkzDefPointBy[rotation= center {c\i} angle 120](a\i) \tkzGetPoint{d\i}
\tkzDefPointBy[rotation= center {c\i} angle 60](d\i) \tkzGetPoint{f\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](b\i) \tkzGetPoint{e\i}
\tkzDefPointBy[rotation= center {f\i} angle 60](d\i) \tkzGetPoint{g\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](e\i) \tkzGetPoint{h\i}
\tkzDefPointBy[rotation= center {e\i} angle 180](b\i) \tkzGetPoint{k\i}
\tkzDrawCircle(a\i,O) \tkzDrawCircle(b\i,a\i)
\tkzDrawCircle(c\i,a\i)
\tkzDrawArc[rotate](f\i,d\i)(-120)
\tkzDrawArc[rotate](e\i,d\i)(180)
\tkzDrawArc[rotate](d\i,f\i)(180)
\tkzDrawArc[rotate](g\i,f\i)(60)
\tkzDrawArc[rotate](h\i,d\i)(60)
\tkzDrawArc[rotate](k\i,e\i)(60) }
\tkzClipCircle(O,f0)
\end{tikzpicture}
\end{document} 

在此处输入图片描述

相关内容