1

I am getting an error message when I try to use the multline environment inside cases. This is my equation:

\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}

If I don't use the multline environment, the equation is correctly displayed but the compiler throws a warning since the line doesn't fit the page.

I appreciate all your help. Thanks!

  • 2
    It should not use multline in any case, try aligned probably best with the [t] option – daleif Aug 2 at 14:05
  • aligned also shows errors... can you please provide a more explicit answer @daleif ? – Rodolfo Aug 2 at 14:21
  • 1
    Aligned works just fine, would you please provide a full minimal example including preamble and document class, I just added document class and amsmath and replaced multline with aligned, compiles out of the box. – daleif Aug 2 at 14:25
  • 3
    You might also want to have a look at the mathtools package and at its multlined environment. – GuM Aug 2 at 15:39
4

As @GuM has suggested, you could load the mathtools package (a superset of the amsmath package) and use its multlined environment instead of the illegal multline environment However, I think you're better off using a simple \parbox to display the material in question.

I would also use \mathit to typeset the multi-letter variable names and \mathrm to typeset the acronyms placed in the subscripts.

enter image description here

\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}
  • 1
    thanks a lot @Mico, that's exactly how I wanted to display it. – Rodolfo Aug 3 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.