我正在尝试使用 tkz-euclide,但一直收到此错误消息!LaTeX 错误:未找到文件“tkz-obj-eu-draw-triangles.tex”。无法弄清楚原因。
\documentclass{book}
\usepackage{blindtext}
\usepackage{tkz-euclide}
\begin{document}
\chapter{Book One}
Lets start with a few definitions;\\
a postulate is:\\
suggest or assume the existence, fact, or truth of (something) as a basis for reasoning, discussion, or belief.\\
An axiom is\\
a statement or proposition which is regarded as being established, accepted, or self-evidently true.\\
\section{Postulates}
\subsection{Postulate 1}
A straight line may be drawn from any one point to any other point, but this does not mean there is no other line that there cannot be more than more than one such line.
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.25,0){B}
\tkzDrawSegment(A,B)
\tkzLabelPoint[left](A){$A$}
\tkzLabelPoint[right](B){$B$}
\end{tikzpicture}
\subsection{Postulate 2}
Aterminated line can be produced indefinitely.
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.25,0){B}
\tkzDefPoint(-0.75,0){C}
\tkzDefPoint(2,0){D}
\tkzDrawSegment(A,B)
\tkzDrawSegment[dashed]{A,C}
\tkzDrawSegment[dashed]{B,D}
\tkzLabelPoint[below](A){$A$}
\tkzLabelPoint[below](B){$B$}
\subsection{Postulate 3}
A circle can be drawn with any centre and any radius.
\subsection{Postulate 4}
All right angles are equal to one another.
\subsection{postulate 5}
If a straight line falling on two straight lines makes the interior angles on the same side of it taken together less than two right angles, then the two straight lines, if produced indefinitely, meet on that side on which the sum of angles is lesss than two right angles.
\end{document}
知道我做错了什么吗?
答案1
改编
- (最小化示例)
- 添加缺失的
tikzpicture
环境 - 在两个命令中都替换
{...}
为。(...)
\tkzDrawSegment
结果
代码
\documentclass{book}
\usepackage{tikz}
\usepackage{tkz-euclide}
\begin{document}
\subsection{Postulate 1}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.25,0){B}
\tkzDrawSegment(A,B)
\tkzLabelPoint[left](A){$A$}
\tkzLabelPoint[right](B){$B$}
\end{tikzpicture}
\subsection{Postulate 2}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.25,0){B}
\tkzDefPoint(-0.75,0){C}
\tkzDefPoint(2,0){D}
\tkzDrawSegment(A,B)
\tkzDrawSegment[dashed](A,C)
\tkzDrawSegment[dashed](B,D)
\tkzLabelPoint[below](A){$A$}
\tkzLabelPoint[below](B){$B$}
\end{tikzpicture}
\end{document}
答案2
您需要使用 2.5 的最新版本tkz-euclide
。我删除了该文件tkz-obj-eu-draw-triangles.tex
,但忘记在 中删除tkz-euclide.sty
。您有三个解决方案:
- 下载 2.5 版本
- 或者在 tkz-euclide.sty 中删除以下行
\input{tkz-obj-eu-draw-triangles.tex}
- 或者您可以放置旧版本的文件“tkz-obj-eu-draw-triangles.tex”。
解释:'draw-polygon' 比 更通用,draw-triangle
因为现在您必须先使用以下选项定义三角形:等边三角形、毕达哥拉斯三角形、黄金三角形……然后才能绘制。现在绘制的唯一选项是线条的样式。