Math & Scienceempheq | Progressive Labels (1a,1b,1c, …)

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
veniceboy
Posts: 6
Joined: Mon Jun 20, 2011 10:01 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by veniceboy »

Dear all,

I am getting trying to reach the following result with empheq. I have a system of equation and I would like to numerate each equation as 1a, 1b, 1c... so I can refer both to the single equation (e.g see equation (1a)) and the entire system (e.g. see system (1)). This is what I did but I am not able to make it work:

Code: Select all

 
\begin{empheq}[left=\empheqlbrace]{align}
%
   & \pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} =
     F^{int}_m + F^{int}_w
     \label{eq:1}\\
%     
  &  \pder{ q_{1x} }{t} + \pder{}{x}
    \left( \dfrac{q_{1x}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2  \right) +
    \pder{}{y} \left( \dfrac{q_{1x} \, q_{1y}}{h_1} \right) +
     g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} = -\dfrac{\tau^{int}_x}{\rho_0}
%
    \label{eq:2}\\
  &  \pder{q_{1y}}{t} + \pder{}{x} \left( \dfrac{q_{1y} \, q_{1x}}{h_1} \right) +
    \pder{}{y} \left( \dfrac{q_{1y}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2 \right) +
    g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{y} = - \dfrac{\tau^{int}_y}{\rho_0}
    \label{eq:3}\\
%    
  &  \pder{C_{h1}}{t} + \pder{}{x}\left(\dfrac{C_{h1} q_{1x}}{h_1}\right) +
    \pder{}{y}\left(\dfrac{C_{h1} q_{1y}}{h_1}\right) = F^{int}_m        
%    & \qquad &
    \label{eq:4}\\
%    
  &  \pder{(C_2 h_2)}{t} + \pder{(C_2 \, q_{2x})}{x} +
    \pder{(C_2 q_{2y})}{y} =  - F^{int}_m + F^{bed}_m
    \label{eq:5}\\
%    
  &  \pder{q_{2x}}{t} +
    \pder{}{x} \left( \dfrac{q_{2x}^2}{h_2} + \dfrac{g}{2} h_2^2 \right) +
    \pder{}{y} \left( \dfrac{q_{2x} \, q_{2y}}{h_2} \right) +
     g h_2 \pder{Z_{bed}}{x} + g\dfrac{\rho_1}{\rho_2} h_2 \pder{h_1}{x} =\dfrac{\tau^{int}_x - \tau^{bed}_x}{\rho_2} 
     \label{eq:6}\\
%
  &  \pder{q_{2y}}{t} + \pder{}{x} \left( \dfrac{q_{2y} \, q_{2x}}{h_2} \right) +
    \pder{}{y} \left( \dfrac{q_{2y}^2}{h_2} + \dfrac{g}{2} h_2^2 \right)  + 
    g h_2 \pder{Z_{bed}}{y} +  g\dfrac{\rho_1}{\rho_2} h_2 \pder{h_1}{ y}  =  \dfrac{\tau^{int}_y - \tau^{bed}_y}{\rho_2} 
    \label{eq:7}\\
%    
  &  \pder{Z_b}{t}= - \dfrac{F^{bed}_m }{1-p}\;,  \label{eq:8}
\end{empheq}
 
 
I have two problems: I read a manual about empheq but I did not find a way to have progressive letters on a single number (1a,1b,1c...) instead of progressive numbers on the labels. And the equations numbers return because some lines are too long. Is there a way to force them? Even if they are out of the border I do not care. I tried to split the long equation but I was not able to have a nice output.
thanks
veniceboy

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by localghost »

The amsmath package also provides the »subequations« environment. Just embed your equations in this environment.

Code: Select all

\documentclass[12pt,a4paper,titlepage]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}   % loads »amsmath«
\usepackage{empheq}

\begin{document}
  \begin{subequations}\label{eqn:binomi}
    \begin{empheq}[left=\empheqlbrace]{align}
      (a+b)^2 &= a^2+2ab+b^2 \label{subeqn-1:binomi} \\
      (a-b)^2 &= a^2-2ab+b^2 \label{subeqn-2:binomi} \\
      (a+b)(a-b) &= a^2-b^2 \label{subeqn-3:binomi}
    \end{empheq}
  \end{subequations}

  The Binomi formulae \eqref{eqn:binomi} consist of the equations \eqref{subeqn-1:binomi}, \eqref{subeqn-2:binomi} and \eqref{subeqn-3:binomi}.
