我怎样才能对方程式段落做出大量的多行注释?

我怎样才能对方程式段落做出大量的多行注释?

我试图清楚地解释这个公式中等式右边的一些段落,但总是出错(我的意思是我不喜欢这个结果的美感)。你能帮助我吗?

这是我最近的尝试:

\documentclass{article}
\usepackage{amsmath}
\usepackage[margin=1.5in]{geometry}
\begin{document}
\begin{equation}
    \begin{aligned}
    \eta &=\frac{W}{F(\rho_M)-F(\rho_M')}=\frac{W}{F(\rho_M)-F(\rho_S')-F(\rho_A')}=  &\textrm{\parbox{8em}{from point 4. of the list above,}} \\
     &=\frac{F(\rho_W')-F(\rho_W)}{F(\rho_M)+F(\rho_S')+F(\rho_W')-F(\gamma_{SW},H')-F(\rho_S')}=  &\textrm{\parbox{8em}{from the equality  between point 3. and 4.,}}\\
     &=\frac{F(\rho_W')}{F(\rho_W')-F(\gamma_{SW},H')}= & \textrm{\parbox{8em}{from point 1.  $F(\rho_M)=F(\rho_W)=0$,}}\\
     &=\frac{1}{1-\frac{F(\gamma_{SW},H')}{F(\rho_W')}}  & \textrm{\parbox{8em} {obtained by dividing numerator  and denominator by $F(\rho_W')$.}}
    \end{aligned}
\end{equation}
\end{document}

在此处输入图片描述

答案1

我会使用顶部对齐\parbox并将其放入宏中,这样如果您决定更改外观,就可以一次性更改所有内容。此外,还\raggedright有助于避免在窄列中出现较宽的单词间空间。\textrm不需要换行\parbox。我还会放弃=每行数学末尾的尾随。

\documentclass{article}
\usepackage{amsmath}
\usepackage[margin=1.5in]{geometry}
\newcommand\mynote[1]{\parbox[t]{8em}{\raggedright#1}}
\begin{document}
\begin{equation}
    \begin{aligned}
    \eta &=\frac{W}{F(\rho_M)-F(\rho_M')}=\frac{W}{F(\rho_M)-F(\rho_S')-F(\rho_A')}  &\mynote{from point 4. of the list above,} \\
     &=\frac{F(\rho_W')-F(\rho_W)}{F(\rho_M)+F(\rho_S')+F(\rho_W')-F(\gamma_{SW},H')-F(\rho_S')}  &\mynote{from the equality  between point 3. and 4.,}\\
     &=\frac{F(\rho_W')}{F(\rho_W')-F(\gamma_{SW},H')} & \mynote{from point 1.  $F(\rho_M)=F(\rho_W)=0$,}\\
     &=\frac{1}{1-\dfrac{F(\gamma_{SW},H')}{F(\rho_W')}}  & \mynote{obtained by dividing numerator  and denominator by $F(\rho_W')$.}
    \end{aligned}
\end{equation}
\end{document}

在此处输入图片描述

例如,添加\footnotesize\mynote宏会产生以下结果:

在此处输入图片描述

答案2

这里有三种可能性。我定义了一个\eqnote命令,它显示其文本footnotesize并具有可选宽度(默认 0.32\linewidth):

\documentclass{report}
\usepackage[showframe]{geometry}
\usepackage{mathtools}
\usepackage{ragged2e}
\newcommand{\eqnote}[2][0.32\linewidth]{\parbox{#1}{\footnotesize\upshape\RaggedRight#2}}

\begin{document}

\begin{equation}
  \begin{aligned}
    η& =\frac{W}{F(\rho_M)-F(\rho_M')} = \frac{W}{F(\rho_M)-F(\rho_S')-F(\rho_A')} & \eqnote{from point 4. of the list above,} \\
         & =\frac{F(\rho_W')-F(\rho_W)}{F(\rho_M)+F(\rho_S')+F(\rho_W')-F(\gamma_{SW},H')-F(\rho_S')} & \eqnote{from the equality between points 3. and 4.,} \\
         & =\frac{F(\rho_W')}{F(\rho_W')-F(\gamma_{SW},H')} & \eqnote{from point 1. $F(\rho_M)=F(\rho_W)=0$,} \\
         & =\frac{1}{1-\frac{F(\gamma_{SW},H')}{F(\rho_W')}} & \eqnote{obtained by dividing numerator and denominator by $F(\rho_W')$.}
  \end{aligned}
\end{equation}

\begin{equation}
  \begin{alignedat}{3}
    & \qquad & η&=\frac{W}{F(\rho_M)-F(\rho_M')} = \frac{W}{F(\rho_M)-F(\rho_S')-F(\rho_A')} &\quad & \eqnote{from point 4. of the list above,} \\
    & & &=\frac{F(\rho_W')-F(\rho_W)}{F(\rho_M)+F(\rho_S')+F(\rho_W')-F(\gamma_{SW},H')-F(\rho_S')} & & \eqnote{from the equality between points 3. and 4.,}\\
    & & &=\frac{F(\rho_W')}{F(\rho_W')-F(\gamma_{SW},H')} & & \eqnote{from point 1. $F(\rho_M)=F(\rho_W)=0$,}\\
    & & &=\frac{1}{1-\frac{F(\gamma_{SW},H')}{F(\rho_W')}} & & \eqnote{obtained by dividing numerator and denominator by $F(\rho_W')$.}
  \end{alignedat}
\end{equation}

\begin{flalign}
  && η&=\frac{W}{F(\rho_M)-F(\rho_M')} = \frac{W}{F(\rho_M)-F(\rho_S')-F(\rho_A')} & & \eqnote{from point 4. of the list above,} \notag\\
  & & &=\frac{F(\rho_W')-F(\rho_W)}{F(\rho_M)+F(\rho_S')+F(\rho_W')-F(\gamma_{SW},H')-F(\rho_S')} & & \eqnote{from the equality between points 3. and 4.,}\notag\\[-2ex]
  \\[-1ex]
  & & &=\frac{F(\rho_W')}{F(\rho_W')-F(\gamma_{SW},H')} & & \eqnote{from point 1. $F(\rho_M)=F(\rho_W)=0$,}\notag\\
  & & & =\frac{1}{1-\frac{F(\gamma_{SW},H')}{F(\rho_W')}} & & \eqnote{obtained by dividing numerator and denominator by $F(\rho_W')$.}\notag
\end{flalign}


\end{document} 

在此处输入图片描述

答案3

尝试使用varwidth,这样就会使用真正需要的最大宽度。

该命令\eqnote有一个可选参数,用于指定最大分配宽度,请查看两种情况的区别(第一种情况使用默认的 8em)。行间似乎需要更多的垂直空间。

我会删除尾随的等号,因为它们会分散注意力(并且通常不使用)。

\documentclass{article}
\usepackage[margin=1.5in]{geometry}
\usepackage{amsmath}
\usepackage{varwidth}

\newcommand{\eqnote}[2][8em]{%
  \begin{varwidth}{#1}
  \raggedright\footnotesize
  #2
  \end{varwidth}%
}


\begin{document}

\begin{equation}
\begin{aligned}
\eta &=\frac{W}{F(\rho_M)-F(\rho_M')}=\frac{W}{F(\rho_M)-F(\rho_S')-F(\rho_A')}
     &&\eqnote{from point 4. of the list above,}\\[1ex]
     &=\frac{F(\rho_W')-F(\rho_W)}{F(\rho_M)+F(\rho_S')+F(\rho_W')-F(\gamma_{SW},H')-F(\rho_S')}
     &&\eqnote{from the equality  between point 3. and 4.,}\\[1ex]
     &=\frac{F(\rho_W')}{F(\rho_W')-F(\gamma_{SW},H')}
     &&\eqnote{from point 1.  $F(\rho_M)=F(\rho_W)=0$,}\\[1ex]
     &=\frac{1}{1-\frac{F(\gamma_{SW},H')}{F(\rho_W')}}
     &&\eqnote{obtained by dividing numerator  and denominator by $F(\rho_W')$.}
    \end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\eta &=\frac{W}{F(\rho_M)-F(\rho_M')}=\frac{W}{F(\rho_M)-F(\rho_S')-F(\rho_A')}
     &&\eqnote[10em]{from point 4. of the list above,}\\[1ex]
     &=\frac{F(\rho_W')-F(\rho_W)}{F(\rho_M)+F(\rho_S')+F(\rho_W')-F(\gamma_{SW},H')-F(\rho_S')}
     &&\eqnote[10em]{from the equality  between point 3. and 4.,}\\[1ex]
     &=\frac{F(\rho_W')}{F(\rho_W')-F(\gamma_{SW},H')}
     &&\eqnote[10em]{from point 1.  $F(\rho_M)=F(\rho_W)=0$,}\\[1ex]
     &=\frac{1}{1-\frac{F(\gamma_{SW},H')}{F(\rho_W')}}
     &&\eqnote[10em]{obtained by dividing numerator  and denominator by $F(\rho_W')$.}
    \end{aligned}
\end{equation}

\end{document}

在此处输入图片描述

相关内容