TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am learning TikZ and am confused about two apparent completely different ways to go about things, although they seem completely compatible and intermixable:

\draw[color=black] (20,20) -- (100,20);
% vs

I'm quite sure the second thing is wrong (please correct to fix this). The first way seems way more powerful (you've got nodes and all), but the second way has stuff like tkzMarkAngle which seems painful to do the first way.

What is the difference and how would I do a "simple thing" like tkzMarkAngle using paths?

share|improve this question
\tkzDrawSegment is not a "native" tikz command. It has been implemented in another package (or perhaps in the preamble of the tex document). In this case it probably comes from tkz-euclide. Those "external" commands not neccesarly adhere to tikz conventions in syntax. – JLDiaz Jan 18 '13 at 13:13

I don't know if it is possible to give a precise consideration on which package is more powerful (TikZ or the tkz bundle): what is true is that they have a different syntax, but I think there are cases in which TikZ provides a simpler programming solution and others when tkz is more straightforward.

For example, the macro \tkzMarkAngle, is one of the latter case. You could find the code of the macro typing in the shell:

gedit $(kpsewhich tkz-obj-angles.tex)

The following document tries to replicate the same picture with both packages and with a similar programming structure:

% to display picture and code

tkz-based solution:
% equivalent: \tkzDrawVectors(O,A O,B)
\tkzMarkAngle[fill= yellow,%

Ti\textit{k}Z-based solution:
\coordinate (O) at (0,0);
\coordinate (A) at (2,2);
\coordinate (B) at (-2,3);
\draw[thick] (B)--(O) 
\draw[thick] (A)--(O) 
 (O)--(x-b)  arc (125:38:0.95cm) -- (O);


which provides:

enter image description here

As you can see, the second picture is not precise as the first one, because inside the definition of \tkzMarkAngle there is the exact computation for that. Not that you couldn't do the calculus with pure TikZ, but you need to complicate the code.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.