Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two inequalities displaying side by side, but nicely spaced in LaTeX

Tags:

latex

In LaTeX, I have two ineqaulites e.g. a \leq b and c \leq d. I want to have a numbered line which has both of these inequalities on it:

a \leq b      c \leq d     (1)

Like this. What's the easiest way to get the spacing to behave itself? Which environment should I use?

like image 350
Seamus Avatar asked Jan 28 '10 14:01

Seamus


People also ask

How do you write two equations on the same line in LaTeX?

Insert a double backslash to set a point for the equation to be broken. The first part will be aligned to the left and the second part will be displayed in the next line and aligned to the right.


1 Answers

The answer is, of course, to use the amsmath package. A perhaps less-known feature of the align environment is to place equations side-by-side, exactly as you are trying to do:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
a &\leq b   &   c &\leq d     
\end{align}
\end{document}

And if you add multiple lines they'll look good:

\begin{align}
a &\leq b   &   c &\leq d  \\   
a+1 &\leq b+1   &   c+1 &\leq d+1     
\end{align}

Which is the whole reason, really, for not using \quad and other manual spacing commands.

like image 72
Will Robertson Avatar answered Sep 29 '22 10:09

Will Robertson