0

I saw question about terms being partially ovarlapped in an equation but I don't want them to be partially overlapped, I just want one particular term to have have an underbrace and overbrace. I am new to LaTeX so I just want some simple line that I can copy and paste.

2

1 Answer 1

4

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[
\underbrace{\overbrace{a+b+c}^{\mathrm{over}}}_{\mathrm{under}}
\]
\end{document}
3
  • Thank you. What does that mathrm do? Can it be applied in any other situation?
    – David
    Dec 10, 2016 at 22:45
  • 1
    @David really any latex tutorial will show \mathrm it's best to start with some basic tutorials rather than just copy answers all the time otherwise you'll be asking hundreds of questions, but \mathrm makes text in a roman font designed for words. Never set words in the default math italic font as it is designed to make adjacent letters look like a product of variables. Dec 10, 2016 at 22:47
  • 1
    @David: I suggest that you have a look at the \text command as well: see section 6 of the User’s Guide for the amsmath Package (type texdoc amsmath on the command line to show it). \mathrm and \text are somewhat intercheangeable in their functionality, but differ in some important details. Basically, I’d recommend using \mathrm for words, or word chunks, that should look the same in all contexts, like “sin”, and \text for words, or phrases, that, contrarily, should change their font to match the font of the surrounding text.
    – GuM
    Dec 11, 2016 at 2:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .