I do love LaTeX or to be more specific Xe(La)TeX. And it is really fun to create astonishing work sheets or tests with it.
On the other hand I also hate it! There are so many things that can go wrong and its a pain to find the culprit.
Like today e.g. I just wanted to adjust some tikZ to display pyramides but it did not work in my editor QtikZ or with XeTeX.
It finally worked with overleaf.com. But why?
I found this code once upon a time ago:
[latex]%rechter Winkel
\newcommand\markangle[6][red]{% [color] {X} {origin} {Y} {mark} {radius}
% filled circle: red by default
\begin{scope}
\path[clip] (#2) -- (#3) -- (#4);
\fill[color=#1,fill = white,draw=#1,name path=circle] %opacity=0.5
(#3) circle (#6mm);
\end{scope}
% middle calculation
\path[name path=line one] (#3) -- (#2);
\path[name path=line two] (#3) -- (#4);
\path[%
name intersections={of=line one and circle, by={inter one}},
name intersections={of=line two and circle, by={inter two}}
] (inter one) -- (inter two) coordinate[pos=.5] (middle);
% bissectrice definition
\path[%
name path=bissectrice
] (#3) -- (barycentric cs:#3=-1,middle=1.2);
% put mark
\path[%
name intersections={of=bissectrice and circle, by={middleArc}}
] (#3) -- (middleArc) node[pos=0.6] {#5}; % node[pos=1.3]
}
%ende rechter Winkel
[/latex]
And it creates german style 90 degree angles in drawings, also in 3D-drawing!
[latex]\markangle[black]{B1}{H}{A2}{$\textcolor{black}{\cdot}$}{8};[/latex]
After a short search I thought it was a version problem since I always have the latest software and overleaf.com might not.
But it was not that easy, although tikZ intersections changed some syntax over the years.
I could have been a version change in the end, because XeTeX could not find my named path circle.
I think tikZ overall got more strict with code because I discovered that names in a scope must be declared global in order to be accessed globally which makes total sence. There issues are very commong with languages like C++ or JAVA.
This line now has one word more and it works like a charm!
[latex]\fill[color=#1,fill = white,draw=#1,name path global=circle] %opacity=0.5[/latex]