开发者

Two inequalities displaying side by side, but nicely spaced in 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 its开发者_如何学Goelf? Which environment should I use?


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.


For some space, just use \quad, \qquad or any other spacing command of your choice (maybe \hfill?).

I don't know about any environments to do this, the environments that come with the AMS packages are meant to align columns (so they're only useful if you have multiple lines).


You should use the amsmath package (for spacing options). The do the following:

\begin{equation}
a \leq b \qquad c \leq d
\end{equation}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