Monday, November 14, 2011

LaTeX - Math Mode - Underbrace

To get an underbrace in LaTeX while in the math envrionment the command is

\underbrace{t + \dfrac{\Delta t}{2}}_{t_0}

\( \underbrace{t + \dfrac{\Delta t}{2}}_{t_0} \)

In order to use accents in math mode I have a post here which should help if you want to use accents within the underbrace:  http://timothyandrewbarber.blogspot.com/2011/11/accents-on-letters-in-latex.html

I am not fully certain they (the accents) all show up in the LaTeX java script (MathJax) I am using for this blog to display LaTeX, but they should work in an actual LaTeX editor such as Texmaker and Kile.

For example,

\underbrace{t + \dfrac{\Delta t}{2}}_{\grave{t}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\grave{t}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\acute{t}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\acute{t}_0} \]

 \underbrace{t + \dfrac{\Delta t}{2}}_{\text{\`{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\text{\`{t}}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\text{\'{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\text{\'{t}}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\`{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\`{t}}_0} \]

\underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\'{t}}_0}

\[ \underbrace{t + \dfrac{\Delta t}{2}}_{\textit{\'{t}}_0} \]

Yeah, the \text{} command isn't working in MathJax for some reason.  This is what it should do in an actual LaTeX editor:


2 comments:

  1. Hi!
    Your example was very helpful. In my case, however, it is more complicated: I have to use accents (I write in portuguese) as label to some underbraces. Can you tell me how to do it?
    -enivaldo bonelli

    ReplyDelete
  2. Sure, I will do my best to help! See updated post. In short, you can use accents in LaTeX's math mode by using commands such as \grave{a}, \acute{a}, etc. For those that do not have a math mode command, you should be able to use the \text command within the math environment. For example \text{\'{a}} and \text{\`{a}}. In order to italicize use \textit{\'{a}} and \textit{\`a}}.

    ReplyDelete