How to add quotes (BA and CA) like the image?

enter image description here

My code:



%Definindo os vertices 
\tkzDefPoint (0,0){B}
\tkzDefPoint (9,0){C}
\tkzDefPoint (14.5,10.66){A}
\tkzDefPoint (4.83,3.55){E}
\tkzDefPoint (10.83,3.55){D}
%Desenhando as retas
\draw (B) -- node[below] {$9$} (C) -- node[right] {$12$} (A) -- 
node[above left] {$18$} cycle;
\draw (E) -- node[below] {$6$} (D);
\node (1) [label=above:{A}] at (A) {};
\node (2) [label=left:{B}] at (B) {};
\node (3) [label=right:{C}] at (C) {};
\node (4) [label=left:{E}] at (E) {};
\node (5) [label=right:{D}] at (D) {};


My result:

enter image description here

  • What do you mean by 'quotes'? I'm afraid I don't see anything which looks like a quote in either image, so I assume it has a technical meaning here I'm not familiar with. – cfr Feb 15 '18 at 23:34
  • Presumably you mean the arrows, you can use the calc library as in e.g. tex.stackexchange.com/questions/106207/… – Torbjørn T. Feb 15 '18 at 23:38

enter image description here

pure tikz solution. for edge labels are used quotes library:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta, calc, quotes}

          auto = right,
measure/.style = {very thin,
        {Bar[width=2.2mm]Straight Barb[]}-%
        {Straight Barb[]Bar[width=2.2mm]},
every label/.append style = {font=\footnotesize}
%Definindo os vertices
\coordinate[label=left:$B$]     (b) at (0,0);
\coordinate[label=right:$C$]    (c) at (9,0);
\coordinate[label=$A$]          (a) at (14.5,10.66);
\coordinate[label=left:$E$]     (e) at (4.83,3.55);
\coordinate[label=right:$D$]    (d) at (10.83,3.55);
%Desenhando as retas
\draw[blue] (a) -- (b) -- (c) -- cycle;
\draw[blue] (b) to ["$9$"] (c) 
            (e) to ["$6$"] (d);
\draw[measure]  ($(a)!10mm!-90:(b)$) to [sloped,"$18$"] ($(b)!10mm! 90:(a)$);
\draw[measure]  ($(a)!10mm! 90:(c)$) to [sloped,"$12$"] ($(c)!10mm!-90:(a)$);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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