答案1
本案例最简单的代码
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\draw[-latex] (a) to[out=60,in=120] node[midway,font=\scriptsize,above] {multiply by 100\%} (b);
\draw[-latex] (b) to[out=-120,in=-60] node[midway,font=\scriptsize,below] {divide by 100\%} (a);
\end{tikzpicture}
\end{document}
在我看来,这些是最好的方法(借助\GREAT
(不是\great
或\Great
)斯基尔蒙和土拨鼠在这个问题)
根据 Skillmon 的回答:
\documentclass[tikz]{standalone}
\usetikzlibrary{bending,decorations.text}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\begin{scope}
\catcode`\%=12
\draw[-latex,postaction={decorate,decoration={raise=-1.5ex,text along path,text
align=center,text={|\scriptsize|multiply by 100%}}}] (a) to[out=60,in=120] (b);
\draw[latex-,postaction={decorate,decoration={raise=.5ex,text along path,text
align=center,text={|\scriptsize|divide by 100%}}}] (a) to[out=-60,in=-120] (b);
\end{scope}
\end{tikzpicture}
\end{document}
根据marmot的回答:
\documentclass[tikz]{standalone}
\usetikzlibrary{bending,decorations.text}
\begin{document}
\begin{tikzpicture}
\sffamily
\node (a) at (-2,0) {probability};
\node[align=center] (b) at (2,0) {percent\\change};
\draw[-latex,postaction={decorate,decoration={raise=-1.5ex,text along path,text
align=center,text={|\scriptsize|multiply by 100{\%}}}}] (a) to[out=60,in=120] (b);
\draw[latex-,postaction={decorate,decoration={raise=.5ex,text along path,text
align=center,text={|\scriptsize|divide by 100{\%}}}}] (a) to[out=-60,in=-120] (b);
\end{tikzpicture}
\end{document}
两者都给予