您能帮我解决我的问题吗?我已经使用了以下主题中的答案:数学方程式中单个项上的圆圈和箭头效果很好。但是当表达式为分母时,是否可以有一个向下的箭头?我想要这样的结果:
答案1
这是一个可以完成您想要的操作的宏。
用法是\goesto[<tikz options>]{<text>}{<angle>}{<content>}
。
\documentclass{article}
\usepackage{tikz}
\newcommand{\tolength}{.7} % length of arrows in cm from node center
\newcommand{\goesto}[4][]% usage: \goesto[<tikz options>]{<text>}{<angle>}{<content>}
{\tikz[baseline]{
\node[inner sep=0,anchor=base](A){$#4$};
\path(A)--++(0,{(\tolength+.15)*sin(#3)}); % vertical space to avoid overlapping other lines
\draw[overlay,->,#1](A)--++(#3:\tolength)node[shift={(#3:.15)}]{\scriptsize #2};
}}
\begin{document}
This is the line above. This is the line above. This is the line above.
\[
\lim_{n\to\infty}\frac
{\goesto[blue]{0}{45}{\frac{1}{n^2}}+\goesto[blue]{0}{45}{\frac{1}{n}}}
{\goesto[shorten <=1pt]{unchanged}{225}{6}+\goesto[orange, thick, densely dotted]{0}{-45}{\frac{8}{n^3}}}
=\frac{0}{6}=0
\]
This is the line below. This is the line below. This is the line below.
\end{document}