vertical align of minipages in enumerate environment

I'm trying to align the top of two minipages in an enumerate environment,
where the second minipages contains an array in math mode. The brace
obtained by \left\{ does not have the right height and I'm not able to
align both  minipages. Here is a code sample (compiled with teTeX)

\documentclass[a4paper,10pt]{article}
\usepackage{enumerate}
\begin{document}
Text
\begin{enumerate}[\bf 1.]
\item \begin{minipage}[t]{0.5\linewidth}
Text
\end{minipage}
\hfill
\begin{minipage}[t]{0.5\linewidth} $
    \left\{
\begin{array}[t]{lcl}
   a &=& b\\
   c &=& d\\
   e &=& f\\
\end{array}\right.$
\end{minipage}
\item Deuxi\`eme items.
\end{enumerate}
\end{document}

Any suggestion would be appreciated

Regards
0
2/11/2006 12:08:55 AM
comp.text.tex 37968 articles. 1 followers. Post Follow

3 Replies
194 Views

Similar Articles

[PageSpeed] 28
pirouz djoharian wrote:
> I'm trying to align the top of two minipages in an enumerate environment,
> where the second minipages contains an array in math mode. The brace
> obtained by \left\{ does not have the right height and I'm not able to
> align both  minipages. Here is a code sample (compiled with teTeX)
> 
> \documentclass[a4paper,10pt]{article}
> \usepackage{enumerate}
> \begin{document}
> Text
> \begin{enumerate}[\bf 1.]
> \item \begin{minipage}[t]{0.5\linewidth}
> Text
> \end{minipage}
> \hfill
> \begin{minipage}[t]{0.5\linewidth} $
>     \left\{
> \begin{array}[t]{lcl}
>    a &=& b\\
>    c &=& d\\
>    e &=& f\\
> \end{array}\right.$
> \end{minipage}
> \item Deuxi\`eme items.
> \end{enumerate}
> \end{document}
> 
> Any suggestion would be appreciated

I have wrote a (very long) suggestion in fctt.  Why do you post in ctt 
and fctt at the same time?  Do you know that $\textrm{ctt} \cap 
\textrm{ctt} \neq \emptyset$ ?

Well. Read the answer in fctt and post the translation in ctt!

   Jean-C�me Charpentier
0
2/11/2006 11:16:05 AM
> $\textrm{ctt} \cap \textrm{ctt} \neq \emptyset$ ?

you're absolutely right ;-) It's not very empty

/daleif
0
daleif (791)
2/11/2006 12:04:33 PM
pirouz djoharian wrote:

> I'm trying to align the top of two minipages in an enumerate
> environment, where the second minipages contains an array in math
> mode. The brace obtained by \left\{ does not have the right height
> and I'm not able to align both  minipages. Here is a code sample
> (compiled with teTeX)
> 
> \documentclass[a4paper,10pt]{article}
> \usepackage{enumerate}
> \begin{document}
> Text
> \begin{enumerate}[\bf 1.]
> \item \begin{minipage}[t]{0.5\linewidth}
> Text
> \end{minipage}
> \hfill
> \begin{minipage}[t]{0.5\linewidth} $
>     \left\{
> \begin{array}[t]{lcl}
>    a &=& b\\
>    c &=& d\\
>    e &=& f\\
> \end{array}\right.$
> \end{minipage}
> \item Deuxi\`eme items.
> \end{enumerate}
> \end{document}
> 
> Any suggestion would be appreciated
> 
> Regards



The vertical alignment for minipages is not always very clear.
Sometimes it seems to behave a little strange, for more details see
e.g. LaTeX Companion. But in this case I think it behaves just as it is
supposed to. The problem is that inter-line math consists of an array
that makes it too high. Consider

Text text text text text text text text text text text text text text
text text text text text text text text text text text text text text
$\left\{
  \begin{array}{@{}l@{}c@{}l}
    a &=& b\\
    c &=& d\\
    e &=& f\\
  \end{array}\right.$
text text text text text text text text text text text text text text
text text text text text text text text text text text text text text

to see the problem that the baseline is approximately half a row below
the centre. That means that the second minipage aligns at the baseline
of the first row, as it is supposed to.

I see two ways of fixing it. The first starts the minipage with an
empty line and then moves back up:

\item \begin{minipage}[t]{0.5\linewidth}
    Text text text text text text text text text text text text text
    text text text text text text text text text text text text text
    text text text text text text text text text text text text text
    text text text text text text text text  
  \end{minipage}%
  \begin{minipage}[t]{0.5\linewidth}
    \strut\par\vspace*{-\baselineskip}
    $\left\{
      \begin{array}{@{}l@{}c@{}l}
        a &=& b\\
        c &=& d\\
        e &=& f\\
      \end{array}\right.$
  \end{minipage}


The second tries to fix the position of the minipage with use of
\raisebox. For this solution you also need the calc.sty:

\item \begin{minipage}[t]{0.5\linewidth}
    Text text text text text text text text text text text text text
    text text text text text text text text text text text text text
    text text text text text text text text text text text text text
    text text text text text text text text  
  \end{minipage}%
  \raisebox{0.5em-0.5\totalheight}{%
    \begin{minipage}[t]{0.5\linewidth}
      $\left\{
        \begin{array}{@{}l@{}c@{}l}
          a &=& b\\
          c &=& d\\
          e &=& f\\
        \end{array}\right.$
  \end{minipage}}


(Personally I like the second best)


/Stefan
 



-- 

0
2/15/2006 8:19:54 PM
Reply:
Similar artilces about - vertical align of minipages in enumerate environment: