# How to align equations with the inequality sign separated from the right-hand-side math material?

I do

\newcommand{\va}[1]{\left | #1 \right |}

[...]

\begin{align*}
& \va{\crochets{\frac{-\cos(nt)}{n}\cdot \frac{1}{e^t-1}}_{\varepsilon}^A} \\
\leq  &\frac{1}{n} \cdot \left (
\frac{\va{\cos(A)}}{e^A -1}
+ \frac{\va{\cos(\varepsilon)}}{e^\varepsilon -1}
\right )\\
\leq & \frac{1}{n} \cdot \left (
\frac{1}{e^A -1}
+ \frac{1}{e^\varepsilon -1}
\right )\\
\leq & \frac{1}{n} \cdot \left (
\frac{2}{e^\varepsilon -1}
\right ).
\end{align*}


and I get

How could I improve the layout of the equations? I would like the \leq sign to be a little bit more separated from the equations.

• There are a lot of control sequences (e.g. \va) which are provided by specific packages. It would really help if you included a preamble so that we don't have to work out where they come from ourselves :) \crochets is completely new to me. I assume \va is from the physics package? Or have you defined these commands yourself? – Au101 Dec 3 '15 at 2:38
• why not add spaces (\ ) ? – A.G. Dec 3 '15 at 5:11
• You might want to have a look at \MoveEqLeft from the mathtools  package, that is my goto tool for this kind of stuff. – daleif Dec 3 '15 at 7:39

This is just an addition to AU101s answer using mathtools and \MoveEqleft. The idea is to use a recommendation from a pamphlet from the AMS that instructs users to align on the left and indent subsequent lines by 2em. This does the opposite, aligns at the relation and pulls back the first line by 2em.

\documentclass[a4paper]{article}
\usepackage{mathtools}
\DeclarePairedDelimiter\abs\lvert\rvert
\begin{document}
\begin{align*}
\MoveEqLeft \abs*{\left[\frac{-\cos(nt)}{n} \cdot \frac{1}{e^{t} -
1}\right]_{\varepsilon}^A}
\\
& \leq \frac{1}{n} \cdot
\left(\frac{\abs{\cos(A)}}{e^{A} - 1} +
\frac{\abs{\cos(\varepsilon)}}{e^\varepsilon-1}\right)
\\
& \leq \frac{1}{n} \cdot \left(\frac{1}{e^{A} -1 } +
\frac{1}{e^{\varepsilon} - 1}\right)
\\
& \leq \frac{1}{n} \cdot \left(\frac{2}{e^{\varepsilon} - 1}\right).
\end{align*}
\end{document}


I recommend (sorry I used naive commands instead of \va, \crochets, etc. because I'm more familiar with them):

\begin{align*}
\left|\left[\frac{-\cos(nt)}{n} \cdot
\frac{1}{e^{t} - 1}\right]_{\varepsilon}^A\right|
& \leq \frac{1}{n} \cdot \left(\frac{|\cos(A)|}{e^{A} - 1} +
\frac{|\cos(\varepsilon)|}{e^\varepsilon-1}\right) \\
& \leq \frac{1}{n} \cdot \left(\frac{1}{e^{A} -1 } +
\frac{1}{e^{\varepsilon} - 1}\right) \\
& \leq \frac{1}{n} \cdot \left(\frac{2}{e^{\varepsilon} -
1}\right).
\end{align*}


This aligns all of the \leqs vertically and is generally the expected behaviour. You are aligning what comes after the \leqs, which destroys the ability to see \leq as a binary operator.

More generally, unless you come from a very different mathematical culture to mine, you should never have the Left Hand Side of an equation/inequality on its own line and then a line break. You have a = b (or < or > or whatever) and then your new line. This, certainly, is the type of layout the align environment was designed for.

• Yes you are right but I don't have enough horizontal space... – Colas Dec 3 '15 at 4:22

You should interchange the order of & and \leq. If horizontal space is at a premium, I would also get rid of the \cdot directives.

\documentclass{article}
\usepackage{mathtools} % for "\DeclarePairedDelimiter" macro
\DeclarePairedDelimiter\abs\lvert\rvert
\begin{document}
\begin{align*}
& \abs*{\left[\frac{-\cos(nt)}{n}\cdot \frac{1}{e^t-1}\right]_{\varepsilon}^A} \\
&\leq  \frac{1}{n} \left (
\frac{\abs{\cos(A)}}{e^A -1}
+ \frac{\abs{\cos(\varepsilon)}}{e^\varepsilon -1}
\right )\\
&\leq   \frac{1}{n} \left (
\frac{1}{e^A -1}
+ \frac{1}{e^\varepsilon -1}
\right )\\
&\leq   \frac{1}{n} \left (
\frac{2}{e^\varepsilon -1}
\right ).
\end{align*}
\end{document}


Addendum: The code above deliberately produces a very compact look, as I gather from your comment on @Au101's answer that horizontal space is quite limited. If you have a bit of horizontal space to spare, you could take up the comment made by @egreg (see below) and insert \quad between & and \leq on lines 2, 3, and 4, to provide at least a hint of horizontal offset.

• Consider adding a quad at the left of the lines after the first. – egreg Dec 3 '15 at 7:44

You can simply use \hspace{-...} before \leq signs and \hspace{...} after \leq signs. But it is probably too simple to fulfil your requirements. :)

• Well, I think it is better to use &, because with that you get the marked character with & to be one over the other. Or can you please show a complete code how your suggestion can work? – Kurt Dec 3 '15 at 3:50

My solution is to add \quad and to change the position of & after the \leq

\documentclass[a4paper]{article}
\usepackage{mathtools}
\DeclarePairedDelimiter\abs\lvert\rvert
\begin{document}
\begin{align*}
& \abs*{\left[\frac{-\cos(nt)}{n} \cdot \frac{1}{e^{t} -
1}\right]_{\varepsilon}^A}
\\[2mm]

• It should be \le{}& if you really want this; \quad` is too much. – egreg Dec 3 '15 at 18:23