# [NTG-context] itemize and math

Wolfgang Werners-Lucchini wwl at musensturm.de
Tue Oct 30 22:20:54 CET 2007

> > > I have a problem with
> > > >
> > > > \startitemize[columns,a]
> > > > \item $a_n=2+\frac{1}{n+1}$
> > > > \item $a_n=\frac{(-1)^n}{\sqrt{n}}-3$
> > > > \stopitemize
> > > >
> >
> > > Hi,
> > >
> > > this did not wotk because the second formula is than the first
> and
> > -------------------------------------------------^ (what?)
> >
> > > the multicolumn OTR tries to put half or less of the text into
> the
> > > second column, you can now force a second column with the
> \column
> > > command after the first line or you switch both
> > > formulas and the OTR can make two columns.
> > >
> > > \starttext
> > >
> > > \startitemize[columns,a]
> > > \item $a_n=\frac{(-1)^n}{\sqrt{n}}-3$
> > > \item $a_n=2+\frac{1}{n+1}$
> > > \stopitemize
> >
> > Why is this working? Here the first column is as big as the
> second
> > above (same formula), so the same problem should arise with the
> first
> > column as above with the second?
>
>
> No, they are not, the first row (column) is 1 points taller than the
> second
> one, you can test this with TeX.
>
> \starttext
>
> \setbox\scratchbox\hbox{$a_n=\frac{(-1)^n}{\sqrt{n}}-3$}
>
> Formula 1: \copy\scratchbox
>
> Height of formula 1: \the\ht\scratchbox
>
> \setbox\scratchbox\hbox{$a_n=2+\frac{1}{n+1}$}
>
> Formula 2: \copy\scratchbox
>
> Height of formula 2: \the\ht\scratchbox

Ahhh! The HEIGHT (not the width) ist the problem!?

So:

\startcolumns
\dontleavehmode
\vphantom{$a_n=\frac{(-1)^n}{\sqrt{n}}-3$}$a_n=2+\frac{1}{n+1}$%

$a_n=\frac{(-1)^n}{\sqrt{n}}-3$
\stopcolumns

works too.

Is there something like an \mathstrut macro? (I know, that there
exists a macro with this name, but that uses ')' as height.)

> I hope my examples helped you a little bit to understand the
> problems in your example and why my methods worked.
>
> Wolfgang

Hope, I have it!

Thank you,

Wolfgang



More information about the ntg-context mailing list