[texhax] Aligning enumeration labels
Lars Madsen
daleif at imf.au.dk
Wed Dec 14 09:44:36 CET 2005
bil at beeb.net :
> Hi,
> I'm trying to typeset something which requires an enumeration list,
> and some of the items in the list involve a couple of minipage
> environments (side by side). The first contains text, while the
> second is an \includegraphics command to display an eps image.
> It all works fine, except that the numeric label gets vertically
> centred, whereas it would look much better in line with the
> top line of the test in the minipage. Here's an extract of my code
>
> \item
> \begin{minipage}[l]{0.5\textwidth}
> The union of two disjoint spheres is {\em not} a
> closed surface (disconnected).
> \end{minipage}
> \begin{minipage}[l]{0.5\textwidth}
> \hspace*{0.3in}
> \includegraphics[width=1.5in,height=0.75in]{spheres.eps}
> \end{minipage}
>
> Can anyone suggest a suitable way to force either the label up or the text
> down (I tried \raisebox but that breaks the minipage and the text
> goes across the graphics image.
>
Some somments:
* l is not a valid option for minipage, som it gets ignored and 'c' i used
instead
* in the future it may be a better idea to post, as a minimal example
something that can be saved and compiled directly, see the example below,
where, e.g. I've used a \rule instead of a graphics, since I do not have
the graphics you're using.
Example
\documentclass{article}
\usepackage{calc}
\begin{document}
\begin{enumerate}
\item
\begin{minipage}[t]{0.5\linewidth}
The union of two disjoint spheres is emph{not} a
closed surface (disconnected).
\end{minipage}
\begin{minipage}[t]{0.5\linewidth}
\hspace*{0.3in}
\rule[-0.75in+\heightof{T}]{1.5in}{0.75in}
\end{minipage}
\end{enumerate}
\end{document}
I've used the 't' option to have everything aligned on the first baseline
in the two boxes, which also helps on the \item label.
And then i've droped the graphics the height of the graphics, and raised
it a bit afterwards.
You can get the same result using
\raisebox{-0.75in+\heightof{T}}{\rule{1.5in}{0.75in}}
Hope, this helps
--
/daleif
``You cannot help men permanently by doing for them
what they could and should do for themselves. ''
-- Abraham Lincoln
More information about the texhax
mailing list