2

I have three sub-equations and I want them to be left aligned and each to be numbered as (1a), (1b) and (1c). Since there are other equations too, I cannot change my existing packages or introduce a global setting which will disturb other equation. Here is what I have attempted.

\documentclass[11pt,a4paper]{report}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\label{e:strain_core}
\begin{align}
\begin{split}
\epsilon_{xx}^{c}(x,z,t) = \dfrac{\partial u^c(x,z,t)}{\partial x} = {}& \dfrac{f_t z^{2}}{4 c^{2}} \Bigg(1+\dfrac{z}{c}\Bigg) w_{,xx}^{t} + \dfrac{f_b z^{2}}{4 c^{2}} \Bigg(-1+\dfrac{z}{c}\Bigg) w_{,xx}^{b} \\ & + z \Bigg(1-\dfrac{z^{2}}{c^{2}}\Bigg) \phi_{0,x}^{c}(x,t)  +\dfrac{z^{2}}{2c^{2}} \Bigg(1-\dfrac{z}{c}\Bigg) u_{0,x}^{b}  + \Bigg(1-\dfrac{z^{2}}{c^{2}}\Bigg) u_{0,x}^{c}
%\label{e: axial_straincore}\\% the equation can be tagged using the command \tag{1a}
\end{split} \\
\epsilon_{zz}^{c}(x,z,t) = \dfrac{\partial w^c(x,z,t)}{\partial z} = \Bigg(\dfrac{z}{c^{2}} - \dfrac{1}{2c}\Bigg) w^{b}(x,t) - \dfrac{2z}{c^{2}} w_0^{c}(x,t) + \Bigg(\dfrac{z}{c^{2}} + \dfrac{1}{2c}\Bigg) w^{t}(x,t) \\ %\label{e:transverse_straincore} 
\begin{split}
\gamma_{zx}^{c}(x,z,t) = \dfrac{\partial u^c(x,z,t)}{\partial z} + \dfrac{\partial w^c(x,z,t)}{\partial x} = -\Bigg(\dfrac{2 z}{c^{2}}\Bigg) u_{0}^{c} + \Bigg(\dfrac{z}{c^{2}} - \dfrac{3 z^{2}}{2 c^{3}} \Bigg) u_{0}^{b} + \Bigg(1-\dfrac{3 z^{2}}{c^{2}}\Bigg) \phi_{0}^{c} \\ + \Bigg(\dfrac{z}{c^{2}} + \dfrac{3 z^{2}}{2 c^{3}} \Bigg) u_{0}^{t} + \Bigg[-\Bigg(\dfrac{c+f_b}{2c^{2}}\Bigg) z + \Bigg(\dfrac{2c+3f_b}{4 c^{3}}\Bigg) z^{2}\Bigg] w_{,x}^{b}  + \Bigg[\Bigg(\dfrac{c+f_t}{2c^{2}}\Bigg) z \\+ \Bigg(\dfrac{2c+3f_t}{4 c^{3}}\Bigg) z^{2}\Bigg] w_{,x}^{t} + \Bigg(1-\dfrac{z^2}{c^2}\Bigg) w_{0,x}^{c}
%\label{e: shear_straincore}
\end{split}
\end{align}
\end{subequations}
\end{document}
2
  • Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.
    – Skillmon
    Commented Sep 30, 2018 at 14:36
  • Dear Skillmon, thank you. I have now added required packages, and other commands to make it a minimal working example. Commented Sep 30, 2018 at 15:00

2 Answers 2

4

If you use split within an align environment the & inside different split environments will actually line up. I would use the aligned environment (also from amsmath) to split up the parts of the equation between the = symbols.

\documentclass{report}
\usepackage{amsmath}
\begin{document}

