\smashoperator
pulls big parentheses too close causing them to overlap with the limits. Is there any workaround?
Edit: An ad-hoc solution is to force an appropriate amount of empty space to the right/left of the left/right parentheses using \,
\quad
etc. But these "tricks" obviously defeat the whole point of using LaTeX.
Example:
\documentclass[american]{article}
\usepackage{amsmath,amssymb,amsthm,mathtools}
\usepackage{babel}
\begin{document}
$\lambda\left(\smashoperator{\bigcup_{x=lowerlimit}^{upperlimit}} f(x) \right)$
\end{document}
Best Answer
As noted in the comments, it's very difficult to define a
\smashoperator
command that deals with all possible cases involving long limits. To understand why it is difficult, you need to know a little about boxes inTeX
. Roughly speaking, horizontally smashed boxes (the limits in this case) are considered to have zero width, and there is no easy way to saywhich is what you need.
The following code seems to work in your case, but will probably fail in others that I have not considered. In my opinion it would be better to avoid long limits, because they are grotesque (perhaps this is why the author(s) of
mathtools
did not provide an easy way to construct them).