TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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} from mathtools is 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:


                {#2*}%        % standard case using \left and \right


    \liminf \set*{\sum}


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.
share|improve this question
Possible Related Question: How to compute exact width added by \left. \right. – Peter Grill Jan 18 '13 at 20:01
up vote 7 down vote accepted

I continue to believe that one should use \left and \right where really needed and any sort of automatism for this is bad.

However, here's a simple and working implementation of your macro, that I call \xDeclarePairedDelimiter




&\liminf \set{\sum}\\
&\liminf \set*{\sum}\\
&\liminf \set[\big]{\sum}\\
&\liminf \set[\Big]{\sum}


enter image description here

share|improve this answer
Thanks. Could this work but with [big] or [Big] instead of your [\big] or [\Big]? By the way, the automatism helps if you take notes during lessons (where it doesn't matter if it's perfect or acceptable): much easier to write \set{…} all the time, and after all do a fast check in less than ten seconds looking for overheight delimiters than calculating all the time which height is appropriate. – Manuel Jan 18 '13 at 22:49
@Manuel Why? Please, don't use this macro. ;-) And if you really want to use big instead of \big, change \mathopen{##2#2}##3\mathclose{##2#3} into \mathopen{\csname##2\endcsname#2}##3\mathclose{\csname##2\endcsname#3} – egreg Jan 18 '13 at 22:53
One problem is promoting it to users who does not think much about what they are doing. I've edited lots of code where the author just plastered left right all over the place. (my tablet does not seem to have back ticks) I hardly ever use left right any more. It looks at better in a manus script if you have a clear strategy for how to scale things – daleif Jan 19 '13 at 12:51
@daleif OK, too many unneeded \left and \right blur the code. But this is not happening here. Also, the spacing issues that the standard \left/\right has (think of \sin \left( x \right)) are avoided here. So I am genuinely interested in an example where the approach in the answer fails. Moreover, you have to manually check the output anyway: if you use plain (/) you have to look for too small parentheses, with \xDeclarePairedDelimiter you have to look for too large parentheses. The question is, what happens more often? – mafp Jan 19 '13 at 16:47
One example is in text based math, using left right ends up scaling too much in too many cases, scaling which than affects line spacing. I'd rather have people become more aware about how they scale fences and by how much – daleif Jan 19 '13 at 19:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.