After seeing the answer to this question I realized that I preferred the way of working of Juan A. Navarro's answer:
- I.e.,
\DeclarePairedDelimiter{\parens}{\lparen}{\rparen}frommathtoolsis a great tool, it gives you\parens{…}which doesn't adjust the height,\parens*{…}, which automatically adjusts the height,- and i.e.,
\parens[\bigg]{…}, which result in the size you specified.
\newdelimcommand{\parens}{\lparen}{\rparen}from the answer I linked results in\parens{…}which automatically adjusts the height,\parens*{…}, which doesn't adjust the height,- and i.e.,
\parens[bigg]{…}, which result in the size you specified.
I prefer the second way of working than mathtools. But, the spacing you get is wrong (like if you were using \left( instead of \biggl(). I tried using \usepackage{mleftright} \mleftright before the code from Juan A. Navarro, but it didn't work. So my question is
How could I get the style of the answer I linked but with correct spacing (like mathtools)?
May be it is easier to exchange the behavior in mathtools starred and unstarred (plus the bigg instead of \bigg), or may be it's easier to rewrite Juan A. Navarro's code.
EDIT: Well, reading I got here, and then here. Were the last absolutely answers my question except that the starred version doesn't work.
Here is the code:
\documentclass{scrartcl}
\usepackage{mathtools}
\usepackage{etextools}
\usepackage{ifthen}
\makeatletter
\newcommand{\DeclarePairedDelimiterCase}[2]{%
\newcommand#1[1][]{%
\ifthenelse{\equal{##1}{normal}}%
{#2}%
{%
\ifthenelse{\equal{##1}{big}\OR\equal{##1}{Big}\OR\equal{##1}{bigg}\OR\equal{##1}{Bigg}}%
{\expandnext{#2[}{\csname##1\endcsname}]}%
{#2*}% % standard case using \left and \right
}%
}%
}
\newcommand{\DeclarePairedDelimiterY}[4][Temp]{%
\expandafter\DeclarePairedDelimiter\csname#2#1\endcsname{#3}{#4}%
\expandnext{\expandnext{\DeclarePairedDelimiterCase}{\csname#2\endcsname}}{\csname#2#1\endcsname}%
}
\newcommand{\DeclarePairedDelimiterXY}[6][Temp]{%
\expandafter\DeclarePairedDelimiterX\csname#2#1\endcsname[#3]{#4}{#5}{#6}%
\expandnext{\expandnext{\DeclarePairedDelimiterCase}{\csname#2\endcsname}}{\csname#2#1\endcsname}%
}
\makeatother
\DeclarePairedDelimiterY{set}{\lbrace}{\rbrace}
\DeclarePairedDelimiter{\pa}{\lparen}{\rparen}
\begin{document}
\begin{align*}
\liminf \set*{\sum}
\end{align*}
\end{document}
And then I get lim inf{*}∑ instead of what I want lim inf{∑}.
EDIT2: I realized that the one I used before had some extra options I do need:
\parens{…}and\parens[auto]{…}should be autosize.\parens*{…}and\parens[base]{…}should be the basic ones (without scaling).- The rest as I described before
\parens[bigg]{…}, etc. to manually scale.

