# Spacing and alignment in equations

I didn't find a solution about how to add units to equations.

I have my code

$$\eta = \frac{\Phi}{P} [lm \cdot W^{-1}] \label{eq:mv}$$


which is centered by default. I need this:

1. Add some wide space (about 2 or 3 centimeters) between \eta = \frac{\Phi}{P} and [lm \cdot W^{-1}].
2. Keep the alignment for the first part only \eta = \frac{\Phi}{P} so this would be centered and the other part would be right to it.

Can you give me a hint, please?

-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Nov 21 '13 at 15:42

As far as I understand:

\documentclass{article}

\begin{document}

You have:

$$\eta = \frac{\Phi}{P} [lm \cdot W^{-1}] \label{eq:mv}$$

You want:

$$\eta = \frac{\Phi}{P} \makebox[0pt][l]{\hspace{3cm} [\mathrm{lm} \cdot \mathrm{W}^{-1}]} \label{eq:mv}$$

\end{document}


Please observe that units are typeset in normal font, not the math one.

An alternative way of aligning is the option fleqn, changing centering of equations to common indentation of them.

-

You can also try this, slightly different, using the mathtools package (and SIunitx for units):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[showframe]{geometry}
\usepackage{mathtools}
\usepackage{siunitx}

\begin{document}%
You have:

$$\eta = \frac{\Phi}{P} [lm \cdot W^{-1}] \label{eq:mv}$$

You want:

\begin{align}
\hspace{1in} \eta & = \frac{\Phi}{P} \hspace{1in} \mathllap{[\si{\lumen\watt^{-1}]}}
\label{eq:mv}
\end{align}

\end{document}


which gives this:

-
It's easier with \mathrlap{\hspace{.5in}(\si{\lumen\watt^{-1}})} and no \hspace{1in} at the left. Do you see why? The units should go in parentheses rather than in brackets, I believe. – egreg Nov 21 '13 at 20:46
Oh yes! My solution makes a gap of 1in minus the width of the unit – in the present case more or less ½in. – Bernard Nov 21 '13 at 22:52