\begin{subequations}
  \label{e:strain_core}
  \begin{align}
    \begin{split}
      \epsilon_{xx}^{c}(x,z,t)
        &= \dfrac{\partial u^c(x,z,t)}{\partial x}
      \\
        &= \begin{aligned}[t]
           & \dfrac{f_t z^{2}}{4 c^{2}} \Biggl(1+\dfrac{z}{c}\Biggr) w_{,xx}^{t}
             + \dfrac{f_b z^{2}}{4 c^{2}} \Biggl(-1+\dfrac{z}{c}\Biggr) w_{,xx}^{b}
           \\&
             + z \Biggl(1-\dfrac{z^{2}}{c^{2}}\Biggr) \phi_{0,x}^{c}(x,t)
             + \dfrac{z^{2}}{2c^{2}} \Biggl(1-\dfrac{z}{c}\Biggr) u_{0,x}^{b}
           \\& %% <- I added this one because your equation is too wide
              + \Biggl(1-\dfrac{z^{2}}{c^{2}}\Biggr) u_{0,x}^{c}
           \end{aligned}
    \end{split}
    \label{e:axial_straincore}% the equation can be tagged using the command \tag{1a}
    \\
    \begin{split}
      \epsilon_{zz}^{c}(x,z,t)
        &= \dfrac{\partial w^c(x,z,t)}{\partial z}
      \\
        &= \Biggl(\dfrac{z}{c^{2}} - \dfrac{1}{2c}\Biggr) w^{b}(x,t)
           - \dfrac{2z}{c^{2}} w_0^{c}(x,t)
           + \Biggl(\dfrac{z}{c^{2}} + \dfrac{1}{2c}\Biggr) w^{t}(x,t)
    \end{split}
    \label{e:transverse_straincore} 
    \\
    \begin{split}
      \gamma_{zx}^{c}(x,z,t)
        &= \dfrac{\partial u^c(x,z,t)}{\partial z}
           + \dfrac{\partial w^c(x,z,t)}{\partial x}
      \\
        &= \begin{aligned}[t]
           & -\Biggl(\dfrac{2 z}{c^{2}}\Biggr) u_{0}^{c}
             + \Biggl(\dfrac{z}{c^{2}} - \dfrac{3 z^{2}}{2 c^{3}} \Biggr) u_{0}^{b}
             + \Biggl(1-\dfrac{3 z^{2}}{c^{2}}\Biggr) \phi_{0}^{c}
           \\&
             + \Biggl(\dfrac{z}{c^{2}} + \dfrac{3 z^{2}}{2 c^{3}} \Biggr) u_{0}^{t}
             + \Biggr[-\Biggl(\dfrac{c+f_b}{2c^{2}}\Biggr) z + \Biggl(\dfrac{2c+3f_b}{4 c^{3}}\Biggr) z^{2}\Biggr] w_{,x}^{b}
           \\&
             + \Biggr[\Biggl(\dfrac{c+f_t}{2c^{2}}\Biggr) z
             + \Biggl(\dfrac{2c+3f_t}{4 c^{3}}\Biggr) z^{2}\Biggr] w_{,x}^{t}
             + \Biggl(1-\dfrac{z^2}{c^2}\Biggr) w_{0,x}^{c}
      \end{aligned}
    \end{split}
    \label{e:shear_straincore}
  \end{align}
\end{subequations}

Reference test: \ref{e:strain_core}, \ref{e:axial_straincore}, \ref{e:transverse_straincore}, \ref{e:shear_straincore}.

\end{document}

enter image description here

0
2

One could use only the align environment and therein the \nonumber macro to suppress the tagging of lines one doesn't want to get a number:

\documentclass[]{article}

\usepackage[]{amsmath}

\begin{document}
\begin{subequations}
\label{e:strain_core}
\begin{align}
  \epsilon_{xx}^{c}(x,z,t)
    &= \dfrac{\partial u^c(x,z,t)}{\partial x} \nonumber\\
    &= \dfrac{f_t z^{2}}{4 c^{2}} \Bigg(1+\dfrac{z}{c}\Bigg) w_{,xx}^{t} +
      \dfrac{f_b z^{2}}{4 c^{2}} \Bigg(-1+\dfrac{z}{c}\Bigg) w_{,xx}^{b} 
      + z \Bigg(1-\dfrac{z^{2}}{c^{2}}\Bigg) \phi_{0,x}^{c}(x,t) \nonumber\\
    &\phantom{={}} +\dfrac{z^{2}}{2c^{2}} \Bigg(1-\dfrac{z}{c}\Bigg) u_{0,x}^{b}
      + \Bigg(1-\dfrac{z^{2}}{c^{2}}\Bigg) u_{0,x}^{c}
    \\[1ex]
  \epsilon_{zz}^{c}(x,z,t) &= \dfrac{\partial w^c(x,z,t)}{\partial z}\nonumber\\
    &= \Bigg(\dfrac{z}{c^{2}} - \dfrac{1}{2c}\Bigg) w^{b}(x,t) -
      \dfrac{2z}{c^{2}} w_0^{c}(x,t) + \Bigg(\dfrac{z}{c^{2}} +
      \dfrac{1}{2c}\Bigg) w^{t}(x,t)
    \\[1ex]
  \gamma_{zx}^{c}(x,z,t)
    &= \dfrac{\partial u^c(x,z,t)}{\partial z} + \dfrac{\partial
       w^c(x,z,t)}{\partial x}\nonumber\\
    &= -\Bigg(\dfrac{2 z}{c^{2}}\Bigg) u_{0}^{c} + \Bigg(\dfrac{z}{c^{2}} -
      \dfrac{3 z^{2}}{2 c^{3}} \Bigg) u_{0}^{b} + \Bigg(1-\dfrac{3
      z^{2}}{c^{2}}\Bigg) \phi_{0}^{c} \nonumber\\
    &\phantom{={}} + \Bigg(\dfrac{z}{c^{2}} + \dfrac{3 z^{2}}{2 c^{3}} \Bigg)
      u_{0}^{t} + \Bigg[-\Bigg(\dfrac{c+f_b}{2c^{2}}\Bigg) z +
      \Bigg(\dfrac{2c+3f_b}{4 c^{3}}\Bigg) z^{2}\Bigg] w_{,x}^{b}\nonumber\\
    &\phantom{={}}+ \Bigg[\Bigg(\dfrac{c+f_t}{2c^{2}}\Bigg) z 
      + \Bigg(\dfrac{2c+3f_t}{4 c^{3}}\Bigg) z^{2}\Bigg] w_{,x}^{t} +
      \Bigg(1-\dfrac{z^2}{c^2}\Bigg) w_{0,x}^{c}
%\label{e: shear_straincore}
\end{align}
\end{subequations}
\end{document}

enter image description here

Also for the future: Code seems to be easier to maintain if it is indented and line broken where it makes sense...

Another solution could be to nest an aligned environment inside of the align environment (this would get rid of the \phantom{={}} thingies):

\documentclass[]{article}

\usepackage[]{amsmath}

\begin{document}
\begin{subequations}
\label{e:strain_core}
\begin{align}
  \epsilon_{xx}^{c}(x,z,t)
    &= \dfrac{\partial u^c(x,z,t)}{\partial x} \nonumber\\
    &=
      \begin{aligned}[t]
        &\dfrac{f_t z^{2}}{4 c^{2}} \Bigg(1+\dfrac{z}{c}\Bigg) w_{,xx}^{t} +
          \dfrac{f_b z^{2}}{4 c^{2}} \Bigg(-1+\dfrac{z}{c}\Bigg) w_{,xx}^{b} 
          + z \Bigg(1-\dfrac{z^{2}}{c^{2}}\Bigg) \phi_{0,x}^{c}(x,t) \\
        & +\dfrac{z^{2}}{2c^{2}} \Bigg(1-\dfrac{z}{c}\Bigg) u_{0,x}^{b}
          + \Bigg(1-\dfrac{z^{2}}{c^{2}}\Bigg) u_{0,x}^{c}
      \end{aligned}
    \\
  \epsilon_{zz}^{c}(x,z,t) &= \dfrac{\partial w^c(x,z,t)}{\partial z}\nonumber\\
    &= \Bigg(\dfrac{z}{c^{2}} - \dfrac{1}{2c}\Bigg) w^{b}(x,t) -
      \dfrac{2z}{c^{2}} w_0^{c}(x,t) + \Bigg(\dfrac{z}{c^{2}} +
      \dfrac{1}{2c}\Bigg) w^{t}(x,t)
    \\[1ex]
  \gamma_{zx}^{c}(x,z,t)
    &= \dfrac{\partial u^c(x,z,t)}{\partial z} + \dfrac{\partial
       w^c(x,z,t)}{\partial x}\nonumber\\
    &=
    \begin{aligned}[t]
      &-\Bigg(\dfrac{2 z}{c^{2}}\Bigg) u_{0}^{c} + \Bigg(\dfrac{z}{c^{2}} -
        \dfrac{3 z^{2}}{2 c^{3}} \Bigg) u_{0}^{b} + \Bigg(1-\dfrac{3
        z^{2}}{c^{2}}\Bigg) \phi_{0}^{c} \\
      & + \Bigg(\dfrac{z}{c^{2}} + \dfrac{3 z^{2}}{2 c^{3}} \Bigg)
        u_{0}^{t} + \Bigg[-\Bigg(\dfrac{c+f_b}{2c^{2}}\Bigg) z +
        \Bigg(\dfrac{2c+3f_b}{4 c^{3}}\Bigg) z^{2}\Bigg] w_{,x}^{b}\\
      &+ \Bigg[\Bigg(\dfrac{c+f_t}{2c^{2}}\Bigg) z 
        + \Bigg(\dfrac{2c+3f_t}{4 c^{3}}\Bigg) z^{2}\Bigg] w_{,x}^{t} +
        \Bigg(1-\dfrac{z^2}{c^2}\Bigg) w_{0,x}^{c}
    \end{aligned}
%\label{e: shear_straincore}
\end{align}
\end{subequations}
\end{document}

(result looks similar but the alignment of the tags is different)

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .