请考虑以下示例:
\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
包(用于\RaggedRight
命令),以及(c)定义一个名为的实用程序宏,\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}