I would like to draw a five-pointed star with different labels at each point of the star. I reached the example below, which closely follows this question, but I could not replace the numbers with different text labels and I could not remove the line of circle. (I guess that I do not need the foreach
either.)
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture}[n/.style={circle,inner sep=1pt}]
\draw node [star, star point height=.5cm, minimum size=2cm, inner sep=0,outer sep=0] (s) {}
circle (1) (s.outer point 1) node[n,label={90:1}]{}
foreach\x in {4,2,5,3}{--(s.outer point \x) node[n,label={(-45+90*\x):\x}]{}}--cycle;
\end{tikzpicture}
\end{document}
Best Answer
Revision: a shorter TikZ code
Is that what you want? You may choose labels using array
Vlabel
.Update 1. You can embed in LaTex document by loading
\usepackage[inline]{asymptote}
. For MikTeX, you have to install Asymptote software (this software is already included for TeXlive).2. In the same way, you can draw with TikZ. I choose Asymptote because array operations in TikZ is not so handy. Do you see how many tricks we have to use? ^^