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

How can I make an integral symbol with a bar above it or a bar below it?

share|improve this question
Mathematical FYI: Technically they are lower and upper Darboux integrals. The Riemann integral is defined using tagged partitions instead. Of course the two definitions are equivalent as per the sketch of a proof given in the first Wikipedia article. – kahen Feb 12 '12 at 6:08
up vote 12 down vote accepted

From what I've seen online, it suffices to use \overline and \underline.

Here is a minimal example that defines


which draws the "upper Riemann integral" over the range [<lo>,<hi>]. Analogously,


defines the "lower Riemann integral" over the range [<lo>,<hi>].

enter image description here

  \loRiemannint{a}{b} f(x)\,\mathrm{d}x \qquad \textrm{or} \qquad \upRiemannint{a}{b} f(x)\,\mathrm{d}x

These integrals also translate to use in text mode, but vertical alignment is slightly off due to the integral sign by default.

share|improve this answer
Sorry for this negative comment but the output of your code just doesn't look right to my mathematical eye. Leo Liu got the right output. I wonder if the his code could be simplified? – Predrag Punosevac Feb 13 '12 at 1:54
@PredragPunosevac: I agree. I found this source and went from there... – Werner Feb 13 '12 at 15:22
@PredragPunosevac yes, it may look bad, but that's how it is expressed in lots of books. – Alfredo Hernández Mar 7 '13 at 16:31

Personally I use shorter bars. It makes the macro much more complex:

   \upint_a^b f(x)\,\mathrm{d}x \\
   \lowint_a^b f(x)\,\mathrm{d}x

<code>\upint</code> and <code>\lowint</code>

I'm not sure which is better. Some new Unicode math fonts (XITS Math and Asana Math) have \lowint and \upint, and you can use unicode-math package to load the fonts. They also use wide bars.

enter image description here (from unimath-symbols doc)

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.