如何将箭头从文本气泡指向LaTex中的等式?

时间:2017-04-15 22:15:44

标签: latex xelatex

我可以创建一个这样的页面:

screen shot of the result

使用以下代码

\documentclass{article}


\usepackage{tikz}
\usetikzlibrary{fit, calc} 
\usepackage{fontspec}
\newfontfamily{\myfont}{Arial}
\usepackage{marginnote}
\newcommand\commentary[2]{%
\tikz[remember picture, baseline={(here.base)}] \node (here) {#1};%
\marginpar{
\begin{tikzpicture}[remember picture, overlay]
    \begin{scope}[rotate=(rand*10),shift={(1.8,0)}]
        \node [text width=3cm, align=center, transform shape] (text) at (0, 0) {\footnotesize \myfont #2};
        \draw [transform shape, thick] plot [smooth, tension=0.8] coordinates {
          ($(text.south) + (-10pt, -5pt) + (rand * 2pt, rand * 2pt)$) 
          ($(text.south east) + (-5pt, 5pt)$)
          ($(text.north east) + (rand * 2pt - 5pt, rand * 2pt)$)
          ($(text.north west) + (rand * 2pt + 5pt, rand * 2pt)$)
          ($(text.south west) + (rand * 2pt + 5pt, rand * 2pt)$)
          ($(text.south) + (10pt, -3pt) + (rand * 2pt, rand * 2pt)$)
        };
    \end{scope}
    \draw[->, thick] ($(text.south west) - (-10pt, 5pt)$)  to [bend left=20] ($(here.south east) - (3pt, 2pt)$);
\end{tikzpicture}
}
}

\begin{document}
The equation of a plane through $(x_0,y_0,z_0)$ \commentary{is:}{The tangent plane: $\nabla f(\mathbf{x})\cdot (\mathbf{x}-\mathbf{x}_0)=0$.}
$$a(x-x_0)+b(y-y_0)+c(z-z_0)=0$$
The vector $(a,b,c)$ is normal to the plane. 


\end{document}

(1)如何将箭头指向等式(例如,在显示问题中进行+符号)而不是文本中的单词(在此示例中为“is:”的内容)?

(2)如何将文字气泡向上或向下移动1厘米?

0 个答案:

没有答案