5

With tkz-euclide included in texlive 2019 the following MWE works

\documentclass{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){B}
\tkzDefPoint(6,0){A}
\tkzDefPoint(4,3){C}
\tkzDrawPolygon(A,B,C) 
\tkzLabelSegment[below](A,B){$c$})
\tkzLabelSegment[left](B,C){$a$})
\tkzLabelSegment[above](A,C){$b$})
\tkzDrawAltitude(A,B)(C)    
 \tkzGetPoint{D}
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B,D)
\tkzMarkRightAngle(C,D,B)
\tkzLabelPoint[above](C){C}
\tkzLabelSegment[above](B,D){$m$}
\tkzLabelSegment[above](A,D){$n$}
\tkzLabelSegment[left](C,D){$h$}
\end{tikzpicture}
\end{document}

However, with tkz-euclide included in texlive 2020 (version 3.06c), (after commenting line \usetkzobj{all}) I get the following error

! Package pgf Error: No shape named `B,C,D' is known.

See the pgf package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.15 \tkzDrawPoints(A,B,C,D)

No idea what is wrong. Any hint?

1 Answer 1

6

I don't know what changes have been made, but I note that there is no \tkzDrawAltitude documented in the tkz-euclide manual. There is however \tkzDrawLine[altitude], and by doing

\tkzDrawLine[altitude](A,C,B)

I get

enter image description here

Complete code (there were three extra ), one after each \tkzLabelSegment, that I removed):

\documentclass[border=4mm]{standalone}
\usepackage{tkz-euclide}
%\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){B}
\tkzDefPoint(6,0){A}
\tkzDefPoint(4,3){C}
\tkzDrawPolygon(A,B,C) 
\tkzLabelSegment[below](A,B){$c$}
\tkzLabelSegment[left](B,C){$a$}
\tkzLabelSegment[above](A,C){$b$}
\tkzDrawLine[altitude](A,C,B)  
 \tkzGetPoint{D}
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B,D)
\tkzMarkRightAngle(C,D,B)
\tkzLabelPoint[above](C){C}
\tkzLabelSegment[above](B,D){$m$}
\tkzLabelSegment[above](A,D){$n$}
\tkzLabelSegment[left](C,D){$h$}
\end{tikzpicture}
\end{document}
2
  • Thanks, that was quick! I have notice that tkz-euclide distributed with texlive 2019 is in version 1.16 from 2011, and the version distributed with texlive 2020 is in version 3.06c. I think that's a very high jump!!
    – ernesto
    Commented Apr 13, 2020 at 16:12
  • @ernesto I see from github.com/tkz-sty/tkz-euclide that there apparently was no 2.x version of tkz-euclide. I don't know why, but it's possible that it is to reflect that version 3 of TikZ is now required. Commented Apr 13, 2020 at 16:22

You must log in to answer this question.

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