3

I'm trying to follow an example of arc drawing from one tex.stackexchange question:

\begin{tikzpicture}
    \tkzDefPoint(0,0){O}
    \tkzDefPoint(2,-2){A}
    \tkzDefPoint(60:2){B}
    \tkzDrawLines[add = 0 and .5](O,A O,B)
    \tkzDrawArc[rotate,color=red](O,A)(180)
    \tkzDrawPoints(O,A,B)
    \tkzLabelPoints[below](O,A,B)
\end{tikzpicture}

And I keep getting this error message

Undefined control sequence.
\tkzDrawArc
[rotate,color=red](O,A)(180)
?

I'm using the following packages:

\usepackage{fullpage,amsfonts,amsmath,amssymb}
\usepackage{txfonts}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usepackage[margin=0.5in]{geometry}
\usepackage{yhmath}

What am I missing?

1 Answer 1

6

Probably you are missing

\usetkzobj{all}

Example:

\documentclass{article}

\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}
    \tkzDefPoint(0,0){O}
    \tkzDefPoint(2,-2){A}
    \tkzDefPoint(60:2){B}
    \tkzDrawLines[add = 0 and .5](O,A O,B)
    \tkzDrawArc[rotate,color=red](O,A)(180)
    \tkzDrawPoints(O,A,B)
    \tkzLabelPoints[below](O,A,B)
\end{tikzpicture}
\end{document}

Result

5
  • 1
    I get the same error message, and when I add to preamble \usetkzobj{all}, I get: undefined control sequence <recently read>\usetkzobj Pressing Enter, I get: LaTeX error: missing \begin{document} This happen me with all tex file with tkz-euclid package May 26, 2015 at 3:40
  • @G.Aguilera Either your version of tkz-euclide is too old (I have used 2011/06/01 1.16 c) or your installation is broken. Check the .log file, which files are found at which location. May 26, 2015 at 4:41
  • I have the some version (2011/06/01 1.16 c). According to what the .log, the package files are in my texmf folder C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tkz-euclide May 26, 2015 at 14:18
  • @G.Aguilera \usetkzobj is defined in latex/tkz-base/tkz-tools-utilities.tex, same version. May 26, 2015 at 14:29
  • In my localtexmf had a old folder with tkz-2d.sty. I delete this file, and problem solved! May 27, 2015 at 4:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .