Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How I can use a vertical bar to represent evaluation in LaTeX

  1. Apr 16, 2008 #1
    Hey guys. This might not be the right place for this, but any ideas on how I can use a vertical bar to represent evaluation in LaTeX?


    [tex] \displaystyle \frac{d}{dt} |_{t=0} f(t) [/tex]

    I would like the vertical bar to be the size of the differential. I've tried using \left|, \right|, \vert, etc. but nothing seems to work. Thanks a lot in advance.
    Last edited by a moderator: May 5, 2011
  2. jcsd
  3. Apr 16, 2008 #2


    User Avatar
    Homework Helper

    Hi Kreizhn,

    Is this it?

    [tex]\left. \frac{d}{dt} \right|_{t=0} f(t)[/tex]

    which is given by

    \left. \frac{d}{dt} \right|_{t=0} f(t)

    Using either \left or \right on a period means the automatic delimiter sizing takes place, but only one delimiter is shown.
  4. Apr 16, 2008 #3
    Excellent, thank you
  5. Apr 16, 2008 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    \frac{d}{dt} \bigg|_{t=0} f(t) achieves a similar effect
    with manual sizing (by using two g's) and the unneeded \left. tag.

    [tex]\frac{d}{dt} \bigg|_{t=0} f(t)[/tex]
  6. May 5, 2011 #5
    Re: LaTeX

    I'm using lyx and I'm having difficulty trying to find the code for this vertical line. Any suggestions? I use the | but it's extremely small.
  7. May 5, 2011 #6
    Re: LaTeX

    Maybe try \|?

    The height of the vertical line will be determined by the {stuff} in between the \left. {stuff} \right|. If it's not naturally big, you may want to add an "invisible tower." My invisible tower is called \xstrut, and is defined as follows

    \newlength{\myVSpace}% the height of the box
    \setlength{\myVSpace}{3ex}% the default,
    \newcommand\xstrut{\raisebox{-.5\myVSpace}% symmetric behaviour,
    To change the height of the box, change

    \setlength{\myVSpace}{Your number here}
  8. Feb 19, 2012 #7
    \mathbf{M \bigg|_{x^k} \Delta x^k = -f(x^k)}
    \mathbf{M \bigg|_{x^k} \Delta x^k = -f(x^k)}[/tex]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook