等式之间的旁注(左)

Side comment between equation (LEFT)

找到了如下页面,差不多就是我想要的https://tex.stackexchange.com/questions/344379/side-comment-between-equation/344386#344386

谁能解释一下我必须做些什么才能将这个箭头放在等式的左边?因为这就是我现在拥有的 wrong arrow

提前致谢

您需要:

  • tikzmark移到等式的另一边;
  • 反转曲线:.. controls +(-1,0) and +(-1,0) .. ;
  • 重新调整起始位置:\newcommand\sidecomment[5][-0.5,0.1]% ;
  • 将附加到曲线的文本移动并对齐到另一侧:node[left,align=right]{#5}

结果如下:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark,arrows,calc}
\usepackage{amsmath}
\newcommand\sidecomment[5][-0.5,0.1]%
  {\begin{tikzpicture}[remember picture,overlay]
   \draw[-stealth',thick]
     ($({pic cs:#4}|-{pic cs:#2})+(#1)$)
     .. controls +(-1,0) and +(-1,0) ..
     node[left,align=right]{#5}
     ($({pic cs:#4}|-{pic cs:#3})+(#1)$);
   \end{tikzpicture}%
  }
\begin{document}
\begin{align*}
\tikzmark{a}\beta_1^*
&= \frac{\sum_{i=1}^n(x_i^*-\hat x^*)y_i^*}{\sum_{i=1}^n(x_i^*-\hat x^*)^2}\
\tikzmark{b}&= \frac{\sum_{i=1}^n(w_2x_i-w_2\hat x)w_1y_i}{\sum_{i=1}^n(w_2x_i-w_2\hat x)^2}
\end{align*}
\sidecomment{a}{b}{b}{since $y_i^*=w_1y_i$\and $x_i*=w_2x_i$}
\end{document}