2

This question already has an answer here:

I have 2 long equations when I want to label them as 2a and 2b by using subequation a problem occur that each line of equation n pdf gets number inspite of each equation so thats why i got more numbering than no. of equations

 \begin{subequations} \label{eq2}
 \begin{align}
 \ddot{x} & = \big( \cos{\phi} \sin{\theta} \cos{\psi} + \sin{\phi} \sin{\psi} \big) \frac{U_1}{m}\\ & \quad - \frac{1}{m} \sum_{i=1}^{4} H_{xi} - K_{fdx} \frac{\dot{x}}{m_s}\\

 \ddot{y} & = \big( \cos{\phi} \sin{\theta} \sin{\psi} - \sin{\phi} \sin{\psi} \big) \frac{U_1}{m}\\ & \quad- \frac{1}{m} \sum_{i=1}^{4} H_{yi} - K_{fdy} \frac{\dot{y}}{m_s}\\
\end{align}
\end{subequations}

output looks like this while i wana output equations to be labeled just 2a for x double dot equation and 2b for y double dot equation

marked as duplicate by egreg equations Sep 5 '15 at 22:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Do you mean something like this:

enter image description here

Above equation is obtained by:

    \documentclass{article}
    \usepackage{mathtools}

    \begin{document}
\begin{subequations}\label{eq2}
    \begin{align}
\ddot{x} & = \begin{multlined}[t]
            \big(\cos{\phi}\sin{\theta}\cos{\psi} + 
                 \sin{\phi}\sin{\psi}\big) 
                 \frac{U_1}{m}\\ 
               - \frac{1}{m} \sum_{i=1}^{4} H_{xi} - K_{fdx} \frac{\dot{x}}{m_s}
            \end{multlined}    \\
\ddot{y} & = \begin{multlined}[t]
            \big(\cos{\phi}\sin{\theta}\sin{\psi} - 
                  \sin{\phi}\sin{\psi}\big) \frac{U_1}{m}\\ 
               - \frac{1}{m} \sum_{i=1}^{4} H_{yi} - K_{fdy} \frac{\dot{y}}{m_s}
            \end{multlined}
\end{align}
\end{subequations}
    \end{document}
  • yeah i mean the way u did in 2nd phase actually i cannot manage to write equations in single line as i am doing for a research paper 2 column format so it becomes too wide if i dont use multiple lines environment. Thankx for ur answer – Junaid Anwar Sep 7 '15 at 16:24
1

I can think of three possibilities.

  • Don't split the equations across lines;

  • Use \notag on two of the four rows of the align environment;

  • Use two split environments within the overall align environment.

The first solution looks like it's the simplest overall. Choosing between solutions 2 and 3 will depend, in part, on whether or not the equation numbers should be centered on each of the pairs of rows.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\hrule
\begin{subequations} \label{eq2}
\begin{align}
\ddot{x} 
&= \big( \cos{\phi} \sin{\theta} \cos{\psi} + \sin{\phi} \sin{\psi} \big) \frac{U_1}{m} - \frac{1}{m} \sum_{i=1}^{4} H_{xi} - K_{fdx} \frac{\dot{x}}{m_s}\\
\ddot{y} 
&= \big( \cos{\phi} \sin{\theta} \sin{\psi} - \sin{\phi} \sin{\psi} \big) \frac{U_1}{m} - \frac{1}{m} \sum_{i=1}^{4} H_{yi} - K_{fdy} \frac{\dot{y}}{m_s}
\end{align}
\end{subequations}
\hrule
\begin{subequations} \label{eq4}
\begin{align}
\ddot{x} 
&= \big( \cos{\phi} \sin{\theta} \cos{\psi} + \sin{\phi} \sin{\psi} \big) \frac{U_1}{m} \notag\\
&\qquad - \frac{1}{m} \sum_{i=1}^{4} H_{xi} - K_{fdx} \frac{\dot{x}}{m_s}\\
\ddot{y} 
&= \big( \cos{\phi} \sin{\theta} \sin{\psi} - \sin{\phi} \sin{\psi} \big) \frac{U_1}{m} \notag\\
&\qquad - \frac{1}{m} \sum_{i=1}^{4} H_{yi} - K_{fdy} \frac{\dot{y}}{m_s}
\end{align}
\end{subequations}
\hrule
\begin{subequations} \label{eq4}
\begin{align}
&\begin{split}\ddot{x} 
  &= \big( \cos{\phi} \sin{\theta} \cos{\psi} + \sin{\phi} \sin{\psi} \big) \frac{U_1}{m} \\
  &\qquad - \frac{1}{m} \sum_{i=1}^{4} H_{xi} - K_{fdx} \frac{\dot{x}}{m_s}
\end{split}\\
&\begin{split}
\ddot{y} &= \big( \cos{\phi} \sin{\theta} \sin{\psi} - \sin{\phi} \sin{\psi} \big) \frac{U_1}{m} \\
&\qquad - \frac{1}{m} \sum_{i=1}^{4} H_{yi} - K_{fdy} \frac{\dot{y}}{m_s}
\end{split}
\end{align}
\end{subequations}
\hrule
\end{document}

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