Browse Source

added math style pentagon

main
Kenneth John Odle 9 months ago
parent
commit
7a727f8434
  1. 25
      pentagon-math-style.tex

25
pentagon-math-style.tex

@ -0,0 +1,25 @@
\documentclass[tikz]{standalone}
\usetikzlibrary{angles, quotes}
\tikzset{
mark with dashes/.style={
every to/.append style={edge node={pic{mark with dashes={#1}}}}},
pics/mark with dashes/.style={
/tikz/sloped, /tikz/allow upside down, /tikz/line width=+.4pt,% thin
code={
\foreach \i in {1, ..., #1}
\draw[line cap=round, shift=(left:{\i pt-(#1+1)/2}), pic actions]
(-1pt, -2pt) -- (1pt, 2pt);}}}
% From https://tex.stackexchange.com/questions/692214/i-would-like-a-perfect-pentagon-with-108-angles
\begin{document}
\begin{tikzpicture}[angle eccentricity=1.5]
\foreach[count=\j from 0, count=\i] \p in {below, below, right, above, left}
\coordinate["$\i$" \p] (c\i) at (90+72*2+\j*72:2);
\node also[alias=c0] (c5) node also[alias=c6] (c1);
\foreach[count=\j from 2, count=\k from 0] \i in {1, ..., 5}
\pic[draw, "$\alpha_\i$"] {angle=c\j--c\i--c\k};
\draw[mark with dashes=2, thick] (c1) to (c2) to (c3) to (c4) to (c5) to cycle;
\end{tikzpicture}
\end{document}
Loading…
Cancel
Save