How to typeset the Newton-Leibnitz formula?

I have a formula such as this one:


here is the code:

$
  "Area"(G_([-1,1])(f)) = F(x) \|_(x = -1)^(x = 1) = (x - 1/3 x^3 )|_(x = -1)^(x = 1) = (x - 1/3 x^3 )lr(|, size: #{220%})_(x = -1)^(x = 1)
$

I would like a way to typeset the vertical lines that indicate integration bounds such that they

  1. Have the same height as the preceding formula;
  2. Have the subscript and the superscript attached at the ends (like the one after F(x)), not in the middle.

I would appreciate any help :)

Welcome @thornoar!
You were on the right track, lr is the function you need, but to auto-scale vertical line | it needs to be used like this:

$
  lr((x - 1/3 x^3 )|)_(x = -1)^(x = 1)
$

test

For your second question, with lr the sub/superscripts should by default be on the ends, but there is currently a bug when using explicit scaling that will be fixed in v0.13.

3 Likes