1

Is there a way to control where the equation number is placed? I mean absolute position (where coordinates or something like that may be used), not just place it on the right side or left side of equation.

To avoid misunderstanding, let picture do the work.enter image description here

  • Anything can be customized. It depends on the packages you're using how the customization must be implemented, though. I'd just change around some spacing commands by patching the latex.ltx \equation command inside the document (don't change latex.ltx) – 1010011010 May 23 '15 at 15:10
  • 1
    Welcome to TeX.SX! Can you describe a couple of examples of what you mean? – egreg May 23 '15 at 15:19
4

The automatic numbering of equations has options to put the equation number to the left or right (default). If you want to place the equation number independent from the equation, then there are ways:

A new equation number is assigned by

\refstepcounter{equation}
\label{<label>}% optional

The equation is then set unnumbered, e.g., \[ + \], environment displaymath, star forms (package amsmath) like gather*, align*. Or an equation can be simulated by inline math, e.g.:

$\displaystyle E=mc^2$

Right after \refstepcounter{equation}, the equation number is available as:

  • (\theequation) without using formatting commands and manually added parentheses,
  • \@eqnnum: LaTeX's command for printing the equation number, or
  • \print@eqnum: Macro of package amsmath for printing the equation number.

The latter commands need the pair \makeatletter and \makeatother.

If the \label was set, then the equation number is available anywhere in the document body by:

  • \eqref{<label>}: Referencing command of package amsmath.
  • (\ref{<label>}): LaTeX base.

The equation number can then be placed independently of the equation anywhere you like.

  • 2
    amsmath does have the options tbtags (top-left or bottom-right, default) and centertags (for multi-line sub-formulas), but they don't provide "fine" adjustments. also, if the tag is shifted outside the scope of a multi-line display because the widest line doesn't have room for it, there is a command \raisetag (texdoc amsmath, p.6) that permits adjustment if another line does actually have room; unfortunately, this adjustment isn't available if the tag fits "according to the rules". – barbara beeton May 23 '15 at 15:44

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.