TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

sometimes when writing mathematical expression with partial derivatives, one needs to write a vertical bar afterwards and write the value at the which the partial derivatives are being computed as subscripts. See for example the bottom post here:


However, the \mid symbol doesn't produce a tall bar that corresponds to the size of the partial derivatives term. Is there a way to have a taller bar?

PS: Some other posts here mention \middle| but this doesn't compile on my computer.

Thanks in advance....

share|improve this question
related tex.stackexchange.com/questions/222222/… – mystery Jan 8 '15 at 6:59
up vote 13 down vote accepted


\left.\frac{\partial f}{\partial x}\right|_{x_0}

Or if you have \usepackage{amsmath}, you can use \rvert instead of the |. In fact, this is probably the better way to go.

share|improve this answer
Thanks it works fine. I was using \rvert earlier also. My problem is that I used a custom partial derivative formulation from: tug.org/TUGboat/Articles/tb18-1/tb54becc.pdf .This was causing problems with the size of the vertical bar following the partial derivatives. – yCalleecharan Sep 16 '10 at 9:27
1 vote up for the elegant solution. – yCalleecharan Sep 16 '10 at 9:33
You can also use \biggr (or one of the other similar macros). As a side note, anyone (including the ISO) who thinks that e should be typeset upright should probably just be ignored (modulo hard publishers' requirements). =) – TH. Sep 16 '10 at 9:38
\rvert and | are equivalent in this case because the class is ignored when a mathchar is used as a delimiter. – Philipp Sep 16 '10 at 9:41
Note that \left.\frac{\partial f}{\partial x}\right|_{x_0} causes there to be an extra \nulldelimiterspace of blank space to the left of the fraction. (By default, \nulldelimiterspace is 1.2pt.) Depending on what's around this expression, it's either a good idea or not worth the trouble to remove that extra space. – MSC Mar 15 '13 at 19:37

\middle should work in any current system. But it needs accompaigning \left+\right. Like braces in \left/right it will adapt its size to the size of the content:


$\left\{\int \middle|\int\right.$
$\int\mid \int$
share|improve this answer
Yes it works fine. Thanks for explaining how to use it. – yCalleecharan Sep 16 '10 at 9:29
\middle requires e-TeX, but as you say, any current system... – TH. Sep 16 '10 at 9:31
Yes it's ok with my TeXLive. 1 vote up for the explanation. – yCalleecharan Sep 16 '10 at 9:32
see also my question: tex.stackexchange.com/questions/222222/… – mystery Jan 8 '15 at 6:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.