\end{document}
Place the label for the whole system right at the beginning as shown above. The single equations are labels as usual.

Regarding the split of the equations further help is only possible with a true minimal example that is compilable as provided.


Best regards and welcome to the board
Thorsten
veniceboy
Posts: 6
Joined: Mon Jun 20, 2011 10:01 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by veniceboy »

Ok thanks adding subequations does what I need for the letter. As for the paging, I either would like to force the labels inline on this minimal example (where no equation is split over 2 lines):

Code: Select all

 \begin{subequations}\label{eqn:binomi} 
\begin{empheq}[left=\empheqlbrace]{align}
%
   & \pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} =
     F^{int}_m + F^{int}_w
     \label{eq:1}\\
%     
  &  \pder{ q_{1x} }{t} + \pder{}{x}
    \left( \dfrac{q_{1x}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2  \right) +
    \pder{}{y} \left( \dfrac{q_{1x} \, q_{1y}}{h_1} \right) +
     g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} = -\dfrac{\tau^{int}_x}{\rho_0}
%
    \label{eq:2}\\
  &  \pder{q_{1y}}{t} + \pder{}{x} \left( \dfrac{q_{1y} \, q_{1x}}{h_1} \right) +
    \pder{}{y} \left( \dfrac{q_{1y}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2 \right) +
    g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{y} =- \dfrac{\tau^{int}_y}{\rho_0}
    \label{eq:3}\\
%    
  &  \pder{C_{h1}}{t} + \pder{}{x}\left(\dfrac{C_{h1} q_{1x}}{h_1}\right) +
    \pder{}{y}\left(\dfrac{C_{h1} q_{1y}}{h_1}\right) = F^{int}_m        
%    & \qquad &
    \label{eq:4}\\
%    
  &  \pder{(C_2 h_2)}{t} + \pder{(C_2 \, q_{2x})}{x} +
    \pder{(C_2 q_{2y})}{y} =  - F^{int}_m + F^{bed}_m
    \label{eq:5}\\
%    
  &  \pder{q_{2x}}{t} +
    \pder{}{x} \left( \dfrac{q_{2x}^2}{h_2} + \dfrac{g}{2} h_2^2 \right) +
    \pder{}{y} \left( \dfrac{q_{2x} \, q_{2y}}{h_2} \right) +
     g h_2 \pder{Z_{bed}}{x} +g\dfrac{\rho_1}{\rho_2} h_2 \pder{h_1}{x} =  \dfrac{\tau^{int}_x - \tau^{bed}_x}{\rho_2} 
     \label{eq:6}\\
%
  &  \pder{q_{2y}}{t} + \pder{}{x} \left( \dfrac{q_{2y} \, q_{2x}}{h_2} \right) +
    \pder{}{y} \left( \dfrac{q_{2y}^2}{h_2} + \dfrac{g}{2} h_2^2 \right)  + 
    g h_2 \pder{Z_{bed}}{y} +  g\dfrac{\rho_1}{\rho_2} h_2 \pder{h_1}{ y}  =   \dfrac{\tau^{int}_y - \tau^{bed}_y}{\rho_2} 
    \label{eq:7}\\
%    
  &  \pder{Z_b}{t}= - \dfrac{F^{bed}_m }{1-p}\;,  \label{eq:8}
\end{empheq}
  \end{subequations} 
   

or in the case I split the long equations over 2 lines (like in the following minimal example) having the second part of the equation more leftward, in a way to fit everything inside the page margins. I played with "&" and I read the "align" manual but I did not find a way to do it.
thank you very much

Code: Select all

 \begin{subequations}\label{eqn:binomi} 
\begin{empheq}[left=\empheqlbrace]{align}
%
   & \pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} =
     F^{int}_m + F^{int}_w
     \label{eq:1}\\
%     
  &  \pder{ q_{1x} }{t} + \pder{}{x}
    \left( \dfrac{q_{1x}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2  \right) +
    \pder{}{y} \left( \dfrac{q_{1x} \, q_{1y}}{h_1} \right) +
     g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} = &\nonumber\\
     &&-\dfrac{\tau^{int}_x}{\rho_0}
