# How to automatically scale \mid within delimiters [duplicate]

This question already has an answer here:

\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\},


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).

## marked as duplicate by Werner math-mode StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Feb 1 '16 at 20:00

• 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 '13 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 '13 at 18:05
• 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 '13 at 18:11
• For visual examples of \bigr: tex.stackexchange.com/questions/15894/… – percusse Apr 12 '13 at 22:16

\documentclass{article}
$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\},$