答案1
Metapost 会给出更好的结果,但如果你想使用 TikZ,decorations.text
它提供了多种选择。
例如:
\documentclass[tikz,border=10pt,multi]{standalone}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
\draw [thick] (0,0) circle (3cm);
\foreach \i/\j/\k in {0/something/tadpole,45/anything/cauldron,90/another/bread soup,135/whatever/rock candy,180/whenever/lollipop,225/whoever/Bell of Bow,270/why ever/seesaw,315/nothing/roundabout} {
\draw [black] (0,0) -- (\i:3cm);
\path [decorate, decoration={text along path, text=\j, text align=center}] (\i:27.5mm) arc (\i:{\i+45}:27.5mm);
\path [decorate, decoration={text along path, text=\k, text align=center}] (\i:24mm) arc (\i:{\i+45}:24mm);
}
\end{tikzpicture}
\end{document}
编辑
为了使文本在不同方向上很好地对齐,最好使用text effects along path
。 这样速度较慢,但可以垂直对齐每个字符。 例如:
\documentclass[tikz,border=10pt,multi]{standalone}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
[
arc text/.style={%
decorate,
decoration={%
text effects along path,
text={#1},
text align=center,
text effects/.cd,
text along path,
characters={anchor=mid},
}
}
]
\draw [thick] (0,0) circle (3cm);
\foreach \i/\j/\k [evaluate=\i as \m using {\i < 180 ? \i+45 : \i }, evaluate=\i as \n using { \i < 180 ? \i : \i+45 } ] in {0/something/tadpole,45/anything/cauldron,90/another/bread soup,135/whatever/rock candy,180/whenever/lollipop,225/whoever/Bell of Bow,270/why ever/seesaw,315/nothing/roundabout} {
\draw [black] (0,0) -- (\i:3cm);
\path [arc text/.expanded=\j] (\m:27.5mm) arc (\m:\n:27.5mm);
\path [arc text/.expanded={\k}] (\m:24mm) arc (\m:\n:24mm);
}
\end{tikzpicture}
\end{document}