3

I am using mikTeX on windows, and want to make figures of some compass and ruler constructions. So I want to use tkz-euclide. A minimal working example is the following:

\documentclass{standalone}  
\usepackage[utf8]{inputenc}  
\usepackage[T1]{fontenc}   
\usepackage[usenames,dvipsnames]{xcolor}   
\usepackage{lmodern}   
\usepackage{tkz-euclide,tkz-fct}    
\usetkzobj{all}  \usetikzlibrary{calc,shapes,decorations}  

\begin{document}
\begin{tikzpicture}[scale=1.0]
       \tkzDefPoint(0,0){C}
       \tkzDefPoint(4,5){A}
       \tkzDefPoint(4,-1){B}
       \tkzDrawLine[add=0 and 0.4](C,A)
       \tkzDrawLine[add=0 and 0.4](C,B)
       \tkzDrawArc[R,ultra thin,blue!50](B,3cm)(60,120)
       \tkzDrawArc[R,ultra thin,blue!50](A,3cm)(240,300)
       \tkzDefMidPoint(A,B) \tkzGetPoint{P}
       \tkzDrawLine[add=0 and 0.5](C,P)
       \tkzDrawPoint[size=5]{P}
       % og nå tegne normalen fra P:
       \tkzLabelPoints(A,B,C,P)
       \tkzDefLine[perpendicular=through P](C,P) \tkzGetPoint{F}
       \tkzDrawLine[add=0.5 and 0.5](P,F)
       \tkzShowLine[perpendicular=through P,size=2,orange,gap=3](C,P)
     \end{tikzpicture}
\end{document}

Running this (using emacs and auctex) gives:

ERROR: Package pgfkeys Error: I do not know the key '/drawpoint/B' and I am going to ignore it. Perhaps you misspelled it.

--- TeX said ---
--- HELP ---
No help available

Since the manual is in french I am a little handicapped ...

1
  • Subtle, but you need (P) after DrawPoint and not {P}... And make the dot bigger if you want to be able to see it. Try \tkzDrawPoint[size=20](P)
    – Thruston
    Dec 8, 2015 at 22:40

1 Answer 1

3

The error seems to come from the argument of \tkzDrawPoint, which should not be between {}but between (). With this modification, the code compiles. I deleted the option usenames for xcolor, as it is obsolete:

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames]{xcolor}
\usepackage{lmodern}
\usepackage{tkz-euclide,tkz-fct}
\usetkzobj{all} \usetikzlibrary{calc,shapes,decorations}

\begin{document}

\begin{tikzpicture}[scale=1.0]
  \tkzDefPoint(0,0){C}
  \tkzDefPoint(4,5){A}
  \tkzDefPoint(4,-1){B}
  \tkzDrawLine[add=0 and 0.4](C,A)
  \tkzDrawLine[add=0 and 0.4](C,B)
  \tkzDrawArc[R,ultra thin,blue!50](B,3cm)(60,120)
  \tkzDrawArc[R,ultra thin,blue!50](A,3cm)(240,300)
  \tkzDefMidPoint(A,B) \tkzGetPoint{P}
  \tkzDrawLine[add=0 and 0.5](C,P)
  \tkzDrawPoint[size=5](P)%{P}
  % og nå tegne normalen fra P:
  \tkzLabelPoints(A,B,C,P)
  \tkzDefLine[perpendicular=through P](C,P) \tkzGetPoint{F}
  \tkzDrawLine[add=0.5 and 0.5](P,F)
  \tkzShowLine[perpendicular=through P,size=2,orange,gap=3](C,P)
\end{tikzpicture}

\end{document} 

enter image description here

You must log in to answer this question.

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