This question relates to one about getting a vertical bar longer than \mid
.
How to get a vertical bar which is longer than \mid ?
However while the given \middle|
solution works for me, it no longer behaves as a binary relation and so loses the space to the left-and-right of it that \mid
puts in.
(I know I could manually add space, but I want the right way to do this.)
In fact I want a "growable \mid
" that works like \left\{
and its relatives.
Best Answer
If you want to get
\middle|
to behave exactly as\mid
on all accounts (spacing, stacking in the form\mid\mid
, etc.), you need to use\mathrel{}
on both sides of\middle|
(manual spaces like \; won't do the job correctly in all situations):Here's a code that compares
\mid
and the new command\relmiddle
on two different formulas and shows that the spacing is identical: