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

I'm trying to typeset an equation that contains a "|":

\lambda_{l} = \lim_{q \to 0^{+}}P\left(X_{2} \leq F_{2}^{(-1)}(q) \middle|  X_{1} \leq F_{1}^{(-1)}(q) \right) 

which gives me enter image description here

The "|" seems to be too long. I've tried \midbut that makes the vertical bar too short in relation to the outer left and right brackets. Is there a way I can get the "right" size "|" automatically?


share|improve this question
You really need to include a MWE that recreates the problem. With a bare document with just amsmath loaded, the issue does not present for me. – cslstr May 29 '14 at 16:04
In particular, as the font you're using clearly isn't Computer Modern, please be sure to indicate which font-related package(s) you load. – Mico May 29 '14 at 16:39
I'm loading \usepackage[bitstream-charter]{mathdesign} and \usepackage[scaled]{berasans} – user2249626 May 29 '14 at 16:44
up vote 4 down vote accepted

I'd argue that not only the middle vertical bar but also the outer parentheses are unnecessarily large. Try using \bigl(, \bigm|, and \bigr) to control the size of the symbols. As an extra nice touch, you could add a thinspace on either side of the big parentheses.

enter image description here

\lambda_{l} = \lim_{q \to 0^{+}}P\bigl(\, X_{2} \leq F_{2}^{(-1)}(q) \bigm|  
    X_{1} \leq F_{1}^{(-1)}(q) \,\bigr) 
share|improve this answer
\delimiterfactor=850 reduces the size of all of \left(, \right) and \middle|. They then actually come out the same size. However, that could possibly ruin other combinations. The real problem seems to be that there are finer divisions between different sizes of parentheses than between different sizes of \middle| in these mathdesign fonts. – Dan May 29 '14 at 17:48

use \big| instead. However, for me it looks ok with \middle|.

share|improve this answer

You can use this definition for conditional probabilities, adapted from the last version of mathtools (p. 27 of the doc). It has a simple syntax: \Prob{A \given B} for a a series \left…\middle…\right, or with an optional size argument: \prob[\big-Big-bigg-Bigg]{A \given B}:




    \lambda_{l} & = \lim_{q \to 0^{+}}\Prob{X_{2} \leq F_{2}^{(-1)}(q) \given X_{1} \leq F_{1}^{(-1)}(q)} \\
     & = \lim_{q \to 0^{+}}\prob[\big]{X_{2} \leq F_{2}^{(-1)}(q) \given X_{1} \leq F_{1}^{(-1)}(q)}

enter image description here

share|improve this answer

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.