# Aligning tags at the end of the line

Is there any special reason why using the $$ won't produce the tags, like it does using  ? \documentclass[12pt]{article} \usepackage{mathtools} \usepackage{amsmath} \begin{document} $\lim_{\begin{smallmatrix} \,x\to 0& \\ \,x>0 \end{smallmatrix}} f(x) \tag{1}$$$\lim_{\begin{smallmatrix} \,x\to 0& \\ \,x>0 \end{smallmatrix}} f(x) \tag{1}$$\end{document}  I am used to write equations using the dolar signs. Is there an alternative way to produce those tags at the end of the line using the dolars sign? • You should not use $$ ... $$, tex.stackexchange.com/q/503/121799 – user121799 Feb 9 '19 at 23:01 • Oh really? But for an entire year I have used them on MSE. Feb 9 '19 at 23:02 • Yes Math Stack Exchange (=MSE ?) uses MathJax, and not LaTeX. Even though they share some elements, MathJaX \ne LaTeX. It is OK to use $$ on MSE, but not in LaTeX documents.
– user121799
Feb 9 '19 at 23:03
• Reading your question I am wondering: you do know that if you just use $$...$$ you will get a referencable equation number and you do not have to use \tag, do you? So the standard application will be, say, $$E=mc^2\label{eq:Einstein}$$ In \eqref{eq:Einstein} the relativistic \dots.
– user121799
Feb 9 '19 at 23:06
• Glad to hear. ;-) \tag{...} really is the exception, you work with equation, align and so on environments and get the equation numbers for free. If you load hyperref (as the last package usually) you will get hyperlinks in your pdf.
– user121799
Feb 9 '19 at 23:11

Here I have put any examples with the use of the \tag.

\documentclass[12pt]{article}
\usepackage{mathtools}

\begin{document}
\begin{equation*}
\lim_{\begin{smallmatrix} \,x\to 0& \\ \,x>0 \end{smallmatrix}} f(x) \tag{abc}
\end{equation*}

\begin{equation*}
\lim_{\begin{smallmatrix} \,x\to 0& \\ \,x>0 \end{smallmatrix}} f(x) \tag{1}
\end{equation*}

\begin{equation*}
\lim_{\begin{smallmatrix} \,x\to 0& \\ \,x>0 \end{smallmatrix}} f(x) \tag{bhj}
\end{equation*}
\end{document}