ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco.hoekwater@wkap.nl>
Cc: mordor@fly.srk.fer.hr, ntg-context@let.uu.nl
Subject: Re: Itemize..
Date: Fri, 14 Jan 2000 14:39:58 +0000 (GMT)	[thread overview]
Message-ID: <14463.13630.819718.954298@PC709.wkap.nl> (raw)
In-Reply-To: <3.0.6.32.20000114115907.00a22100@pop.wxs.nl>

    >> 3. This one is related to tables: I have
    >> \starttable[|p(6cm)|M|].  In one row of the table (second
    >> column) I happen to have \eqalign with two rows. The top of the
    >> paragraph is aligned with the middle of \eqalign. How can I
    >> make the middled of the paragraph be aligned with the middle of
    >> eqalign (I'm talking about vertical centering)?

    Hans> Something for taco since it's math.

Not really math, more of a TaBlE omission. Try this code, which gives
you the new key P (just like p) for a vertically centered paragraph.

%%%%%%%%%%%%%%%%%%%%%%
\unprotect
\def\BeginTableParCBox#1{%
  $\displaystyle\m@th\vcenter\bgroup\vtop\bgroup
    \hsize=#1
    \normalbaselines
    \let~=\!ttTie
    \let\-=\!ttDH
    \the\EveryTableParBox}

\def\EndTableParCBox{%
    \MakeStrut{0pt}{\StrutDepthFactor\StrutUnit}
  \egroup\egroup$} % finishes the \vtop begun by \BeginTableParbox

\NewFormatKey P{%
  \!tgGetValue{\!tgSetUpParCBox}}

\def\!tgSetUpParCBox{%
  \edef\!ttemp{%
    \noexpand \ReadFormatKeys
    b{\noexpand \BeginTableParCBox{%
      \ifnum \!tgCode=1
        \ifx \!tgValue\empty
          \the\ColumnWidthFactor
        \else
          \!tgValue    % user-specified integer
        \fi
        \!taCWU        % \ColumnWidthUnit
      \else
        \!tgValue      % user-specified dimension
      \fi}}}%
  \!ttemp
  a{\EndTableParCBox}}

\protect
%%%%%%%%%%%%%%%%%%%%%%

[There is a similar problem for bottom aligned paragraphs (\vbot
 instead of \vtop), but I can't find a suitable key for that].

Or you could put the \eqalign in a parbox itself, I think, like this: 

\starttable[|p(6cm)|p(6cm)|]
\NC .. \NC $\displaystyle\eqalign{...}$\NC\NR
\stoptable

(in this case, they start on the same baseline).

Greetings, Taco


  reply	other threads:[~2000-01-14 14:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-14  7:54 Itemize Zeljko Vrba
2000-01-14 10:59 ` Itemize Hans Hagen
2000-01-14 14:39   ` Taco Hoekwater [this message]
2000-01-14 13:40     ` Itemize Hans Hagen
     [not found] <200201212013.VAA02170@smail.let.uu.nl>
2002-01-22 10:16 ` itemize Hans Hagen
2004-06-16 15:12 itemize, adobekb Thomas A.Schmitz
2004-06-18 17:03 ` itemize Patrick Gundlach
2004-06-19 17:14   ` itemize Willi Egger
2004-06-20  7:57     ` itemize Patrick Gundlach
2006-04-07 11:46 itemize Renaud AUBIN
2006-04-08 13:14 ` itemize Hans Hagen
2010-01-18 21:56 itemize Hans Hagen
2010-10-19  9:05 itemize Herbert Voss
2010-10-19  9:17 ` itemize luigi scarso
2010-10-19  9:27   ` itemize Hans Hagen
2010-10-19  9:38     ` itemize Herbert Voss
2010-10-19  9:40     ` itemize Khaled Hosny
2010-10-19  9:50       ` itemize Herbert Voss
2010-10-19 10:50     ` itemize Herbert Voss
2010-10-19 11:00       ` itemize luigi scarso
2010-10-19 11:10         ` itemize Herbert Voss
2010-10-19 11:16           ` itemize luigi scarso
2010-10-19 12:01       ` itemize Herbert Voss
2010-10-19 12:08         ` itemize Taco Hoekwater
2010-10-20  8:33 itemize Herbert Voss
2010-10-20  8:54 ` itemize Philipp Gesang
2010-10-20  8:59   ` itemize Herbert Voss
2011-12-18 18:18 itemize Aditya Mahajan
2011-12-18 21:21 ` itemize Hans Hagen
2013-03-04 12:52 itemize Meer, H. van der
2013-03-04 13:19 ` itemize Marco Patzer
2013-03-04 13:34   ` itemize Meer, H. van der
2013-03-04 14:06     ` itemize Marco Patzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14463.13630.819718.954298@PC709.wkap.nl \
    --to=taco.hoekwater@wkap.nl \
    --cc=mordor@fly.srk.fer.hr \
    --cc=ntg-context@let.uu.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).