I want to display a set of inequalities to look like the code below
this is the lower bound
≤ this is the thing to be bounded
≤ this is the upper bound
My attempt to do this is the following:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
&\phantom{\leq} \text{this is the lower bound} \\
& \leq \text{this is the thing to be bounded} \\
& \leq \text{this is the upper bound}
\end{align*}
\end{document}
Unfortunately, in the output, the first line is not quite aligned with the second and third lines, it starts a little bit earlier than desired.
I have two questions:
- Why doesn't the
\phantom
command do what I think it is supposed to? - How do I get the desired output?
Best Answer
To get the proper alignment using the
\phantom
method, you need to write\phantom{{}\leq{}}
rather than just\phantom{\leq}
. Providing the empty "math atoms",{}
, around\leq
informs TeX that it should treat\leq
as an object of typemathrel
("relational operator") rather than of typemathord
("ordinary math item").You can also get the desired alignment without a
\phantom
. Just (i) place the alignment symbol (&
) immediately before the\text{...}
instructions on all three lines and (ii) insert{}
between\leq
and&\text{...}
on lines 2 and 3.