Is there any way to have a "tall bar" with upper and lower limit values, such as used after integrations?

One formatting thing I'm still curious about and haven't sussed out through examining things on my own is if there's any way to add a "tall bar" to the end of a line, with a superscript and a subscript. I'm envisioning something seen after doing a definite integral, where many authors often put a tall vertical bar at the end of the expression with the limits of integration attached to that bar. Usually that vertical bar extends a bit over the top of the line and a little under the line.

The closest I have come up with so far is using the pipe symbol - which does extend about the height I'd want, but as soon as I attach the limits with ^ and _, it immediately shrinks down to regular height, which crams together the limits.

For instance:

without hashtags

int_0^2 x^2 dx = x^3/3 |

with hashtags

#int_0^2 x^2 dx = x^3/3 |#

without hashtags

int_0^2 x^2 dx = x^3/3 |_0^2

with hashtags

#int_0^2 x^2 dx = x^3/3 |_0^2 #

Any suggestions?

2 Answers
Sep 29, 2017

Yes, but it's (kinda) tedious.

Explanation:

An easy way to bypass that problem is to use right brackets instead of a vertical bar.

So, for example, you can write something like this

  • without hashtags

int_0^2 x^2 dx = [x^3/3 ]_0^2

  • with hashtags

#int_0^2 x^2 dx = [x^3/3 ] _0^2#

Not ideal, not by a long shot, but you can use it to get the point across. In fact, I think that most contributors use this technique when posting answers on definite integrals.

Now, we do have a way--or possibly more--of adding lower and upper values to a vertical bar, but it takes a bit of creativity and the result is far from perfect.

The idea is that you add the value you want as the lower limit as a fraction with an invisible numerator and an invisible fraction bar.

In your case, you'd have--for illustration purposes, I'll use color(red)() instead of color(white)()

  • without hashtags

color(red)(a/color(black)(0))

  • with hashtags

#color(red)(a/color(black)(0))#

Notice that the numerator and the fraction bar are invisible here.

The same principle applies to the value that you want as the upper limit, only this time, you need a fraction with an invisible denominator and an invisible fraction bar.

  • without hashtags

color(red)(color(black)(2)/0)

  • with hashtags

#color(red)(color(black)(2)/0)#

If you combine the two fractions, you'll get

  • without hashtags

int_ 0^2 x^2 dx = x^3/3 |_(color(red)(a/color(black)(0)))^(color(red)(color(black)(2)/a))

  • with hashtags

#int_ 0^2 x^2 dx = x^3/3 |_(color(red)(a/color(black)(0)))^(color(red)(color(black)(2)/a))#

As you can see, the two limits are a little further apart.

Using color(white)() instead of color(red)() for full effect

  • without hashtags

int_ 0^2 x^2 dx = x^3/3 |_(color(white)(a/color(black)(0)))^(color(white)(color(black)(2)/a))

  • with hashtags

#int_ 0^2 x^2 dx = x^3/3 |_(color(white)(a/color(black)(0)))^(color(white)(color(black)(2)/a))#

As I said, the result is far from perfect--notice that the integration limits were reduced in size because the two fractions must fit the height of the vertical bar--but I'd say that this technique gets the job done :D

If you want, you can experiment with this technique to get the two values even further apart by using more fractions, but that would only make the process more tedious + the results are not going to be that great.

Dec 18, 2017

Got it!

Explanation:

#{:x^3/3|:}_0^2#

Used {:x^3/3|:}_0^2

hash left brace colon expression veritical pipe colon right brace subscript 0 superscript 2