
multline
當我嘗試使用案例內的環境時收到錯誤訊息。這是我的等式:
\begin{equation} \label{eq:SMSKIN_TU2009}
\begin{split}
SM_{SKIN,Int} &= SM_{SKIN,Old} + INI - Q_M - EA_{SKIN} + SM_{SKIN,Upd} \\
SM_{SKIN,New} &=
\begin{cases}
FC_{SKIN} &
\begin{multline}
\quad \text{if } SM_{SKIN,Int} > FC_{SKIN}, \quad Q_{SKIN} = SM_{SKIN,Int} - \\ FC_{SKIN}
\end{multline} \\
0 & \quad \text{if } SM_{SKIN,Int} < 0, \quad Q_{SKIN} = 0\\
SM_{SKIN,Int} & \quad \text{otherwise }, \quad Q_{SKIN} = 0\\
\end{cases}
\end{split}
\end{equation}
如果我不使用該multline
環境,方程式會正確顯示,但編譯器會拋出警告,因為該行不適合頁面。
我感謝你的所有幫助。謝謝!
答案1
正如@GuM所建議的,您可以加載mathtools
包(包的超集amsmath
)並使用其multlined
環境而不是非法multline
環境但是,我認為您最好使用簡單的方法\parbox
來顯示有問題的材料。
我還將用來\mathit
排版多字母變數名稱並\mathrm
排版放置在下標中的首字母縮寫。
\documentclass{article}
\usepackage{mathtools} % for 'dcases' env.
\begin{document}
\begin{equation} \label{eq:SMSKIN_TU2009}
\begin{split}
\mathit{SM}_{\mathrm{SKIN},\mathrm{Int}}
&= \mathit{SM}_{\mathrm{SKIN},\mathrm{Old}} + \mathit{INI}
- Q_M - \mathit{EA}_{\mathrm{SKIN}}
+ \mathit{SM}_{\mathrm{SKIN},\mathrm{Upd}} \\
\mathit{SM}_{\mathrm{SKIN},\mathrm{New}}
&= \begin{dcases}
\mathit{FC}_{\mathrm{SKIN}}
%% set up a parbox with automatic hanging indentation from the 2nd line onward
&\parbox[t]{6cm}{\raggedright\hangafter1\hangindent1em
if $\mathit{SM}_{\mathrm{SKIN},\mathrm{Int}}
> \mathit{FC}_{\mathrm{SKIN}}$,
$Q_{\mathrm{SKIN}} =
\mathit{SM}_{\mathrm{SKIN},\mathrm{Int}}
- \mathit{FC}_{\mathrm{SKIN}}$} \\
0 & \text{if $\mathit{SM}_{\mathrm{SKIN},\mathrm{Int}} < 0$,
$Q_{\mathrm{SKIN}} = 0$}\\
\mathit{SM}_{\mathrm{SKIN},\mathrm{Int}}
& \text{otherwise, $Q_{\mathrm{SKIN}} = 0$}
\end{dcases}
\end{split}
\end{equation}
\end{document}