How does TeX decide how to size a middle delimiter? When I want to show evaluation of limits of an integral, I would type $$\int_1^2 x\; dx=\frac{x^2}{2}|_1^2=4-\frac{1}{2}=\frac{7}{2}.$$
How do I get the vertical bar showing the limits big enough? I have found \bigg
and \Big
but I would like it to autosize like \left
. It seems harder because there isn't a left side to figure out what is inside. I tried \left
space and \right \mid
, but didn't find success. On math.stackexchange it was stated I just needed \left
. as period is a delimiter. Is there a list of delimiters?
[Tex/LaTex] How does TeX decide how to size a middle delimiter
delimitersmath-operators
Best Answer
You should use:
Latex grabs the height of whatever is in between the
\left
and\right
and then adjust the delimiters (.
and|
in this case) to be big enough to encompass that.Since in your example, the limit evaluation only relates to the fraction in front of it, therefore one can use
\left
and\right
without the need of\middle
. Since we don't need a left delimited we use.
which stands for ''nothing''. Even if we don't want a left delimiter\left
has to be there to tell latex where to start measuring the height.\middle
is only needed when three or more delimiters are used, as is the case in this example:where we would want the collections curly braces to match with the inner line.
Giving a list of delimiters would be hard, since there are so many of them, and a lot of packages introduce new ones. Have a look at The Comprehensive Symbol List to have an idea of what is generally in use. I mostly use
( )
\{ \}
[ ]
and|
.Some other notes:
\Big
etc since this doesn't work automatically.\[
and\]
to denote a math environment instead of$$
, which is old tex code instead of latex.