2

How do I control the space between the equation number and the right margin in the align environment?

5
  • @Papiro It is not a duplicate. Sep 22, 2013 at 8:48
  • do you want the position of the equation number changed only for the align environment, or for all numbered displays? Sep 22, 2013 at 12:23
  • since you haven't said what the \gls{...} commands do (there is no example given, and i can't find any reference to that command in the companion), there's not enough information to give a meaningful answer to this question. perhaps it should be closed. regretfully downvoted. Sep 22, 2013 at 13:16
  • No problems. GLS are glossaries commands, When I asked the question, I hadn't identified them as the source. I'll try and submit a minimal reproduceable example later today. Cheers. Sep 22, 2013 at 19:27
  • @barbarabeeton I have posted a different question. tex.stackexchange.com/questions/134587/… Sep 22, 2013 at 21:11

1 Answer 1

5

A following example hacks into internals of align to add extra space that can be configured using \alignnumbersep:

\documentclass{article}
\usepackage{amsmath}

\newdimen\alignnumbersep
\setlength{\alignnumbersep}{10mm}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\math@cr@@@align@measure}
     {\df@tag\fi\fi}
     {\df@tag\fi\fi\kern\alignnumbersep}
     {}{}
\patchcmd{\math@cr@@@align}
    {\make@display@tag}
    {\make@display@tag\kern\alignnumbersep}
    {}{}
\makeatother

\begin{document}
\begin{gather}
  \text{gather}
\end{gather}

\begin{align}
  a&=b & c&=d\\
  aa&=bb & cc&=dd
\end{align}
\end{document}

Result

1
  • It turns out that whilst the trigger for my question was an unrelated matter (see tex.stackexchange.com/questions/134587/…), this question as it stands and what you have answered is something that I have wanted to know regardless, so I thank you for your answer. Sep 22, 2013 at 21:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.