%
    \label{eq:2}\\
  &  \pder{q_{1y}}{t} + \pder{}{x} \left( \dfrac{q_{1y} \, q_{1x}}{h_1} \right) +
    \pder{}{y} \left( \dfrac{q_{1y}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2 \right) +
    g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{y} = &\nonumber\\
    &&- \dfrac{\tau^{int}_y}{\rho_0}
    \label{eq:3}\\
%    
  &  \pder{C_{h1}}{t} + \pder{}{x}\left(\dfrac{C_{h1} q_{1x}}{h_1}\right) +
    \pder{}{y}\left(\dfrac{C_{h1} q_{1y}}{h_1}\right) = F^{int}_m        
%    & \qquad &
    \label{eq:4}\\
%    
  &  \pder{(C_2 h_2)}{t} + \pder{(C_2 \, q_{2x})}{x} +
    \pder{(C_2 q_{2y})}{y} =  - F^{int}_m + F^{bed}_m
    \label{eq:5}\\
%    
  &  \pder{q_{2x}}{t} +
    \pder{}{x} \left( \dfrac{q_{2x}^2}{h_2} + \dfrac{g}{2} h_2^2 \right) +
    \pder{}{y} \left( \dfrac{q_{2x} \, q_{2y}}{h_2} \right) +
     g h_2 \pder{Z_{bed}}{x} +g\dfrac{\rho_1}{\rho_2} h_2 \pder{h_1}{x} = &\nonumber\\
  &&  \dfrac{\tau^{int}_x - \tau^{bed}_x}{\rho_2} 
     \label{eq:6}\\
%
  &  \pder{q_{2y}}{t} + \pder{}{x} \left( \dfrac{q_{2y} \, q_{2x}}{h_2} \right) +
    \pder{}{y} \left( \dfrac{q_{2y}^2}{h_2} + \dfrac{g}{2} h_2^2 \right)  + 
    g h_2 \pder{Z_{bed}}{y} +  g\dfrac{\rho_1}{\rho_2} h_2 \pder{h_1}{ y}  =  & \nonumber\\
  &&  \dfrac{\tau^{int}_y - \tau^{bed}_y}{\rho_2} 
    \label{eq:7}\\
%    
  &  \pder{Z_b}{t}= - \dfrac{F^{bed}_m }{1-p}\;,  \label{eq:8}
\end{empheq}
  \end{subequations} 
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by localghost »

I see no minimal example, only useless code snippets [1]. Without this the problem is not comprehensible.

[1] View topic: Avoidable mistakes
veniceboy
Posts: 6
Joined: Mon Jun 20, 2011 10:01 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by veniceboy »

Ok I read the second link you gave me. sorry about that but from the first link it was not clear (or i missed it) that packages and stuff like \begin{document} were mandatory. I also reduced the size of the system to make it really minimal, now i have only 2 equations. But smaller than this it is impossible,because the problem appears when one equation is too long. My question was: is there a way to either force the labels inline in this minimal example

Code: Select all

\documentclass[draft]{elsart} %

\newcommand\pder[2]{\dfrac{\partial#1}{\partial#2}}

\usepackage{amsmath,amsfonts,amssymb}
\usepackage{empheq}

\begin{document}

\begin{subequations}\label{eqn:binomi} 
\begin{empheq}[left=\empheqlbrace]{align}
%
   & \pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} =
     F^{int}_m + F^{int}_w
     \label{eq:1}\\
%     
  &  \pder{ q_{1x} }{t} + \pder{}{x}
    \left( \dfrac{q_{1x}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2  \right) +
    \pder{}{y} \left( \dfrac{q_{1x} \, q_{1y}}{h_1} \right) +
     g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} = -\dfrac{\tau^{int}_x}{\rho_0}
%
    \label{eq:2}
\end{empheq}
\end{subequations} 

\end{document}

or, in the case I split the long equation over 2 lines (like in the minimal example below), to have the second part of the equation more leftward, in a way that everything fits inside the margins?I hope now it is clear.
thank you very much

Code: Select all

\documentclass[draft]{elsart} %

\newcommand\pder[2]{\dfrac{\partial#1}{\partial#2}}

\usepackage{amsmath,amsfonts,amssymb}
\usepackage{empheq}

\begin{document}
\begin{subequations}\label{eqn:binomi} 
\begin{empheq}[left=\empheqlbrace]{align}
%
   & \pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} =
     F^{int}_m + F^{int}_w
     \label{eq:1}\\
%     
  &  \pder{ q_{1x} }{t} + \pder{}{x}
    \left( \dfrac{q_{1x}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2  \right) +
    \pder{}{y} \left( \dfrac{q_{1x} \, q_{1y}}{h_1} \right) +
     g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} &\nonumber\\
   &&  = -\dfrac{\tau^{int}_x}{\rho_0}
%
    \label{eq:2}
\end{empheq}
\end{subequations} 
  
\end{document}

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by localghost »

veniceboy wrote:Ok I read the second link you gave me. sorry about that but from the first link it was not clear (or i missed it) that packages and stuff like \begin{document} were mandatory. […]
It would surprise me if the TeX FAQ are unclear at this important point. Furthermore I mentioned that this minimal example has to be compilable for everyone as provided, which means that it has to be a complete document. So I wonder which part of this could be misleading.

As far as I know, the »elsart« class has been superseded by the elsarticle class. Using this class the problem doesn't occur because of a better typearea.

Code: Select all

\documentclass[%
  3p,              % document type
  11pt,            % fontsize
  sort&compress    % »natbib« feature
]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}  % loads »amsmath«
\usepackage{amsfonts,amssymb}
\usepackage{empheq}
\usepackage[text]{esdiff}

\begin{document}
  \begin{subequations}\label{eqn:equations}
    \begin{empheq}[left=\empheqlbrace]{align}
      \diffp{h_1}{t}+\diffp{q_{1x}}{x}+\diffp{q_{1y}}{y} &=F^\text{int}_m+F^\text{int}_w \label{eq:1} \\
      \diffp{q_{1x}}{t}+\diffp{}{x}\left(\frac{q_{1x}^2}{h_1}+\frac{g}{2}\frac{\rho_1}{\rho_0}\, h_1^2\right)+\diffp{}{y}\left(\dfrac{q_{1x}\, q_{1y}}{h_1}\right)+g\,\frac{\rho_1}{\rho_0}\,h_1\, \diffp{(Z_\text{bed}+h_2)}{x} &= -\dfrac{\tau^\text{int}_x}{\rho_0} \label{eq:2}
    \end{empheq}
  \end{subequations}
\end{document}
For writing derivatives you don't need to reinvent the wheel. The esdiff package offers commands for this purpose.
veniceboy
Posts: 6
Joined: Mon Jun 20, 2011 10:01 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by veniceboy »

Thank you. But this fix the problem just in this particular case. Later in the text I add another diffusive term in the equation, and the result is not good because the equation is too long. Is it a way to "superimpose" the two lines of the split equations on the same vertical zone in a way to a have a nice output?I mean like moving the second line of the split equation on the left in the minimal example below. With the eqnarray package it was so easy, but we know the cons of that package.
thank you very much

Code: Select all

\documentclass[%
  3p,              % document type
  11pt,            % fontsize
  sort&compress    % »natbib« feature
]{elsarticle}

\newcommand\pder[2]{\dfrac{\partial#1}{\partial#2}}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}  % loads »amsmath«
\usepackage{amsfonts,amssymb}
\usepackage{empheq}




\begin{document}
  
  
   \begin{subequations}\label{eqn:binomi} 
\begin{empheq}[left=\empheqlbrace]{align}
%
   & \pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} =
     F^{int}_m + F^{int}_w
     \label{eq:1}\\
%     
  &  \pder{ q_{1x} }{t} + \pder{}{x}
    \left( \dfrac{q_{1x}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2  \right) +
    \pder{}{y} \left( \dfrac{q_{1x} \, q_{1y}}{h_1} \right) +
     g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} &\nonumber\\
   &&  = -\dfrac{\tau^{int}_x}{\rho_0} + \pder{}{x}\left(\frac{D_x}{h}\pder{q_{1x}}{x}+\frac{D_y}{h}\pder{q_{1y}}{y}  \right)
%
    \label{eq:2}
\end{empheq}
  \end{subequations} 
  
  

\end{document}
veniceboy
Posts: 6
Joined: Mon Jun 20, 2011 10:01 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by veniceboy »

The only way I have found to do something like the result I am looking for is this

Code: Select all

\documentclass[%
  3p,              % document type
  11pt,            % fontsize
  sort&compress    % »natbib« feature
]{elsarticle}

\newcommand\pder[2]{\dfrac{\partial#1}{\partial#2}}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}  % loads »amsmath«
\usepackage{amsfonts,amssymb}
\usepackage{empheq}




\begin{document}
  
  
   \begin{subequations}\label{eqn:binomi} 
\begin{empheq}[left=\empheqlbrace]{align}
%
   & \pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} =
     F^{int}_m + F^{int}_w
     \label{eq:1}\\
%     
  &  \pder{ q_{1x} }{t} + \pder{}{x}
    \left( \dfrac{q_{1x}^2}{h_1} + \dfrac{g}{2}\dfrac{\rho_1}{\rho_0} h_1^2  \right) +
    \pder{}{y} \left( \dfrac{q_{1x} \, q_{1y}}{h_1} \right) &&+
     g\dfrac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} \nonumber\\
   &&&  = -\dfrac{\tau^{int}_x}{\rho_0} + \pder{}{x}\left(\frac{D_x}{h}\pder{q_{1x}}{x}+\frac{D_y}{h}\pder{q_{1y}}{y}  \right)
%
    \label{eq:2}
\end{empheq}
  \end{subequations} 
  
  

\end{document}
But in this case there is a hole before the plus sign of the first equation. I was really liking the simple way to set the vertical spacing in "eqnarray". Is there a way to use "&" in "align" in the same way as it works in eqnarray? For equations spanning multiple lines it was way better, or I m missing some feature of "align". Thanks
Alberto
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by localghost »

The amsmath package also provides the split environment. So you can wrap parts of an equation (by hand).

Code: Select all

\documentclass[%
  3p,              % document type
  11pt,            % fontsize
  sort&compress    % »natbib« feature
]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}  % loads »amsmath«
\usepackage{amsfonts,amssymb}
\usepackage{empheq}

\newcommand\pder[2]{\frac{\partial#1}{\partial#2}}

\begin{document}
  \begin{subequations}\label{eqn:equations}
    \begin{empheq}[left=\empheqlbrace]{align}
    &\pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} = F^{int}_m + F^{int}_w \label{eq:1} \\
      \begin{split}
	     &\pder{ q_{1x} }{t} + \pder{}{x}\left( \frac{q_{1x}^2}{h_1} + \frac{g}{2}\frac{\rho_1}{\rho_0} h_1^2  \right) + \\
       &+ \pder{}{y} \left( \frac{q_{1x} \, q_{1y}}{h_1} \right) + g\frac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} 
      \end{split}
      = -\frac{\tau^{int}_x}{\rho_0} + \pder{}{x}\left(\frac{D_x}{h}\pder{q_{1x}}{x}+\frac{D_y}{h}\pder{q_{1y}}{y}  \right) \label{eq:2}
    \end{empheq}
  \end{subequations}
\end{document}
Another approach would be to decrease the font size.
veniceboy
Posts: 6
Joined: Mon Jun 20, 2011 10:01 pm

empheq | Progressive Labels (1a,1b,1c, …)

Post by veniceboy »

Great thanks split is what I was looking for. I rather split the long equation like this

Code: Select all

\documentclass[%
  3p,              % document type
  11pt,            % fontsize
  sort&compress    % »natbib« feature
]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}  % loads »amsmath«
\usepackage{amsfonts,amssymb}
\usepackage{empheq}

\newcommand\pder[2]{\frac{\partial#1}{\partial#2}}



\begin{document}

Random text,Random text,Random text,Random text,Random text,Random text,Random text,
Random text,Random text,Random text,Random text,Random text,Random text,Random text.

\begin{subequations}\label{eqn:equations}
  \begin{empheq}[left=\empheqlbrace]{align}
  &\pder{ h_1}{ t} + \pder{ q_{1x} }{x} + \pder{ q_{1y} }{ y} = F^{int}_m + F^{int}_w \label{eq:1} \\
    \begin{split}
      \pder{ q_{1x} }{t} + \pder{}{x}\left( \frac{q_{1x}^2}{h_1} + \frac{g}{2}\frac{\rho_1}{\rho_0} h_1^2  \right) +
       \pder{}{y} \left( \frac{q_{1x} \, q_{1y}}{h_1} \right) + g\frac{\rho_1}{\rho_0} h_1 \pder{(Z_{bed} + h_2)}{x} 
    = -\frac{\tau^{int}_x}{\rho_0} + \\ +\pder{}{x}\left(\frac{D_x}{h}\pder{q_{1x}}{x}+\frac{D_y}{h}\pder{q_{1y}}{y}  \right) \label{eq:2}
    \end{split}      
  \end{empheq}
\end{subequations}
  
Random text,Random text,Random text,Random text,Random text,Random text,Random text,
Random text,Random text,Random text,Random text,Random text,Random text,Random text.
\end{document}

this is what I was looking for. Only one last problem: how to justify all the system (curly bracket plus equations) on the left, in a way that it is aligned with the text?
thanks
veniceboy
Post Reply