22

\mid within \left and \right delimiters is expected to be automatically scaled, but today I noticed such behavior:

L = \sup \left\{ \sum_{x \in F} a(x) \mid F \subset X,\, |F| < \infty \right\},

enter image description here

I suppose the optimal middle bar should be somewhat taller. (Or is this just an illusion?) Any ideas? Thanks.

BTW, this behavior was triggered in amsart. I didn't test it in other document classes (nevertheless, I believe that the behavior should be the same as long as \mid is defined).

4
  • 5
    See How does TeX decide how to size a middle delimiter?. You should use \middle as the delimiter-sizing macro. More specifically, \middle|.
    – Werner
    Apr 12, 2013 at 18:02
  • @Werner Thanks, I used the wrong command. Anyway, \middle| yields terrible result in this case, I would well go with \mid...
    – 4ae1e1
    Apr 12, 2013 at 18:05
  • 1
    Add some spacing around it: \,\middle|\,. It looks terrible, but it is correct in terms of the \left and \right braces. Correct in the sense that it matches the height of the outer elements. Inside, of course, there's nothing as big close to it, so it looks excessively ugly. Suggestions would be to not use \left and \right, but rather \bigl and \bigr say, and perhaps stick to \mid.
    – Werner
    Apr 12, 2013 at 18:11
  • For visual examples of \bigr: tex.stackexchange.com/questions/15894/…
    – percusse
    Apr 12, 2013 at 22:16

1 Answer 1

23

Here are some possible choices

\documentclass{article}
\usepackage{mleftright}
\begin{document}
\[
L = \sup \mleft\{\, \sum_{x \in F} a(x) \;\middle|\; F \subset X,\, |F| < \infty \,\mright\},
\]
\[
L = \sup \biggl\{\, \sum_{x \in F} a(x) \mathrel{\bigg|} F \subset X,\, |F| < \infty \,\biggr\},
\]
\[
L = \sup \biggl\{\, \sum_{x \in F} a(x) \mathrel{\Big|} F \subset X,\, |F| < \infty \,\biggr\},
\]
\end{document}

I'd choose the third one, probably, ruling out the first which has too high braces.

enter image description here

0

Not the answer you're looking for? Browse other questions tagged .