7

I have the following piece of code:

\documentclass[]{article}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{amsfonts}
\begin{document}
\begin{align*}
A      &= 
                \sum\limits_{X \subseteq V} 
                \sum\limits_{W \subseteq V^{\ast}(X)} 
                \left| \mathcal{L} \left( X, W' \right) \right| \left|X'\right| \\
       &\leq 
                \sum\limits_{X \subseteq V} 
                \sum\limits_{W \subseteq X'} 
                \left| \mathcal{L} \left( X, W' \right) \right|\left|X'\right|, 
\end{align*}
\end{document}

which looks like this

align the sigmas!

What I'd like to do is this: without changing the first line at all, align both the second sigmas and the arguments inside them.

Any ideas?

1 Answer 1

7

If you are not afraid of a manual work...

\documentclass[]{article}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{amsfonts}
\begin{document}

\newlength\sumd
\settowidth{\sumd}{$\scriptstyle W \subseteq V^{\ast}(X)$}
\begin{align*}
A      &= 
                \sum\limits_{X \subseteq V} 
                \sum\limits_{W \subseteq V^{\ast}(X)} 
                \left| \mathcal{L} \left( X, W' \right) \right| \left|X'\right| \\
       &\leq 
                \sum\limits_{X \subseteq V} 
                \sum\limits_{\makebox[\sumd]{$\scriptstyle W \subseteq X'$}} 
                \left| \mathcal{L} \left( X, W' \right) \right|\left|X'\right|, 
\end{align*}
\end{document}

enter image description here

0

You must log in to answer this question.

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