0

I am trying to typeset a math paper in two column mode using the amsmath package (in fact, using mathtools), making equation numbers appear in the margins. To be clear: I want equations in the left column to have their equation number in the left margin, and equation in the right column to have their number in the right margin. So far, I have been able to make some progress with…

\makeatletter
\renewenvironment{equation}{%
  \refstepcounter{equation}
  \begin{equation*}%
}{%
  \end{equation*}%
  \marginpar{(\theequation)}
}
\makeatother

…but the number isn't centered on the equation, and the space between the number and the text block is not the same on both sides:

tag placement is wrong

Here is a minimum working example:

\documentclass[a4paper,twocolumn,oneside]{article}

\usepackage{amsmath,kantlipsum}

\begin{document}

\kant[2]
\begin{equation}
  y = \int_{-\infty}^{\infty} \exp(-x^2) \operatorname{d}x
\end{equation}
\kant[3-4]
\begin{equation}
  y = \int_{-\infty}^{\infty} \exp(-x^2) \operatorname{d}x
\end{equation}

\end{document}

I am not opposed to using other packages, but a simple solution would be best. Thanks for the help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.