# How can I put equation number both on the left and on the right?

I know \documentclass[leqno] will put equation number on the left.

I'd like the number to show twice : on the left and on the right

## Added to the original question

A basic MWE based on a suggestion in the comments, but it's not working. The equation numbers need to be the same.

\documentclass{article}
\usepackage[leqno]{amsmath}
\begin{document}
\begin{flalign}
&& E = mc^2 &&(\theequation)
\end{flalign}
\end{document}


• Use flalign and (\theequation). – John Kormylo May 10 '18 at 14:32

The follow example redefines the way the tag is set, adding it to both sides:

\documentclass{article}

\usepackage{amsmath,lipsum}

\makeatletter
\def\maketag@@@#1{%
\hbox {\m@th \normalfont #1}% Regular (right-hand tag)
\rlap{\hskip-\displaywidth \m@th \normalfont #1}% Left-hand tag
}
\makeatother

\begin{document}

\lipsum*[1]
$$E = mc^2$$
\lipsum*[2]
\begin{align}
f(x) &= ax^2 + bx + c \\
g(x) &= d
\end{align}
\lipsum[3]

\end{document}


The tag is set using \maketag@@@, which is updated to add the left-hand tag using a zero-width right overlap.