I want to label the segments AF and DF like this picture. enter image description here I tried.

\tikzset{hidden/.style = {thick, dashed}}
\tkzDefMidPoint(A,B)                      \tkzGetPoint{E}
\tkzDefMidPoint(A,D)                      \tkzGetPoint{F}
\tkzDrawSegments[hidden](E,F E,C F,C)
\tkzDrawSegments(A,B B,C C,D D,A)
\tkzLabelSegment[below=3pt](A,E){3 cm}
\tkzLabelSegment[below=3pt](B,E){3 cm}
\tkzLabelSegment[left=3pt](A,F){3 cm}
\tkzLabelSegment[left=3pt](D,F){3 cm}

I got enter image description here

How can I rotate label AF and DF?

  • You could try fill=black in \tkzDrawPoints. I think it produces nicer points.
    – user137084
    Aug 30, 2018 at 20:20

1 Answer 1


You should modify the last two lines in your MWE into:

\tkzLabelSegment[sloped](A,F){3 cm}
\tkzLabelSegment[sloped](D,F){3 cm}

Please, keep in mind that the order of the points becomes important. The code above will put 3cm at the left of AF, but another 3cm will be at the right of DF. Playing with points you will get what you need.

You must log in to answer this question.

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