COMPGROUPS.NET | Post | Groups | Users | Stream | Browse | About | |

### vertical align of minipages in enumerate environment

• Email
• Follow

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
Reply 2/11/2006 12:08:55 AM

See related articles to this posting

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
Reply 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
Reply 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
Reply stefan.host1 (15) 2/15/2006 8:19:54 PM
 comp.text.tex 36671 articles. 70 followers.

3 Replies
94 Views

Similar Articles

[PageSpeed] 33

• Email
• Follow

Similar Artilces:

vertical alignment of punctuation in the align environment
Hi everyone, Suppose I have the code given below which produces a bulky equation/(multiline)-system. If I terminate it with the period naively (as shown), the period will appear in the middle equation rather than at the bottom of it. How can I make the period to be correctly positioned to terminate this equation? Thanks a lot! \\---------------------------------------------------------------------------------------- \begin{align} \matc{ \sum_{k=1}^{N} \frac{\partial^2 \rho}{\partial \epsilon_{k}^2}\frac{\partial \epsilon_{k}}{\partial \theta_{1}}\frac{\partial \eps...

Vertically aligning math environments
How do I get math environments to vertically align at their tops instead of their middles? Example of what I'm trying to fix: \begin{align} x & = \begin{split} a + b + c \\ d + e + \begin{split} f + g + h \\ i + j + k \end{split} \end{split} \end{align} This should become: x = a + b + c d + e + f + g + h i + j + k Thanks in advance. YZ wrote: > How do I get math environments to vertically align at their tops instead > of their middles? Example of what I'm trying to fix: \documentclass[12pt]{artic...

vertical alignment in tabular environment
I've been attempting to figure out a way to middle vertically align the contents of a table cell under LaTeX. I read somewhere, and can't find it again, that you could define the column formatting with m{width} as opposed to p{width} and it would middle align vertically (much like HTML valign="middle"). I've tried this with a recent teTeX distribution and can't coerce LaTeX into recognizing it as a valid command. Does anyone know if this is a valid column definition? Does it only exist in some distributions? Any other useful techniques for controlling vertical alignm...

Vertical alignment of minipages in foils.
Hi, one one foil page I have two minipages, one containing the figure and one containing text with comments to the figure. Currently I am using fixed widths of the minipages, (It would be nice to have \textwidth/2 but I don't know how to get that.) and the text is somehow centered vertically because I don't know how to get two minipages top aligned. I would be happy for any advice. \documentclass[a4paper,dvips,landscape,17pt]{foils} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{graphicx} \usepackage{url} %% This proc needs \usepackag...

Vertical alignment in tabular environment #2
Hi, I am trying to typeset according to a spec, which unfortunately is quite long and complicated. I've done nearly all of it, but two things are not quite right, but they seem simple. A (*) will indicate a symbol that looks similar to an asterisk, and a (^) will indicate a symbol that looks like a tick. What they want is this (except heaps of them): PARACETAMOL Tab 25 mg ..............................3.80 24 (^)Panadol Another formulation that doesn't wrap ..2.80 24 Short Name (*) Tab 50 mg -- pepperment flavour, extra strength, suckable .....................

align environment within enumerate enrironment
The following code results in vertical space between the enumerate item number and the maths, which I would like to remove. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{enumerate} \item \begin{flalign*} a + b & = c & \\ d + e & = f \end{flalign*} \end{enumerate} \end{document} The following code (from this google group) removes the unwanted white space. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{enumerate} \item \hfill \vspace{-\abovedisplayskip} \vspace{-\baselineskip} \begin{flalign*} a + b &= c...

increase vertical spacing in align* environment
In the Latex \begin{align*} ... \end{align*} environment, I wish to increase slightly the vertical space between equations, because the equations in question involve binomial coefficients and large fractions, and are too crowded. If I put 4 backslashes \\\\ after each equation, I get too much vertical space. I have tried putting \addtolength{\belowdisplayskip}{5mm} in the preamble or in the same frame (I am using beamer), but this had no effect. I also tried \renewcommand{\arraystretch}{2.0}, but this had no effect either. Is there some way to change--preferably temporarily--the param...

Aligning custom tags in enumerate environment
If I use customs tags in an enumerate environment, the items are aligned but the tags are not. I would like to align both of them. Is there is a relatively easy way of doing this? For example, using \begin{enumerate} \item[Rule 1] Blah \item[Rule 2a] Blah \end{enumerate} produces the formatting Rule 1 Blah Rule 2a Blah. I would like the formatting to be Rule 1 Blah Rule 2a Blah. Thanks for any help. ...

Vertical alignment in tabular environment #3
I want to display two listings side by side with an equivalence sign between the two. I've figured this much: \documentclass{article} \begin{document} \begin{tabular}{lcl} \begin{minipage}[t]{0.4\linewidth} \begin{verbatim} my $ra;$ra->[2] = 'foo'; \end{verbatim} \end{minipage} & $\Leftrightarrow$ & \begin{minipage}[t]{0.4\linewidth} \begin{verbatim} my $ra;$ra->[2] = 'foo'; \$ra->[2] = 'foo'; \end{verbatim} \end{minipage} \end{tabular} \end{document} ....but I'd like to center the \Leftrightarrow. How can I do this? Thanks. --...

Vertical and horizontal alignment of minipages with tabular
I have two separate but related questions. I want to use the minipage environment within a tabular environment so as to create columns of different widths as it were on the same page. The first question has to do with vertical spacing. I want the both minipages to be at the top of a given row even if they are of different heights. By default the minipage with less material gets centered. No matter how I mess around with p, t, m, and b in both tabular and the minipages, I cannot get them both at the top unless I do so explicitly as in the second example below. The second question has to ...

Problems with vertical align of an image in the tabular environment
Hi! Here is the table that I use (pdflatex): \begin{table}[ht] \centering \setlength{\extrarowheight}{5pt} \begin{tabular}{|c|c|p{8cm}|} \hline \BLAH1 & BLAH2 & BLAH3\\ \hline \raisebox{-0.5\height}{\includegraphics{Image}}} & Blah & Blah\\\hline \end{tabular} \caption{3 Blahs} \end{table} The problem is that the Image is not moved below the hline and it actually covers a part of it. neither \extrarowheight{} nor \raisebox{} move the image, it's always in the top part of the cell, covering a little part of the line. The text looks just fine.. Does anyone ...

vertical text alignment across a row in tabular environment
Synopsis: --------- I need help aligning text of each cell across a row to the bottom of that row. Elaboration: ------------ (best viewed in fixed-length font) Consider the following CME: \documentclass{paper} \begin{document} \begin{tabular}{p{2cm}l} selected item name & description \\\hline rope & a long flexible object made of intertwined threads\\ \end{tabular} \end{document} it will produce the following output: selected item description name ----------------------------------------------------------------- rope a long flexible object made of intertwi...

is there away to vertically center a single equation number in a non-aligned environment?
I know about AMS's split environment and want its equivalent but without requiring alignment -- a sort of gather environment but with only one equation number vertically centered. Easy for odd number of equal height lines but not so easy in general. Any suggestions? ds On Aug 12, 12:24=A0pm, Dave94705 <david.jobman.schwa...@gmail.com> wrote: > I know about AMS's split environment and want its equivalent but > without requiring alignment -- a sort of gather environment but with > only one equation number vertically centered. =A0Easy for odd number of > e...

align on the right on an align environment possible?
hi all! i have this situation: i have a few long equations that i want aligned, as below: A = ............ A' = ............+ +.............+ -..........+ =.............. =>A'=.........+ +...... Not all of them are more than one line, *and* some of the ones that are 2 lines long have a shorter second part (as in the last line) I need that second part (line 4 and last one) to be shoved to the right, but as I understand, I can't use a multline environment multiple times, as I will lose the alignment around the equal sign. Any...

Aligning already aligned math formulas in tabular environment
Hi all, I have a quick question about table alignment. I currently have a table that has a single set of equations in it, inside an align* environment. I use the '&' of the align* environment to make sure the equations are aligned: \begin{table} \begin{align*} A &= B\\ C &= D\\ .... \end{align*} \end{table} ...etc. I'd like to instead use the tabular environment to break into two sets of equations, side-by-side (two column table). I tried the following: \begin{table} \begin{tabular}{cc} \begin{align*} A &= B\\ C &= D\\ \end{align*} & \begin{align*} E ...

figure environment inside an enumerate environment messes up indentation of the items
I would like to have figures side by side with text. I achieve this with minipages, one of which contains the text, the other the figure. The text is part of a longer enumerate environment. I want enumeration and indentation to be kept properly. But if I want to give the figure a caption, I need to put it inside a figure environment, which in turn I am not allowed to put inside the minipage. So I would have to include the entire enumration environment in the figure environment, which makes placement of a huge figure nearly impossible. Any help is appreciated! abrose@math.ucla.edu wro...

Vertical alignment
Hello, In the minimal example below, I would like that the text between the two \hline commands are vertically centered. But the code below does not do that. The text appears closer to the upper hline. I would like that the text is exactly centered between the hlines. Why "m{width}" does not help me? Thanks in advance. \documentclass{beamer} \usetheme{Frankfurt} \usepackage{array} \begin{document} \frame { \begin{tabular}{ m{2cm} *{11}{m{0.5cm}} } \hline Age & 62 & 63 & 64 & 65 & 66 & 67 & 68 & 69 & 70 & 71 & 72 \\ \hline \end{...

vertical alignment
I am trying move the stacked green blocks, so that they of lower down, semi-covering the black bar. I want the two boxes to be stacked how they are (although it doesn't matter which of the two blocks is at the top - the light or dark green). The current code is here:- http://www.bytronic.com/tests/test4.html Note, I want to modify only the last two styles (if possible), as the previous ones are used for other graphs that behaved slightly differently. Otherwise, I will have to make more classes like barType2 etc. to cover this graph. Thanks, Martin -- Martin ...

vertical-align...
hi, how do I get text to vertical-align inside a div? http://www.mayacove.com/misc/home.html vertical-align should work, according to this: http://htmlhelp.com/reference/css/text/vertical-align.html but it isn't.... thank you very much.. maya wrote: > hi, > > how do I get text to vertical-align inside a div? > > http://www.mayacove.com/misc/home.html > > > vertical-align should work, according to this: > http://htmlhelp.com/reference/css/text/vertical-align.html > > but it isn't.... > > > t...

Vertical align
In HTML 4 Strict, the elements COL, TBODY, TD, TH, TR can have the attribute valign. Therefore, I assumed that I could also use the property vertical-align with them. In http://www.w3.org/TR/CSS2/sample.html , I read td, th, tr { vertical-align: inherit } But Opera ignores TR { vertical-align ... } altogether whereas Firefox and Internet Explorer inherit the value to TD and TH. http://www.user.uni-hannover.de/nhtcapri/temp-4.html -- In memoriam Alan J. Flavell http://www.alanflavell.org.uk/charset/ Andreas Prilop wrote: > In HTML 4 Strict, the elements COL, TBOD...

vertical-align
I'm making a site about Java(programming language). The problem is that I worked with layers(div). I wanted to make a title in 1 of these layers and ceter this vertically. But this doesn't look to work. This is how I did it: <html> <head> <title>De programmeertaal Java</title> <style> h1 {font-size:50; font-family:Times New Roman; text-align:center;} </style> </head> <body> <div id="logo" style="position:absolute; visibility:inherit; width:250px; height:250px; left:5; top:5; z-index:4; background-ima...

Vertical Space in Minipages
Whats the deal with vertical spaces in minipages? When I use stuff like \vspace{\stretch{1}} in a minipage, it seems to be doing its calculations relative to the height of the whole page, not just the minipage (even when I specify the height of the minipage when I construct it). Also \flushbottom doesnt seem to work in minipages. Can anyone explain or send a url? I am trying to do things like define minipages of fixed heights, vertically center stuff inside them, etc. For example I had hoped that the following would give me a minipage that is half the height of the page, which contains two m...

Text vertical alignment
Hello I'm trying to rotate some text using the updir and baseline settings but nothing seems to be happening. I've tried plenty of different perpendicular (and non-perpendicular) vectors but there doesn't seem to be any change whatsoever in the orientation of the text., so I was wondering if anyone here could spot the problem with it? The point is to have a piece of text vertical along the side of a printed page with an identifier number on. I tried doing it using an IDLgraxis and that worked, but it put the index number closer to the plot than the proper axis label (whi...

Vertical figure alignment.
I need to include two figures in one, but not in the way that everybody else (googling reveals) wants to... One *.pdf contains a figure. Another contains the color key. I want them side by side, jointly centered on the page, with one centered caption... \begin{figure}[htbp] \begin{center} \includegraphics{key} \includegraphics{plot} \caption{Plot with key.} \end{center} \end{figure} This works, except the baseline of the two figures are aligned. Instead, I would like the tops of the files to be aligned. I think it can be done with a surrounding box, and then maybe a \vspace{\stretch} und...