2

Regarding the enclosed MWE I would like to get the \sums aligned. But using a second & in lines two and three leads of course to a problem with line one. How do I get the desired result? (Looking into Herbert's fine mathmode was to no avail.)

\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
\begin{align*}
 S(f) & ={} \pi\left(S(f-f_0)+S(f+f_0)\right)\\
      & ={} \pi\tau\left(\sum_{k=-\infty}^{+\infty} c_k \delta\left(\dfrac{k}{\tau}-f_0\right)+\right.\\
      &                      \left.\sum_{k=-\infty}^{+\infty} c_k \delta\left(\dfrac{k}{\tau}+f_0\right)\right)
\end{align*}
\end{docum
2
  • BTW: why ={}?
    – daleif
    Mar 13, 2015 at 7:55
  • I experienced that otherwise there is (sometimes?) a missing distance between the = and the following term. Maybe that it is not necessary anymore ...
    – Jürgen
    Mar 13, 2015 at 8:25

1 Answer 1

3

You can add

\phantom{= \pi\tau\left(\vphantom{\sum_{k=-\infty}^{+\infty}}\right.}\kern-\nulldelimiterspace

after the & like in

\documentclass{scrartcl}
\usepackage{amsmath}

\begin{document}
\begin{align*}
 S(f) & = \pi\left(S(f-f_0)+S(f+f_0)\right)\\
      & = \pi\tau\left(\sum_{k=-\infty}^{+\infty} c_k \delta\left(\dfrac{k}{\tau}-f_0\right)+\right.\\
      & \phantom{= \pi\tau\left(\vphantom{\sum_{k=-\infty}^{+\infty}}\right.}\kern-\nulldelimiterspace
           \left.\sum_{k=-\infty}^{+\infty} c_k \delta\left(\dfrac{k}{\tau}+f_0\right)\right)
\end{align*}
\end{document}

enter image description here

With \biggl etc, it would be

\documentclass{scrartcl}
\usepackage{amsmath}

\begin{document}
\begin{align*}
 S(f) & = \pi\left(S(f-f_0)+S(f+f_0)\right)\\
      & = \pi\tau\Biggl(\sum_{k=-\infty}^{+\infty} c_k \delta\biggl(\dfrac{k}{\tau}-f_0\biggr)+\\
      & \phantom{{}={}\pi\tau\Biggl(}\kern-\nulldelimiterspace
           \sum_{k=-\infty}^{+\infty} c_k \delta\biggl(\dfrac{k}{\tau}+f_0\biggr)\Biggr)
\end{align*}
\end{document}

And with aligned as suggested by dalief

\documentclass{scrartcl}
\usepackage{amsmath}

\begin{document}
\begin{align*}
 S(f) & = \pi\left(S(f-f_0)+S(f+f_0)\right)\\
      & = \pi\tau\!
         \begin{aligned}[t]
         \Biggl(&\sum_{k=-\infty}^{+\infty} c_k \delta\biggl(\dfrac{k}{\tau}-f_0\biggr)+\\
         & \sum_{k=-\infty}^{+\infty} c_k \delta\biggl(\dfrac{k}{\tau}+f_0\biggr)\Biggr)
         \end{aligned}
\end{align*}
\end{document}

enter image description here

It is better to use the last option.

8
  • Just as a comment to the OP: Or (since it is align*) use aligned to align the stuff inside the big ()'s. Also not always a good idea to use those broken \left...\right. ... \left. ... \right) constructions
    – daleif
    Mar 13, 2015 at 7:56
  • @daleif It is a good idea. Thanks and added.
    – user11232
    Mar 13, 2015 at 8:09
  • I don't think you need dual \!. I usually also include the starting ( in aligned when I do this. Then I know the spacing inside the ()'s will be ok and I only need the traditional \! in front.
    – daleif
    Mar 13, 2015 at 8:15
  • @daleif That sounds good too. :)
    – user11232
    Mar 13, 2015 at 8:17
  • My answer would have just the second option. ;-) I agree with daleif that \!\! is not needed and, in this particular case, neither the single \! is, because of the protruding “k”.
    – egreg
    Mar 13, 2015 at 8: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.