[Tex/LaTex] Add equation name underneath equation number

amsmathequationsnumbering

I am wondering if it is possible (and if so how) to add names to equations just underneath the equation number. I am just using the standard equation environment to display the equation centered in the middle of the page, with the equation number flushed to the right hand side. I need to put some text immediately below the equation number to serve as the equation's name. Other requirements include:

  • The text should be horizontally right-aligned with the equation number and should not affect the latter's vertical alignment with the equation; i.e. the equation and equation number should still be vertically in line with each other.
  • The vertical spacing between the equation number and name should be standard text spacing; i.e. if the equation is vertically tall, there should not be excess space between the equation number and name.
  • The text should be able to be formatted in different font styles. Right now, I need to format it in \sf.

Here is a MWE (without the equation name):

\documentclass{article}
\usepackage{amsmath}

\numberwithin{equation}{section}

\begin{document}

\section{First Section}
\label{sec:section1}
\begin{equation}
\label{eqn:label}
    \boxed{M\approx\frac{\pi}{4}\left(\frac{2d}{\lambda_o}\right)^2\left(\mathrm{NA}\right)^2}
\end{equation}

Reference \eqref{eqn:label}.

\end{document}

Here is a snapshot example of what I'd like to achieve (taken from Saleh, 2007):
Equation with name under number

I have tried using the \tag command, but realized that this not only replaces the equation number, which I do not want, but also causes the equation number counter to skip that particular equation. Ideally, the equation should still function as a regular numbered equation, that can be number-referenced (via \eqref or other), but with the addition of some text below the equation number.

Any help will be much appreciated.

Best Answer

Here's an easy by using the starred version of \tag from amsmath:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\eqname}[1]{\tag*{#1}}% Tag equation with name
\begin{document}

\begin{align}
  f(x) &= a \\ \eqname{Constant} \\
  g(x) &= ax \\ \eqname{Linear} \\
  h(x) &= ax^2+bx+c \label{abc} \\ \eqname{Quadratic}
\end{align}
See~\eqref{abc}.
\end{document}

For consistency, I've wrapped \tag* inside \eqname.


Depending on your equation construction, you can adjust the vertical skip between the equation and the name:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\eqname}[1]{\tag*{#1}}% Tag equation with name
\begin{document}

\begin{align}
  \boxed{M \approx \frac{\pi}{4}\biggr(\frac{2d}{\lambda_0}\biggr)^2(\text{NA})^2} \label{abc} \\[-\baselineskip]
  \eqname{Number of TE Modes}
\end{align}
See~\eqref{abc}.
\end{document}

Here I've moved it up by \baselineskip, but you can adjust this to your liking.

Related Question