I'd like to draw something like this:
With two sides labeled, and the ability to label all four vertices, using TiKZ. How can this be done?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI'd like to draw something like this:
With two sides labeled, and the ability to label all four vertices, using TiKZ. How can this be done?
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[dot/.style = {circle, fill, minimum size=3pt, inner sep=0pt,
label={[blue,font=\sffamily]above right:#1},alias=#1}]
\path foreach \X/\Y in {120/A,60/B,0/C}{(\X:4) node[dot=\Y]{}}
(0,0) coordinate (O)
foreach \X/\Y/\Z in {blue/A/bd,red/B/bd,green!70!black/C/ad}
{ (O) edge[\X,-latex,edge label={$v_{\Z}$}] (\Y)}
(B) edge[dashed] (A) edge[dashed] (C);
\end{tikzpicture}
\end{document}
\draw[->](0,0)--node[auto]{$v_{ab}$}(2,3);
to draw an arrow with a label.