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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With