2

I would like to write a new line associated to the same equation inside a subnumcases environment, as the whole equation is too big to fit into a single line. For that purpose, I tried to use the \\ command to create the new line, writing the following code (see the equation associated to the second label \label{eq:T_trh_rot_equation_1D_implementation}):

\documentclass{article}
\usepackage{amsmath}    
\usepackage{cases}    

\begin{document}

\begin{subnumcases}{}
\frac{d c_{s,e,v}}{d x}=\frac{\dot{\omega}_{s,e,v}}{\rho u},\,\,\,\,\,\,\,\,\,\forall s,\,e\,\text{and }v\text{ ,}
\label{eq:mass_equation_ve_1D_final_implementation}
\\
\frac{d T_{\text{tr}_\text{h}}}{dx}+\frac{\left(\sum_{s\in\{\text{h}\}} c_s\right)u}{\sum_{s\in\{\text{h}\}}c_sC_{p,s,\text{tr-rot}}}\cdot\frac{du}{dx}=\\
=-\frac{\dot{\Omega}_{\text{rad}}+\left(\sum_s\dot{\Omega}_{s,\text{e}}^{\text{int}}\right)+\left[\sum_{s\in\{\text{h}\}}\dot{\omega}_s\left(h_s+\frac{1}{2}u^2\right)\right]+\left[\sum_{s\in\{\text{h}\},e,v}\left(\dot{\omega}_{s,e,v}-\frac{c_{s,e,v}}{c_s}\dot{\omega}_s\right)\frac{\epsilon_{s,\text{el-vib},e,v}}{m_s}\right]}{\rho u\left(\sum_{s\in\{\text{h}\}}c_sC_{p,s,\text{tr-rot}}\right)}\text{ ,}
\label{eq:T_trh_rot_equation_1D_implementation}
\\
\frac{d T_{\text{tr}_\text{e}}}{d x}+\frac{u}{C_{p,\text{e}}}\frac{du}{dx}=\frac{\left(\sum_s\dot{\Omega}_{s,\text{e}}^{\text{int}}\right)-\dot{\omega}_\text{e}\left(h_\text{e}+\frac{1}{2}u^2\right)}{\rho u c_\text{e}C_{p,\text{e}}}\text{ .}
\label{eq:T_tre_equation_1D_implementation}
\end{subnumcases}

\end{document}

This results in: enter image description here Two reference numbers, (1b) and (1c), are assigned to the two lines since the subnumcases environment uses this command to separate equations. I just want one label (i.e. the current (1c) which should be changed to "(1b)" due to the supressing of the previous (1b)), since it corresponds to a single equation. Is there any command to make a new line for the same equation giving it a single label?

2
  • There are many \,\,\,\,\,\,\,\,\, in your code. You can use also \quad or \qquad. – Sebastiano Mar 15 at 23:47
  • 1
    You're right. Thank you for the advice! – Élio Pereira Mar 16 at 11:32
0

I figured it out a way of writing an equation divided into two lines inside the subnumcases environment, and giving it a single label. It required the use of the \parbox command which allows the \\ command to be inserted without creating a new equation. The length of the box was defined as the one associated to the second line (since it is the biggest of the two) by using the \widthof command (of the calc package), which computes it. The new code is

\documentclass{article}
\usepackage{amsmath}    
\usepackage{cases}    
\usepackage{calc}

\begin{document}

\begin{subnumcases}{}
\frac{d c_{s,e,v}}{d x}=\frac{\dot{\omega}_{s,e,v}}{\rho u},\,\,\,\,\,\,\,\,\,\forall s,\,e\,\text{and }v\text{ ,}
\label{eq:mass_equation_ve_1D_final_implementation}
\\
\parbox{
\widthof{$
\displaystyle
=-\frac{\dot{\Omega}_{\text{rad}}+\left(\sum_s\dot{\Omega}_{s,\text{e}}^{\text{int}}\right)+\left[\sum_{s\in\{\text{h}\}}\dot{\omega}_s\left(h_s+\frac{1}{2}u^2\right)\right]+\left[\sum_{s\in\{\text{h}\},e,v}\left(\dot{\omega}_{s,e,v}-\frac{c_{s,e,v}}{c_s}\dot{\omega}_s\right)\frac{\epsilon_{s,\text{el-vib},e,v}}{m_s}\right]}{\rho u\left(\sum_{s\in\{\text{h}\}}c_sC_{p,s,\text{tr-rot}}\right)}\text{ ,}
$}}
{$
\displaystyle
\frac{d T_{\text{tr}_\text{h}}}{dx}+\frac{\left(\sum_{s\in\{\text{h}\}} c_s\right)u}{\sum_{s\in\{\text{h}\}}c_sC_{p,s,\text{tr-rot}}}\cdot\frac{du}{dx}=\\
=-\frac{\dot{\Omega}_{\text{rad}}+\left(\sum_s\dot{\Omega}_{s,\text{e}}^{\text{int}}\right)+\left[\sum_{s\in\{\text{h}\}}\dot{\omega}_s\left(h_s+\frac{1}{2}u^2\right)\right]+\left[\sum_{s\in\{\text{h}\},e,v}\left(\dot{\omega}_{s,e,v}-\frac{c_{s,e,v}}{c_s}\dot{\omega}_s\right)\frac{\epsilon_{s,\text{el-vib},e,v}}{m_s}\right]}{\rho u\left(\sum_{s\in\{\text{h}\}}c_sC_{p,s,\text{tr-rot}}\right)}\text{ ,}
$}
\label{eq:T_trh_rot_equation_1D_implementation}
\\
\frac{d T_{\text{tr}_\text{e}}}{d x}+\frac{u}{C_{p,\text{e}}}\frac{du}{dx}=\frac{\left(\sum_s\dot{\Omega}_{s,\text{e}}^{\text{int}}\right)-\dot{\omega}_\text{e}\left(h_\text{e}+\frac{1}{2}u^2\right)}{\rho u c_\text{e}C_{p,\text{e}}}\text{ .}
\label{eq:T_tre_equation_1D_implementation}
\end{subnumcases}

\end{document}

which results in enter image description here

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.