# How to type text with an underbrace underneath it like: $\underbrace{g…g}_{n-times}$?

I want to use the underbrace "esc u{ esc" but have it placed underneath text. Like $$\underbrace{g...g}_{n-times}$$

in a mathematica text cell. Is it possible? Thanks

• There's also this palette that I made for a different question. – Jens Apr 6 '16 at 17:45
• @Jens That's really neat, thanks. – Mike Apr 7 '16 at 10:30

You want to use an UnderBrace. Highlight the g....g then type Ctrl-4 to get under it, then type Esc u{ Esc, then highlight the underbracket and hit Ctrl-4 again, gives this

To get better, you might want to use Szabolcs's MaTeX package, in which case you will get an image of the rendered TeX,

<<MaTeX
MaTeX@Underscript["g...g", Underscript[︸, "n-times"]]


Actually just installed the package for this answer and it's my new favorite, you can simply enter TeX and have it evaluated (with the caveat that you need to use \\ when you would use \ in TeX),

MaTeX["\\underbrace{g....g}_{n-times}", FontSize -> 18]


And for those of you, like me, who are using the latest stable release of Ubuntu, then in order to get the required version of ghostscript you need to follow the advice from this answer as well as having the lmodern fonts installed with sudo apt-get install lmodern`