请教一个问题,如何用latex将下图变成一个正十二边形?
$$xymatrix@R=0.5cm@C=0.7cm{
&&&overset{a_{1,1}}{bullet}&&&\
&&overset{a_{1,12}}{bullet}&&overset{a_{1,2}}{bullet}&&\
&overset{a_{1,11}}{bullet}&&&&overset{a_{1,3}}{bullet}&\
underset{a_{1,10}}{bullet}&&&&&&underset{a_{1,4}}{bullet}\
&underset{a_{1,9}}{bullet}&&&&underset{a_{1,5}}{bullet}&\
&&underset{a_{1,8}}{bullet}&&underset{a_{1,6}}{bullet}&&\
& & & overset{a_{1,7}}{bullet} & & &
ar"1,4";"2,3"_{alpha_{0,0}}
ar"2,3";"3,2"_{alpha_{0,1}}
ar"3,2";"4,1"_{alpha_{0, 2}}
ar"4,1";"5,2"_{alpha_{0,11}}
ar"5,2";"6,3"_{alpha_{0,10}}
ar"6,3";"7,4"_{alpha_{0,3}}
ar"7,4";"6,5"_{alpha_{0,9}}
ar"6,5";"5,6"_{alpha_{0,4}}
ar"5,6";"4,7"_{alpha_{0,8}}
ar"4,7";"3,6"_{alpha_{0,5}}
ar"3,6";"2,5"_{alpha_{0,7}}
ar"2,5";"1,4"_{alpha_{0, 6}}
}$$
TikZ
的技巧性实在是太强了,我还有很长的路要走(落泪)
非常感谢外国网友的帮助,但我微调了一下,感觉下面的代码还是有些"不优雅"的问题(哎)
另外,请你查看围栏代码块语法,学会讲代码放到代码块里,以便他们正确的高亮。 (Un)Happy TikZing!
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[rotate=120,]% rotate=120
\foreach \i [
count=\j from -1, % trick to start from -1
evaluate=\i as \invi using int(11-\i),
evaluate=\j as \invj using int(11-\j),
] in {0,...,11} {
\node[
fill, circle,
inner sep=1pt, outer sep=3pt,
label={
[inner sep=0pt, minimum width=.5em,] % <angle:label-text>
{360/12*(\i-1/2)+120}:{\footnotesize $a_{1,\invi}$}
}
] (a\i) at ({360/12*(\i-1/2)}:2.5) {};
\ifnum\i=0\else
\draw[<-] (a\i) -- node[inner sep=0pt, circle, label={
[circle, inner sep=0pt]{360/12*(\i-1)+120}:{\footnotesize$\alpha_{1,\invj}$}
}] {} (a\j);
\fi
}
\draw[<-] (a0) -- node[
inner sep=0pt, circle,
label={
[circle, inner sep=0pt, swap]
{-360/12+120}:{\footnotesize$\alpha_{1,0}$}
}] {} (a11);
\end{tikzpicture}
\end{document}
希望各位
TikZ
大神走过路过教教孩子!