7

The problem of typesetting with long limits has already been discussed in Improving typesetting of sums with long limits. However, the answer given there uses \mathop, which does not produce satisfying results if not only the limit, but also the 'operand' is long, as shown in the following MWE:

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator{\variables}{variables}
\DeclareMathOperator{\parentstate}{parentstate}
\DeclareMathOperator{\visible}{visible}
\newcommand*{\dotcup}{\mathbin{\dot{\cup}}}

\begin{document}
    original:
    \[
    \visible(s) = \variables(s) \dotcup \dot{\bigcup_{p \in \parentstate^+(s)}} \variables(p)
    \]

    with \verb+\mathop+:
    \[
    \visible(s) = \variables(s) \dotcup \mathop{\dot{\bigcup} \variables(p)}_{p \in \parentstate^+(s)}
    \]
\end{document}

This produces the following: enter image description here

I'd rather have the best of both approaches, i.e. not have the limit centered under the whole \mathop, but only under the operator itself, and leave some space at the left of the operator (as in the firstversion), but move the operand closer (as in the second version).

2 Answers 2

3

To have space before but not after you can use \smashoperator[r] from the mathtools package. Of course you have to make sure that what you are smashing is an operator:

Sample output

\documentclass{article}
\usepackage{mathtools}

\DeclareMathOperator{\variables}{variables}
\DeclareMathOperator{\parentstate}{parentstate}
\DeclareMathOperator{\visible}{visible}
\newcommand*{\dotcup}{\mathbin{\dot{\cup}}}

\begin{document}
\begin{equation*}
  \visible(s) = \variables(s) \dotcup
  \smashoperator[r]{\mathop{\dot{\bigcup}}_{p \in \parentstate^+(s)}} 
  \variables(p)
\end{equation*}

\end{document}
7

The mathtools package provides the \mathclap command, which will reduce the size of the subscripts.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}

\DeclareMathOperator{\variables}{variables}
\DeclareMathOperator{\parentstate}{parentstate}
\DeclareMathOperator{\visible}{visible}
\newcommand*{\dotcup}{\mathbin{\dot{\cup}}}

\begin{document}
    original:
    \[
    \visible(s) = \variables(s) \dotcup \dot{\bigcup_{p \in \parentstate^+(s)}} \variables(p)
    \]

    with \verb+\mathop+:
    \[
    \visible(s) = \variables(s) \dotcup \mathop{\dot{\bigcup} \variables(p)}_{p \in \parentstate^+(s)}
    \]

    with \verb+\mathclap+:
    \[
    \visible(s) = \variables(s) \dotcup \dot{\bigcup_{\mathclap{p \in \parentstate^+(s)}}} \variables(p)
    \]
\end{document}

Demonstration of \mathclap.

Alternatively, if you want more space, you can use \mathmakebox. This allows you to customise the apparent width of the subscript.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}

\DeclareMathOperator{\variables}{variables}
\DeclareMathOperator{\parentstate}{parentstate}
\DeclareMathOperator{\visible}{visible}
\newcommand*{\dotcup}{\mathbin{\dot{\cup}}}

\begin{document}
    original:
    \[
    \visible(s) = \variables(s) \dotcup \dot{\bigcup_{p \in \parentstate^+(s)}} \variables(p)
    \]

    with \verb+\mathop+:
    \[
    \visible(s) = \variables(s) \dotcup \mathop{\dot{\bigcup} \variables(p)}_{p \in \parentstate^+(s)}
    \]

    with \verb+\mathmakebox+:
    \[
    \visible(s) = \variables(s) \dotcup \dot{\bigcup_{\mathmakebox[1cm]{p \in \parentstate^+(s)}}} \variables(p)
    \]
\end{document}

Demonstration of \mathmakebox.

2
  • Thanks for your answer. However, I'd like to keep the space left of the operator as in the top-most version -- it seems easier to read that way, at least to me :).
    – rainer
    Commented Aug 9, 2013 at 9:33
  • mathtools has more tools for this see \smashoperator
    – daleif
    Commented Aug 9, 2013 at 9:49

You must log in to answer this question.

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