[Tex/LaTex] Label terms of LaTeX equation

equationssubequations

I'm interested in labelling my latex equation, by giving the physical phenomenon contributing to the term. For instance x = f(y) + g(y). So a horizontal curly bracket to explain that f(y) is derived from some phenomenon, say resistance and g(y) is derived some other phenomenon, say gravity.

How can I give a name to f(y) as resistance and g(y) as gravity in the equation?
Hope I'm able to explain my intentions.

Thank you,
Aditya

Best Answer

You have \underbrace from amsmath and \underbracket from mathtools (which loads amsmath). I added some horizontal adjustment with the \clap command (from mathtools), since the labelled terms are short:

\documentclass{article}

\usepackage{mathtools}

\begin{document}

    \[ x = \underbracket[0.8pt]{f(y)}_\text{\clap{resistance~}} + \underbracket[0.8pt]{g(y)}_\text{\clap{~gravity}} \]
    \[ x = \underbrace{f(y)}_\text{\clap{resistance~}} + \underbrace{g(y)}_\text{\clap{~gravity}} \]%%

\end{document} 

enter image description here

Related Question