3

I use align within subequations and this works fine for normal length equations. However I would like to break this long equation into two or three parts.

Currently I use \\ to break the long equation and my document compiles, but it doesn't give a nice result. I have seen many suggestions (multline, split, align, aligned, breqn) but I'm kind of drowning in the many possible suggestions.

This is what I have now, but as you can see equation (1a) looks like crap. (EDIT: something like this would be ideal https://i.stack.imgur.com/7YOU7.png)

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{subequations}
    \begin{align}
        Z^0(e^{j\omega h^0}) &= P^0_{11}(e^{j\omega h^0})\Lambda^0(e^{j\omega h^0})+P^0_{12}(e^{j\omega h^0})\mathcal{I}_{zoh}(e^{j\omega h^0})Q(e^{j\omega h})\cdot \\ \frac{1}{F}\sum_{f=0}^{F-1}P^0_{12}(e^{j\omega h^0-\frac{f}{F}\omega^0_s})\Lambda^0(e^{j\omega h^0-\frac{f}{F}\omega^0_s}) \nonumber
        \intertext{where}
        Q(\omega) &= (I-C(\omega)P_{22}(\omega))^{-1}C(\omega)
    \end{align}

\end{subequations}

\end{document}
  • How exactly is the line with the sum suppose to be aligned with the others? There is no obvious alignment point. The 1a line, can be broken by using split on that line (replacing &= by = {} & (to align on the right) and breaking the line before +P^0... (\\ &+P^0...) – daleif Aug 14 '17 at 13:04
  • The line with the sum should preferably have an indent, something like this i.stack.imgur.com/7YOU7.png – Niwol Aug 14 '17 at 13:39
  • The sum line fit on the line and need no break, but have no obvious alignment point. I'd probably not have used align here. I'd use gather*, add split on the first line to break it, and move the where and Q... outside display math. It seems a bit strange to number the where part and not the sum line. – daleif Aug 14 '17 at 13:44
  • 1
    Yeah gather gives a nice result! ty – Niwol Aug 14 '17 at 14:47
3

I see no reasons for aligning the equals signs in the two equations, so I provide also a solution without such alignment.

The best trick, in my opinion, is to use split:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{subequations}
\begin{align}
\begin{split}
Z^0(e^{j\omega h^0}) 
  &= P^0_{11}(e^{j\omega h^0})\Lambda^0(e^{j\omega h^0}) \\
  &\qquad+ P^0_{12}(e^{j\omega h^0})\mathcal{I}_{zoh}(e^{j\omega h^0})Q(e^{j\omega h})\\
  &\qquad\times \frac{1}{F}\sum_{f=0}^{F-1}P^0_{12}
     (e^{j\omega h^0-\frac{f}{F}\omega^0_s})\Lambda^0(e^{j\omega h^0-\frac{f}{F}\omega^0_s})
\end{split}
\intertext{where}
Q(\omega) &= (I-C(\omega)P_{22}(\omega))^{-1}C(\omega)
\end{align}
\end{subequations}

\begin{subequations}
\begin{equation}
\begin{split}
Z^0(e^{j\omega h^0}) 
  &= P^0_{11}(e^{j\omega h^0})\Lambda^0(e^{j\omega h^0}) \\
  &\qquad+ P^0_{12}(e^{j\omega h^0})\mathcal{I}_{zoh}(e^{j\omega h^0})Q(e^{j\omega h})\\
  &\qquad\times \frac{1}{F}\sum_{f=0}^{F-1}P^0_{12}
     (e^{j\omega h^0-\frac{f}{F}\omega^0_s})\Lambda^0(e^{j\omega h^0-\frac{f}{F}\omega^0_s})
\end{split}
\end{equation}
where
\begin{equation}
Q(\omega) = (I-C(\omega)P_{22}(\omega))^{-1}C(\omega)
\end{equation}
\end{subequations}

\end{document}

enter image description here

  • Perfect, thankyou! I didnt know you could use {equation} within {subequations} – Niwol Aug 15 '17 at 18:04
1

Two other possibilities:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{subequations}
    \begin{align}
        Z^0(e^{j\omega h^0}) &= \begin{aligned}[t]P^0_{11}(e^{j\omega h^0})\Lambda^0(e^{j\omega h^0})+P^0_{12}(e^{j\omega h^0})\mathcal{I}_{zoh}(e^{j\omega h^0})Q(e^{j\omega h}) \\
        {}\times\frac{1}{F}\sum_{f=0}^{F-1}P^0_{12}(e^{j\omega h^0-\frac{f}{F}\omega^0_s})\Lambda^0(e^{j\omega h^0-\frac{f}{F}\omega^0_s}) \end{aligned}\\
        \shortintertext{where}
        Q(\omega) &= (I-C(\omega)P_{22}(\omega))^{-1}C(\omega)
    \end{align}
\end{subequations}


\begin{subequations}
    \begin{align}
        Z^0(e^{j\omega h^0}) &= \begin{aligned}[t]P^0_{11}(e^{j\omega h^0})\Lambda^0(e^{j\omega h^0})+P^0_{12}(e^{j\omega h^0})\mathcal{I}_{zoh}(e^{j\omega h^0})Q(e^{j\omega h}) \\
        {}\times\frac{1}{F}\sum_{f=0}^{F-1}P^0_{12}(e^{j\omega h^0-\frac{f}{F}\omega^0_s})\Lambda^0(e^{j\omega h^0-\frac{f}{F}\omega^0_s}) \end{aligned}\\
        \text{where\quad}
        Q(\omega)&= (I-C(\omega)P_{22}(\omega))^{-1}C(\omega)
    \end{align}
\end{subequations}

\end{document} 

enter image description here

  • Thankyou! I don't see a difference other than the 'where' line? – Niwol Aug 15 '17 at 18:07
  • The = are aligned only by chance: as they're unrelated, they don't have to, a,d I didn't even try. It's a minor difference – only slightly more compact visually, but the tools to obtain it are different. – Bernard Aug 15 '17 at 18:18

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.