2

I'm on overleaf doing some homework with latex and part of it includes adding a picture of this triangle on the right side of the paper. I know I have to use tikz but when I try and research it myself, I get bombarded with different answers that are not exactly what I'm looking for. Please help!

I need to recreate this image on overleaf.

imnothere
  • 14,215
Priscilla96
  • 59
  • 1
  • 3

2 Answers2

3

For fun, here is a short code with pst-eucl, which works well with xelatex:

\documentclass{article}
\usepackage{pst-eucl}%,
\pagestyle{empty}

\begin{document}

$ \begin{pspicture}
{\psset{dimen=middle, unit=2, labelsep=0.8ex, linejoin = 1}
\pstTriangle[PointSymbol = none, PosAngle = {90,180,0}, PointNameSep = 0.8em](1.2;75){A}(0,0){B}(1.6, 0){C}}
\psset{linewidth = 0.5pt,MarkAngleRadius =5mm}
{\psset{unit = 7.5mm}
\pstMarkAngle{B}{A}{C}{$ \alpha $}
\pstMarkAngle{C}{B}{A}{$ \beta $}
\pstMarkAngle{A}{C}{B}{$ \gamma $}}
\psset{linestyle = none, labelsep =3pt , shortput = nab}
\ncline{A}{B}_{$ c $}%
\ncline{B}{C}_{$ a $}
\ncline{C}{A}_{$ b $}
\end{pspicture} $

\end{document}

enter image description here

Bernard
  • 271,350
1

Also for the fun, here is a way to do it with MetaPost, included in a LuaLaTeX program (MetaPost being included in LuaTeX).

The Metafun format of MetaPost has been used here for its handy and self-explanatory anglebetween macro.

\documentclass[border=3mm]{standalone}
\usepackage{luatex85, luamplib}
\mplibsetformat{metafun}
\mplibtextextlabel{enable}
\begin{document}
\begin{mplibcode}
u = .75cm;
beginfig(1);
    pair A, B, C;
    A = u*(1, 5); B = origin; C = u*(7, 0);
    draw A--B--C--cycle;
    label.lft("$B$", B);
    label.ulft("$A$", A);
    label.rt("$C$", C);
    label.lft("$c$", .5[A,B]);
    label.urt("$b$", .5[A,C]);
    label.bot("$a$", .5[B,C]);
    draw anglebetween(A--B, A--C, "$\alpha$");
    draw anglebetween(B--A, B--C, "$\beta$");
    draw anglebetween(C--A, C--B, "$\gamma$");
endfig;
\end{mplibcode}
\end{document}

enter image description here

Franck Pastor
  • 18,756