方程部分周围带有箭头的彩色圆圈

方程部分周围带有箭头的彩色圆圈

我想知道是否有可能有一个更紧凑的圆形块,如下所示:在此处输入图片描述

这是我的代码:

\documentclass{book}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{mathptmx}
\usepackage{calc}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc,,arrows,shapes,decorations.pathreplacing}
\tikzset{every picture/.style={remember picture}}

\begin{document}

\begin{align}
\hat{x}^{-}_{k+1} & = \tikz[baseline]{ \node[draw=red,fill=red!20,anchor=base,circle,inner sep = 0pt]
  (d1) {$e^{-1}\hat{x}_{k}$}}\vspace{3cm}\nonumber\\
\hat{x}_{k+1} & = \hat{x}^{-}_{k+1} + K_{k+1}(z_{k+1}-e^{-1}\hat{x}_{k})\nonumber
\end{align}

\begin{tikzpicture}[overlay,remember picture]
\draw[red,thick,->] (d1) to [in=90,out=235] +(270:1cm) node[anchor=north,text = black,] {};
\end{tikzpicture}

\end{document} 

现有的圆圈(红色)太大,使得等式看起来很不协调。

答案1

像这样:

在此处输入图片描述

很简单,只需将形状替换circleellipse

\documentclass{book}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{mathptmx}
\usepackage{calc}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc,,arrows,shapes,decorations.pathreplacing}
\tikzset{every picture/.style={remember picture}}

\usepackage[active,tightpage]{preview}% just for showing only equation
    \setlength\PreviewBorder{1em}

    \begin{document}
\begin{preview}% <----
\begin{align}
\hat{x}^{-}_{k+1} & = \tikz[baseline]{\node[draw=red,fill=red!20,anchor=base,
                                            ellipse,inner xsep=-1pt,inner ysep=0pt]
                                        (d1) {$e^{-1}\hat{x}_{k}$}}
                        \notag   \\[1em]
\hat{x}_{k+1} & = \hat{x}^{-}_{k+1} + K_{k+1}(z_{k+1}-e^{-1}\hat{x}_{k})\nonumber
\end{align}

\begin{tikzpicture}[overlay,remember picture]
\draw[red,thick,->] (d1) to [in=90,out=225] +(255:8mm);
\end{tikzpicture}
\end{preview}% <---
    \end{document} 

编辑:现在我稍微清理一下你的 MWE......

相关内容