# \mathrlap type instruction but only 'locally' [duplicate]

\documentclass[a4paper]{report}

\usepackage{mathrsfs}

\begin{document}

$$\sum_{a',a'' \in \mathscr{A}} c_{a'}^* \, c_{a''}$$

\end{document}


results in this output:

.

I want the c's to start right after the sum sign, i.e. ignoring the subscript. If I encapsulate the subscript within \mathrlap{} from mathtools, however, it also messes up the placement of the sum sign. Thus, in essence, I want an instruction for the c's to ignore the vertical spread of the sum's subscript, but not the sum sign itself.

• Look at \smashoperator in the manual of mathtools – egreg May 21 at 8:02

The mathtools package provides a macro called \smashoperator along with two variants, \smashoperator[l] and \smashoperator[r]. I think you want either \smashoperator[r] or \smashoperator.

If you look closely at the code in lines 2 and 3 of the align* environment, you'll see that I also advocate replacing c_{a''} with c^{}_{a''} (to align the subscript term with the one in c_{a'}^*) and a',a''\in\mathscr{A} with a'\!,a''\in\mathscr{A} (for a slightly "tighter" look).

\documentclass[a4paper]{report}
\usepackage{mathtools,mathrsfs}
\begin{document}
\begin{align*}
x&=\sum_{a',a''\in\mathscr{A}} c_{a'}^* \, c_{a''}\\
x&=\smashoperator[r]{\sum_{a'\!,a''\in\mathscr{A}}} c_{a'}^* \, c^{}_{a''}\\
x&=\smashoperator{\sum_{a'\!,a''\in\mathscr{A}}} c_{a'}^* \, c^{}_{a''}
\end{align*}
\end{document}