[Tex/LaTex] How to add an underbrace and overbrace to a term in a equation

amsmathmath-mode

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.

Best Answer

enter image description here

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

\[
\underbrace{\overbrace{a+b+c}^{\mathrm{over}}}_{\mathrm{under}}
\]
\end{document}
Related Question