Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
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 –  G. Aguilera May 26 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. –  Heiko Oberdiek May 26 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 –  G. Aguilera May 26 at 14:18
    
@G.Aguilera \usetkzobj is defined in latex/tkz-base/tkz-tools-utilities.tex, same version. –  Heiko Oberdiek May 26 at 14:29
    
In my localtexmf had a old folder with tkz-2d.sty. I delete this file, and problem solved! –  G. Aguilera May 27 at 4:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.