1

Why is there no tex command like \paren{---} equivalent to \left( --- \right)?

We almost always use open and close brackets in conjuction, so it makes sense (to me) to have such a command. My question is not how to create such a command, but why such a design choice was made.

Is there any advantage/ common use case for having separate open and close brackets?

  • 4
    Might be off-topic, hence a comment. The answer to the choice's origin can come only from Donald Knuth and/or Leslie Lamport. Personal comment: as a theoretical physicist who writes a lot of equations, I don't want brackets to be hidden in some macro. I want to see them, such that looking at the code I can understand the equation (I can make exceptions for something like \abs{...} but also only for short things). Moreover, when going over multiple lines \left and \right do not work anyway. – campa Sep 1 '17 at 15:20
  • 4
    in addition to @campa's comments, math has expressions like (0,1] where the delimiters are "mismatched". there are packages that do define paired delimiters, so you might take a look for one of those. – barbara beeton Sep 1 '17 at 15:25
  • 1
    But they can work with \DeclarePairedDelimiter, frommathtools. – Bernard Sep 1 '17 at 15:26
  • 1
    IF you want that macro, it's trivial to define it: \newcommand\paren[1]{\left(#1\right)}. There are hundreds of commands like this that might be useful to somebody, some time or other. If they were all predefined, IMO you would never be able to find them, or remember what they were called. – alephzero Sep 1 '17 at 15:48
  • @Bernard looked into \DeclarePairedDelimiter, seems like just what i was looking for – Vignesh Manoharan Sep 1 '17 at 17:51
9

They're not always used in conjunction. A trivial example is intervals, which might be expressed as [0,1) or equivalently [0,1[. Similar conterexamples using other types of brackets and related symbols include Bra-ket (Dirac) notation in quantum physics.

Separate commands for brackets also mean that we can split an equation over multiple lines without having to consider whether that breaks your \paren command.

Thus a command like you propose would be nice to have in some fields, and useless in others. That's why you're welcome to write your own.

  • 1
    Nice thanks, just the kind of answer I was hoping for. But I still think having such commands would help - and we can always make our own – Vignesh Manoharan Sep 1 '17 at 17:49
5

On the whole the choice of commands available in math mode goes back to Don's original idea that the syntax for those commands should be easy to communicate (over a phone). Or say verbally in general. And translating the visual to a sequence of words you do not really think in long-range structures that require you to keep track of a brace (argument) level to understand what a closing brace signifies.

This explains (I think) also the somewhat questionable choices like providing \over that are actually technically a mess to implement as in $a+b \over 2$ the \over is suddenly changing the state of earlier material. And as you can see Leslie tried to change that by introducing \frac and amsmath introduced \binom and the like because they thought that those are sensible standalone constructs with names that can and should be called out as such.

But I must confess that personally for parentheses and the like I think it is much more readable to see them visually in the formula (whether or not with an additional \left/\right attached) compared to having a long-range command with one argument where I have difficulties to see what is the starting point.

Furthermore if you do not use \left/\right but explicit sizing like \biggl etc. then these can come up on their own which again is an advantage in many cases.

But others might see this differently and as it was pointed out it is simple enough to provide your own structures that offer those on a command basis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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