2

When building a figure using the tkz-euclide package within the tufte-handout class, some points lie "underneath" intersecting lines, while other points lie "on top" of intersecting lines in the rendered output.

For example, when running this code (from the package documentation) for the "Golden Triangle,"

\begin{tikzpicture}
\tkzDefPoint(0,0){C}
\tkzDefPoint(4,0){D}
\tkzDefSquare(C,D)
\tkzGetPoints{e}{f}
\tkzDefMidPoint(C,f)
\tkzGetPoint{m}
\tkzInterLC(C,f)(m,e)
\tkzGetSecondPoint{n}
\tkzInterCC[with nodes](C,C,n)(D,C,n) \tkzGetFirstPoint{B}
\tkzInterLC(C,D)(D,B) \tkzGetSecondPoint{A}
\tkzInterLC(B,A)(B,D) \tkzGetSecondPoint{E} \tkzInterLL(B,D)(C,E) \tkzGetPoint{F} \tkzDrawPoints(C,D,B) \tkzDrawPolygon(B,...,D) \tkzDrawPolygon(B,C,D)
\tkzDrawSegments(D,A A,B C,E) \tkzDrawArc[delta=10](B,C)(E) \tkzDrawPoints(A,...,F) \tkzMarkRightAngle[fill=blue!20](B,F,C) \tkzFillAngles[fill=blue!10](C,B,D E,A,D) \tkzMarkAngles(C,B,D E,A,D) \tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$} \tkzLabelPoints[below](A,C,D,E) \tkzLabelPoints[above right](B,F)
\end{tikzpicture}

this image results:

enter image description here

If you look closely, points A, B and F exhibit this description.

How do I correct this?

2
  • It is recommended to provide a complete example, also called MWE, rather than code snippets. Jun 22, 2020 at 18:53
  • Yes, I'm sorry. I will remember to do this in my following questions. Thank you.
    – Roy
    Jun 22, 2020 at 19:12

2 Answers 2

3

Things are drawn in the order in which they appear in the code (unless layers are specified for parts of the code), so to get the points drawn on top, it's simply a matter of moving \tkzDrawPoints(A,...,F) to the very end of the the diagram, after all the other parts. (You can remove the \tkzDrawPoints(C,D,B) by the way, that is redundant.)

I'd also suggest drawing the lines after the \tkzFillAngles and \tkzMarkRightAngle, currently the filling cover half the lines.

\documentclass[border=5mm]{standalone}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){C}
\tkzDefPoint(4,0){D}
\tkzDefSquare(C,D)
\tkzGetPoints{e}{f}
\tkzDefMidPoint(C,f)
\tkzGetPoint{m}
\tkzInterLC(C,f)(m,e)
\tkzGetSecondPoint{n}
\tkzInterCC[with nodes](C,C,n)(D,C,n) \tkzGetFirstPoint{B}
\tkzInterLC(C,D)(D,B) \tkzGetSecondPoint{A}
\tkzInterLC(B,A)(B,D) \tkzGetSecondPoint{E} \tkzInterLL(B,D)(C,E) \tkzGetPoint{F}   
\tkzDrawArc[delta=10](B,C)(E) 
\tkzMarkRightAngle[fill=blue!20](B,F,C)
\tkzFillAngles[fill=blue!10](C,B,D E,A,D)
\tkzMarkAngles(C,B,D E,A,D)
\tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$}
\tkzLabelPoints[below](A,C,D,E)
\tkzLabelPoints[above right](B,F)

\tkzDrawSegments(D,A A,B C,E)
\tkzDrawPolygon(B,C,D)
\tkzDrawPoints(A,...,F)
\end{tikzpicture}
\end{document}

enter image description here

1
  • The second part of your answer fulfills what I want to append to my answer. :) Jun 22, 2020 at 19:09
1

Draw points after angle filling. That is, move \tkzDrawPoints after corresponding \tkzFillAngles.

PS: Your example is very similar to the second example in tkz-euclide manual, sec. 1.3.1 Example Part I: gold triangle. You can learn the command order used in package manual.

You must log in to answer this question.

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