Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Changing the apperance of equation numbers with amsmath

I would like to move an equation number from its default position a little bit left.

(I learned to move an equation a little bit left from this site. But I could not locate any reference to move the equation number a little bit left. I searched this site with "move equation number".)

The following is the code that I am using.

\documentclass[12pt]{report}
\usepackage{graphicx}
\usepackage{amssymb}

\begin{document}
\begin{equation}
\hspace{-9cm}a_1+d_1=47
\end{equation}
\end{document}

Edited Question:

How can I align both equations and the equation numbers in the following code?

\documentclass{article}
\usepackage{amsmath}
\makeatletter

\def\mytagform#1{\maketag@@@{\bfseries(\ignorespaces#1\unskip\@@italiccorr)}\hspace{3cm}}
\def\print@eqnum{\mytagform\theequation}
\makeatother
\begin{document}
\begin{align}
\label{eq:eq1}
\hspace{-6cm}a_1+7d=47
\end{align}

\begin{align}
\label{eq2}
\hspace{-6cm}a_1+20d=112
\end{align}

\end{document}
share|improve this question
2  
Please, see the question I linked in my edit; it should have all the necessary information. If not, please be more specific in your question. –  egreg Sep 25 '11 at 21:03
    
@egreg Thank you. That reference is enough for me to move on. I do not understand how it works (yet) but I used your (new) align environment (instead of the equation environment) to get the desired effect. –  Sony Sep 25 '11 at 21:24
    
It's hard to understand the role of \hskip{-6cm} in that code. If you want "left aligned" equations, consider the fleqn option to amsmath. –  egreg Sep 25 '11 at 21:45
    
If you remove the \hspace{-6cm} the equation numbers will be aligned. –  Peter Grill Sep 25 '11 at 21:49
    
I wanted to move an equation few cms (say 6 cms) to left and then reduce the gap between the equation and the equation number by a different amount (say 3 cms). I still do not have a solution. However, as I mentioned, I am playing with Andrew Stacey's answer to the question referred by egreg. Thanks to everyone who made comments. I truly appreciate this site. –  Sony Sep 25 '11 at 22:28
show 2 more comments

marked as duplicate by egreg, Gonzalo Medina, Werner, lockstep, Andrew Stacey Sep 26 '11 at 7:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

A short answer to the edited question would be to use \mathrlap from the mathtools package, together with a \phantom to obtain the correct horizontal alignment:

\usepackage{mathtools}% http://ctan.org/pkg/mathtools
...
\hspace{-6cm}\mathrlap{a_1+7d=47}\phantom{a_1+20d=112}
...
\hspace{-6cm}a_1+20d=112

Correct alignment of equation numbers

Regardless, as @egreg suggests in his comment, using \hspace for horizontal movement to some (arbitrary?) length of -6cm seems a bit bizarre.

share|improve this answer
    
Thank you very much. I deleted the edited question" as I found a reasonable solution by using Andrew Stacey's solution to the question posted by egreg. But your solution seems much nice. Therefore, I retyped the edited question". Sorry. –  Sony Sep 25 '11 at 22:11
add comment

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