14

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

Mike
  • 585
  • 3
  • 14

2 Answers2

22

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

enter image description here

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"]]

enter image description here

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]

enter image description here

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

Jason B.
  • 68,381
  • 3
  • 139
  • 286
1

Note that the keyboard shortcut for getting under an expression is now Shift + Control + , Thus:

  • Highlight text
  • Shift + Control + ,
  • Esc + u { + Esc
  • Highlight text AND underbracket
  • Shift + Control + ,
  • Type text under the underbracket
Zzm
  • 11
  • 2