In my works I normally use
\{x\mid\varphi(x)\}
as a set forming operator. Its disadvantage, from my point of view, is that the vertical stroke is always the same, irrespective of the context. Is there any package that would make \mid context sensitive? In the sense that when I for example use
\Bigl\{x\mid\varphi\}\Bigr
the height of \mid is adjusted to the height of the brackets? If not, could you please give me a hint how can I define it to work in this way?
\Bigl\{x\Bigm|\varphi\Bigr\}will do – egreg May 12 '16 at 11:23\DeclarePairedDelimiterX\set[1]{\lbrace}{\rbrace}{\def\given{\mathrel{}\mathclose{}\delimsize|\mathopen{}\mathrel{}}#1}and then use\set{x\given\phi},\set[\big]{x\given\phi},\set[\Big]{x\given\phi},\set[\bigg]{x\given\phi},\set[\Bigg]{x\given\phi},\set*{x\given\phi}. – Manuel May 12 '16 at 11:45\givensuch that if you later on decide of a different symbol, you only have to change it once, no search'n'replace – daleif May 12 '16 at 11:49|(my version does) – daleif May 12 '16 at 11:53\allowbreakor other thing. The name\givenI took from you, I used\stbefore. – Manuel May 12 '16 at 11:55