I would like to draw a right triangle so that its sides are not vertical or horizontal. (No coordinate axes.) I would like the legs to be labeled a and b and the hypotenuse to be labeled c. I would like to drop a perpendicular, drawn as a dotted line segment, from the vertex across the hypotenuse to the hypotenuse. (I heard that there was a command to instruct TikZ to do this.) This creates two smaller triangles that are similar to each other. I would like the four acute angles of the two smaller triangles to be marked with arcs; one pair of equal angles marked with "|" through it, and the other pair of equal angles marked with "||" through it.

The only code that I could offer is the code for labeling the vertices of the triangle and drawing the line segments between them. I know that there is much more to code. I reckon that it would be more convenient for anybody responding to decide on the coordinates of the vertices himself/herself.

  • 4
    I searched for triangle and this was the second one tex.stackexchange.com/questions/156450/triangle-with-text then I added right angle tex.stackexchange.com/questions/175501/…. See we are not asking much, so please just provide a MWE and people would take care of the rest.
    – percusse
    Jul 30, 2014 at 0:17
  • So it would even be more convenient for potential helpers for them to do all of the work from scratch for you?! As percusse says, an MWE is pretty easy to find, even if you are either unable or unwilling to produce one yourself, but... !! Sorry, but this question really takes the biscuit! (Apologies to those speakers of other languages or dialects to whom this means nothing but I can't think of an equivalent which would not be impolite right now.)
    – cfr
    Jul 30, 2014 at 0:58
  • What is "MWE"? I have just started using TikZ. The syntax for coding in TikZ is much different than that of LaTeX, and the manuals for TikZ are not of much help. (Don't be cynical, @cfr.)
    – user143462
    Jul 30, 2014 at 17:38
  • Information about producing a minimal working example (MWE) that illustrates your problem. Given your comments on Gonzalo Medina's answer, I think cynicism wholly justified. The manual for TikZ is exemplary. If nothing else, you can cut and paste some code as a starting point. There are numerous examples on this site and percusse even did your searching for you. There are further examples in the online gallery and so on and so forth.
    – cfr
    Jul 30, 2014 at 20:59
  • It would be nice if your comments were of any help. You say that the manual for TikZ " is exemplary." Show me in the manual where it gives the code for marking angles with "|" or with "||".
    – user143462
    Jul 30, 2014 at 22:55

1 Answer 1


Here's one possibility using "pure" TikZ:

enter image description here

The image was produced using simply


\RectTri has three mandatory arguments; the first two are the coordinates for the vertices of one of the legs and the third one is the length of the second leg. The optional argument lets you customize the style used to draw the triangle.

The code:


\coordinate [label=left:$C$] (C) at #2;
\coordinate [label=below right:$B$] (B) at #3;
\coordinate (aux) at ($ #2 ! 1 ! 90:#3 $);
\coordinate [label=above:$A$] (A) at ($ #2 !#4!(aux) $);

\coordinate (perp) at ($(A)!(C)!(B)$);
\draw[purple!70!black,thick,dashed] (C) -- (perp);

  (C) -- 
  node[auto] {$b$} (A) -- 
  node[auto] {$c$} (B) --
  node[auto] {$a$} 
  pic ["$\alpha$",draw,cyan,thick,angle radius=1cm] {angle = C--A--B} 
  pic ["$\alpha$",draw,cyan,thick,angle radius=1cm] {angle = B--C--perp}
  pic ["$\beta$",draw,orange!70!black,thick,angle radius=1cm] {angle = A--B--C}
  pic ["$\beta$",draw,orange!70!black,thick,angle radius=1cm] {angle = perp--C--A};




And here's an approach using tkz-euclide:



\tkzDefPointWith[orthogonal normed,K=7](C,A)








enter image description here

  • Nice pictures! I would like to make the following edits. I would like to have the right angle mark at C, I would like to replace the "alpha" with a "|" through the arc indicating the measure of angle CAB and angle BC(perp), and I would like to replace the "beta" with a "||" through the arc indicating the measure of the angle ABC and angle AC(perp). (I would also change the radius of angles marked "|" to 0.75cm and I would keep the angles marked "||" to 1cm.) Can you provide the code for these edits?
    – user143462
    Jul 30, 2014 at 19:06
  • @user143462 Sure. Please see my updated answer. Jul 31, 2014 at 14:44

You must log in to answer this question.

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