I am looking for a pipe symbol that can be made to vary in height automatically.
One of the common ways of writing "such that" in mathematics is with the pipe symbol (|). The pipe can be represented in LaTeX directly as the character | or as \vert, but neither of these expands vertically in math presentation mode. I can adjust it manually this way:
\[\mathcal{H}=\left\lbrace h(x)=\sum_{i=0}^{k-1}a_{i}x_{i}\mod m\ \Bigg\vert
\ a_{i}\in\mathbb{Z}_{m^{k}}\right\rbrace\]

but I am looking for a true variable-sized option, parallel to \lbrace etc.
The amsmath package provides \lvert and \rvert, but I do not find them expanding as expected, and the amsmath documentation specifies that they should be used as binary delimiters (one on each side of something else), rather than alone.


\[ ... \]for display math as opposed to$$ ... $$. See thel2tabudocumentation. – Werner Oct 19 '11 at 15:54$$ ... $$for displayed math. See Why is [ .. ] preferable to $$ .. $$ – Alan Munn Oct 19 '11 at 15:54\[ ... ]\, but for some reason the code did not convert to mathematics and only the brackets were showing when I posted. So I thought I'd be safer with the$$. I'll change them back now, though. – brannerchinese Oct 20 '11 at 03:32\/) there. But I didn't; lazy, no excuse, your forbearance please. – brannerchinese Oct 20 '11 at 22:09|and\vertis not the correct way to write "such that" because they are not defined as binary relation symbols. The correct way is to use\mid. See also http://jblevins.org/notes/latex#conditioning and http://tex.stackexchange.com/questions/498/mid-vert-lvert-rvert/500#500 – N.N. Oct 21 '11 at 05:49