在某些計算步驟中加入較長的註釋

在某些計算步驟中加入較長的註釋

考慮以下範例:

\documentclass[11pt]{scrartcl}
\usepackage{amsmath}
\usepackage{IEEEtrantools} 
\usepackage{commath}
\usepackage{lipsum}

\begin{document}
\section{Docendo discimus}
\label{sec:docendo-discimus}

\lipsum[2]
\begin{IEEEeqnarray*}{rCl}
    F_{u}(u) &=& \int_{0}^{u}\int_{0}^{y_{1}}3y_{1} \dif y_{2} \dif y_{1} + \int_{u}^{1}\int_{y_{1}-u}^{y_{1}}3y_{1}\dif y_{2} \dif y_{1} \\[0.5em]
    &=& \int_{0}^{u}\left[\eval{3y_{1}y_{2}}_{0}^{y_{1}}\right] \dif y_{1} + \int_{u}^{1}\left[\eval{3y_{1}y_{2}}_{y_{1}-u}^{y_{1}}\right] \dif y_{1} \\[0.5em]
    &=& \int_{0}^{u}3y_{1}^{2}\dif y_{1} + \int_{u}^{1}3y_{1}u \dif y_{1}u \\[0.5em]
    &=& \left[\eval{3 \frac{1}{3}y^{3}}_{0}^{u}\right] + \left[\eval{3 \frac{1}{2}y_{1}^{2}u}_{u}^{1}\right] \\[0.5em]
    &=& u^{3} + \frac{3}{2}u - \frac{3}{2}u^{3} \\[0.5em]
    \IEEEyesnumber
    &=& \frac{1}{2}(3u - u^{3})
  \end{IEEEeqnarray*}
  \lipsum[4]
\end{document}

在此輸入影像描述

現在假設我想添加一些詳細的解釋,說明從計算的第一行到第二行發生的情況。

我知道我可以輕鬆添加一個文字列以結束此操作: 在此輸入影像描述

我認為解決這個問題的一種方法是以某種方式用類似(*),(**)類似於末尾數字的註釋來標記行,然後在計算完成後引用它們。有辦法實現這一點嗎?

我知道我可以使用腳註,但我不想那樣。

如果有人有任何其他想法以美觀的方式解決這個問題,請與我分享。

答案1

我有時也遇到類似的問題,我解決如下:

\documentclass{article}
\usepackage{youngtab,young}
\usepackage{amsmath,cancel}
\newcommand{\CenterObject}[1]{\ensuremath{\vcenter{\hbox{#1}}}}
\begin{document}
\section*{Multiplying Young tableaux}
\begin{enumerate}\renewcommand{\labelenumi}{step \arabic{enumi}.}
 \item In the first tableau, label all boxes of the first row with an $a$, the
  boxes of the second row with a $b$ etc.\label{EnumYoungStep1}
  \item
   \begin{enumerate}\renewcommand{\labelenumii}{(\alph{enumii})}
    \item Sum all schemes with decreasing skyline which may be obtained by
    combining the second tableau with boxes of type $a$. Make sure that no
    column contains more than $N$ boxes and no two $a$s appear in the same
    column.\label{EnumYoungStep2}
    \item Continue in the same way with boxes of type $b$.
    \label{EnumYoungStep3}
    \item Etc.
  \end{enumerate}
  \item Drop all columns with $N$ boxes (as long as the scheme is not just such
   a column).\label{EnumYoungStep4}
  \item For each of the resulting schemes, build a string of characters by
   reading the first row from the right to the left, then the second row from
   the right to the left, and so on. If a given string contains left of an
   arbitrary character more $b$s than $a$s or more $c$s than $b$s etc., drop
   this string.\label{EnumYoungStep5}
\end{enumerate}\renewcommand{\labelenumi}{\arabic{enumi}.}

\paragraph{Example.}
Consider $\text{SU}(3)$. The gauge bosons transform in the adjoint representation. We
reduce the tensor product of the adjoint representation with itself:
\begin{eqnarray*}
 \lefteqn{
  \CenterObject{\yng(2,1)}\otimes \CenterObject{\yng(2,1)}
  ~ \xrightarrow{\mathrm{step}\:\ref{EnumYoungStep1}} ~
  \CenterObject{\young(aa,b)} \otimes \CenterObject{\yng(2,1)}} \\
  & \xrightarrow{\mathrm{step}\:\mathrm{\ref{EnumYoungStep2}}} &
  \CenterObject{\young(\hfil\hfil aa,\hfil)} \oplus \CenterObject{\young(\hfil\hfil a,\hfil a)}
  \oplus \CenterObject{\young(\hfil\hfil a,\hfil,a)} \oplus
  \CenterObject{\young(\hfil\hfil,\hfil a,a)}\\
  & \xrightarrow{\mathrm{step}\:\mathrm{\ref{EnumYoungStep3}}} &
  \CenterObject{
    \young(\hfil\hfil aab,\hfil)}
  \oplus
  \CenterObject{\young(\hfil\hfil aa,\hfil b)}
  \oplus
  \CenterObject{\young(\hfil\hfil aa,\hfil,b)}
  \oplus
  \CenterObject{\young(\hfil\hfil ab,\hfil a)}
  \oplus
  \CenterObject{\young(\hfil\hfil a,\hfil ab)}\\
  && {} \oplus
  \CenterObject{\young(\hfil\hfil a,\hfil a,b)}
  \oplus
  \CenterObject{\young(\hfil\hfil ab,\hfil,a)}
  \oplus
  \CenterObject{\young(\hfil\hfil a,\hfil b,a)}
  \oplus
  \CenterObject{\young(\hfil\hfil b,\hfil a,a)}
  \oplus
  \CenterObject{\young(\hfil\hfil,\hfil a,ab)}
    \\
  & \xrightarrow[\mathrm{step}\:\ref{EnumYoungStep5}]{\mathrm{step}\:\ref{EnumYoungStep4}} &
  \cancel{\CenterObject{
    \young(\hfil\hfil aab,\hfil)}}
  \oplus
  \CenterObject{\young(\hfil\hfil aa,\hfil b)}
  \oplus \dots
    \\
  & = &
  \CenterObject{
    \young(\hfil\hfil\hfil\hfil,\hfil\hfil)
    }
  \oplus
  \CenterObject{
    \young(\hfil\hfil\hfil)
    }
  \oplus
  \CenterObject{
    \young(\hfil\hfil\hfil,\hfil\hfil\hfil)}
  \oplus 2\cdot
  \CenterObject{
    \young(\hfil\hfil,\hfil)}
  \oplus
  \CenterObject{
    \young(\hfil,\hfil,\hfil)}
    \\
  & = & \boldsymbol{27} \oplus \boldsymbol{10} \oplus \overline{\boldsymbol{10}}
  \oplus 2\cdot \boldsymbol{8} \oplus \boldsymbol{1}\;.
 \end{eqnarray*}
\end{document} 

在此輸入影像描述

更新:這是您的程式碼的應用程式:

\documentclass[11pt]{scrartcl}
\usepackage{amsmath}
\usepackage{IEEEtrantools} 
\usepackage{commath}
\usepackage{lipsum}

\begin{document}
\section{Docendo discimus}
\label{sec:docendo-discimus}

\lipsum[2]
\begin{IEEEeqnarray*}{rCl}
    F_{u}(u) &=& \int_{0}^{u}\int_{0}^{y_{1}}3y_{1} \dif y_{2} \dif y_{1} + \int_{u}^{1}\int_{y_{1}-u}^{y_{1}}3y_{1}\dif y_{2} \dif y_{1} \\[0.5em]
    &\stackrel{(\ref{step1})}{=}& \int_{0}^{u}\left[\eval{3y_{1}y_{2}}_{0}^{y_{1}}\right] \dif y_{1} + \int_{u}^{1}\left[\eval{3y_{1}y_{2}}_{y_{1}-u}^{y_{1}}\right] \dif y_{1} \\[0.5em]
    &\stackrel{(\ref{step2})}{=}& \int_{0}^{u}3y_{1}^{2}\dif y_{1} + \int_{u}^{1}3y_{1}u \dif y_{1}u \\[0.5em]
    &\stackrel{(\ref{step3})}{=}& \left[\eval{3 \frac{1}{3}y^{3}}_{0}^{u}\right] + \left[\eval{3 \frac{1}{2}y_{1}^{2}u}_{u}^{1}\right] \\[0.5em]
    &\stackrel{(\ref{step4})}{=}& u^{3} + \frac{3}{2}u - \frac{3}{2}u^{3} \\[0.5em]
    \IEEEyesnumber
    &\stackrel{(\ref{step5})}{=}& \frac{1}{2}(3u - u^{3})
  \end{IEEEeqnarray*}
\begin{enumerate}\renewcommand{\labelenumi}{(\arabic{enumi})}
 \item\label{step1} In the first step, we perform the $y_2$ integrals.
 \item\label{step2} In the second step, we evaluate the inner integrals.
 \item\label{step3} In the first step, we perform the $y_1$ integrals.
 \item\label{step4} \dots
 \item\label{step5} \dots
\end{enumerate}
  \lipsum[4]
\end{document}

在此輸入影像描述

我假設最終您的方程式編號將變為(section.number),否則我建議以不同的方式標記步驟。

答案2

由於您正在使用該IEEEeqnarray環境,我建議您(a)添加一s列(“文本,左對齊”),(b)加載ragged2e包(用於命令),以及(c)定義一個名為\RaggedRight的實用程式巨集\mybox

\newcommand\mybox[2][4.5cm]{\parbox[t]{#1}{\RaggedRight #2}}

這是一個\parbox.允許\parbox其參數自動換行。它的預設寬度設定為 4.5cm,但可以根據需要透過編寫(例如)來覆蓋它\mybox[6cm]{...}

兩則附加評論。 (i) 觀察使用\tfrac(“文字樣式分數”) 而不是\frac。 (ii) 我認為綜合評估資料的易讀性可以透過以下方式提高:不是使用\left\right自動調整方括號大小,不使用\eval{...}.使用\biggl[\biggr]、 和\Big\vert可以防止「柵欄」變得太大並(從視覺上來說)佔據整個公式。

在此輸入影像描述

\documentclass[11pt]{scrartcl}
\usepackage{amsmath}
\usepackage{IEEEtrantools} 
\usepackage{commath,lipsum,ragged2e}
\newcommand\mybox[2][4.5cm]{\parbox[t]{#1}{\RaggedRight #2}}

\begin{document}
\section{Docendo discimus} \label{sec:docendo-discimus}

\lipsum[2]
\begin{IEEEeqnarray*}{rCls}
F_u(u) 
    &=& \int_0^u\!\int_0^{y_1}3y_1      \dif y_2 \dif y_1 
       +\int_u^1\!\int_{y_1-u}^{y_1}3y_1\dif y_2 \dif y_1 
        &\quad\mybox{(there's now enough space for some explanatory text)}\\
    &=& \int_0^u\biggl[3y_1y_2\Big\vert_0^{y_1}      \biggr]\dif y_1 
       +\int_u^1\biggl[ y_1y_2\Big\vert_{y_1-u}^{y_1}\biggr]\dif y_1\\[1ex]
    &=& \int_0^u3y_1^2 \dif y_1 
       +\int_u^13y_1  u\dif y_1 u \\[1ex]
    &=& \biggl[3\tfrac{1}{3}y^3   \Big\vert_0^u\biggr] 
       +\biggl[3\tfrac{1}{2}y_1^2u\Big\vert_u^1\biggr] \\[1ex]
    &=& u^3 + \tfrac{3}{2}u - \tfrac{3}{2}u^3 \\[0.5ex]
    \IEEEyesnumber
    &=& \tfrac{1}{2}(3u - u^3)
  \end{IEEEeqnarray*}
  \lipsum[4]
\end{document}

答案3

這是一個基於alignedat, fleqn(來自nccmath) 和linegoal包的解決方案,它用於定義一個\parbox 帶有寬度的行上的剩餘空間。此外,為了改善整體外觀,我更改了評估垂直規則的大小,並將小數係數替換為中等大小的分數:

\documentclass[11pt]{scrartcl}
\usepackage{amsmath, nccmath}
\usepackage{linegoal}
\usepackage{IEEEtrantools}
\usepackage{commath}
\usepackage{lipsum}

\begin{document}

\section{Docendo discimus}
\label{sec:docendo-discimus}

\lipsum[2]
\begin{fleqn}
\begin{equation}
\begin{alignedat}[b]{2}
    F_{u}(u) &= \int_{0}^{u}\!\!\int_{0}^{y_{1}}3y_{1} \dif y_{2} \dif y_{1} + \int_{u}^{1}\!\!\int_{y_{1}-u}^{y_{1}}3y_{1}\dif y_{2} \dif y_{1}
     & \qquad & \rlap{\parbox[t]{\linegoal}{\footnotesize(There is not enough space here. I need more)}}\\
    &= \int_{0}^{u}\left[\eval[2]{3y_{1}y_{2}}_{0}^{y_{1}}\right] \dif y_{1} + \int_{u}^{1}\left[\eval[2]{3y_{1}y_{2}}_{y_{1}-u}^{y_{1}}\right] \dif y_{1} \\
    &= \int_{0}^{u}3y_{1}^{2}\dif y_{1} + \int_{u}^{1}3y_{1}u \dif y_{1}u \\
    &= \left[\eval[2]{3\, \mfrac{1}{3}y^{3}}_{0}^{u}\right] + \left[\eval[2]{3\, \mfrac{1}{2}y_{1}^{2}u}_{u}^{1}\right] \\
    &= u^{3} + \mfrac{3}{2}u - \mfrac{3}{2}u^{3} \\
    &= \mfrac{1}{2}(3u - u^{3})
  \end{alignedat}
\end{equation}
\end{fleqn}
  \lipsum[4]

\end{document} 

在此輸入影像描述

相關內容