# How to move amsmath equation label into LHS margin?

I am using amsmath and I would like to move the equation label into the left hand side margin aligned with the top of the equation. I have looked through the documentation but I can't find anything on label position. Please could let me know how to do this, or even better where to find the information. Also if there is a reason that LaTeX does this as default then could let me know why.

As a small side question how do you get the label to say Eq(1.1) rather than (1.1)

EDIT(1):

Currently equation looks as following:

EDIT(2): Based on egregs advice used:

$$\begin{split} \text{P(consequence)} & = \text{P(hazard occuring)} \\& \times \text{P(exposure of agent|hazard occuring)} \\& \times \text{E(Damage|hazard and exposure)} \end{split}$$


To gain the following:

This looks much nicer, so last question is there any way to get the label in the equation to read Eq.2.2 or is there a good reason for why I shouldnt do this

• \usepackage[leqno]{amsmath}? – egreg Apr 24 '15 at 8:56
• @egreg so its on the LHS now, but do you know how to get it into the margin rather than in the text body? – PaulBarr Apr 24 '15 at 8:58
• \renewcommand{\theequation}{Eq(\thesection.\arabic{equation})} to get Eq(1.1) – Ambika Vanchinathan Apr 24 '15 at 9:11
• \eqref is for references, not for the direct equation number output at the equation. I thought you want to change the reference too. – user31729 Apr 24 '15 at 9:27
• Oh ok, I use cref so I think that does it automatically. Thanks! – PaulBarr Apr 24 '15 at 9:29

For adding Eq. use cleveref. For the equation numbers in the margin:

\documentclass[leqno]{article}
\usepackage{amsmath}
\usepackage{etoolbox}
\usepackage{lipsum}

\makeatletter
% detach \eqref processing from \tag processing
\let\tagform@ref\tagform@
\let\maketag@@@ref\maketag@@@
\patchcmd{\eqref}{\tagform@}{\tagform@ref}{}{}
\patchcmd{\tagform@ref}{\maketag@@@}{\maketag@@@ref}{}{}
% redefine \maketag@@@
\makeatother

\begin{document}

\lipsum*[2]
\begin{align}
X&=Y\\
Z+Z'&=W
\end{align}
\lipsum*[3]
$$\label{x} a+b=c$$
Now we cite equation \eqref{x} to see all's right.

\end{document}


However, I believe yours is an “XY question”. The example equation you show should be treated with split, not by pushing the number in the margin.

\documentclass[leqno]{article}
\usepackage[tbtags]{amsmath}
\usepackage{etoolbox}
\usepackage{cleveref}

\usepackage{lipsum} % this is just for mock text

\DeclareMathOperator{\prob}{P}
\DeclareMathOperator{\expec}{E}
\newcommand{\tevent}[1]{\textup{#1}}
\crefname{equation}{Eq.}{Eqs.}

\begin{document}

\lipsum*[2]
$$\label{x} \begin{split} \prob(\tevent{consequence})={} & \prob(\tevent{hazard occurring}) \\ & \times \prob(\tevent{exposure of agent}\mid\tevent{hazard occurring}) \\ & \times \expec(\tevent{damage}\mid\tevent{hazard and exposure}) \end{split}$$
Here we cite the equation: \cref{x}.
\end{document}


Here's a further version where Eq. is added also in the equation number. I'd never use this in a document; figures and tables are a different thing: “Figure” and “Table” are used in the caption as identifiers with respect to the object they refer to; for equations it's completely clear what the number is about.

\documentclass[leqno]{article}
\usepackage[tbtags]{amsmath}
\usepackage{etoolbox}
\usepackage{cleveref}

\usepackage{lipsum} % this is just for mock text

\makeatletter
% detach \eqref processing from \tag processing
\let\tagform@ref\tagform@
\let\maketag@@@ref\maketag@@@
\patchcmd{\eqref}{\tagform@}{\tagform@ref}{}{}
\patchcmd{\tagform@ref}{\maketag@@@}{\maketag@@@ref}{}{}
% redefine \tagform@
\def\tagform@#1{\maketag@@@{(Eq.\ \ignorespaces#1\unskip\@@italiccorr)}}
\makeatother

\DeclareMathOperator{\prob}{P}
\DeclareMathOperator{\expec}{E}
\newcommand{\tevent}[1]{\textup{#1}}
\crefname{equation}{Eq.}{Eqs.}

\begin{document}

\lipsum*[2]
$$\label{x} \begin{split} \prob(\tevent{consequence})={} & \prob(\tevent{hazard occurring}) \\ & \times \prob(\tevent{exposure of agent}\mid\tevent{hazard occurring}) \\ & \times \expec(\tevent{damage}\mid\tevent{hazard and exposure}) \end{split}$$
Here we cite the equation: \cref{x}.
\end{document}


• Thank you for your answer and explaining your reasoning for why things shouldn't be done. I am in the process of learning Latex hence I want to try out different things and learn from your code what you did. Its also much easier to learn what to do if you know why some things shouldnt be done. Cheers – PaulBarr Apr 24 '15 at 13:28