2

I am writing a report and I would like an equation number on the right hand side, but to label the equation with a word that would appear on the left hand side. However, when I do this using \tag{} in the align environment, it just replaces the equation number with tag. People have suggested using \leqno and this does put the tag on the left (as I want), but now it gets rid of the equation number and only shows the tag. Is there a way to have both?

This is some model code:

\documentclass{article}
\usepackage[leqno]{amsmath}
\newcommand{\leqnomode}{\tagsleft@true}

\begin{document}

\begin{align} \leqnomode
    n(r, t) = \int x dx \tag{Density}
\end{align}

\end{document}

1
  • Welcome to TeX.SE.
    – Mico
    Commented Feb 24, 2023 at 11:56

1 Answer 1

2

I suggest you employ an flalign environment, along the following lines.

enter image description here

\documentclass{article}
\usepackage{amsmath}   % for 'flalign' environment
\usepackage{showframe} % optional: draw frame lines around text block

\begin{document}

\begin{flalign} 
\text{Density} && n(r,t) &= \int x\,dx &&
\end{flalign}

\end{document}

With this solution, the equation (here: n(r,t) = \int x\,dx) is centered between the word "Density" on the far left and the equation number on the far right. If, alternatively, you want the equation to be centered horizontally on the entire line, irrespective of the length of the string that's printed on the far left, just change \text{Density} to \rlap{Density}.

You must log in to answer this question.

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