ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Vertically center text in a table
@ 2001-01-27 13:23 Wouter Verheijen
  2001-01-28 18:56 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Wouter Verheijen @ 2001-01-27 13:23 UTC (permalink / raw)


Hi,

I have a simple table, like this:
\starttabel[|r|r|r|r|]
		\HL
		\VL	90$\graden$ \VL	\hoeka \VL 12 \VL   3,4 \VL\FR
		\VL	75$\graden$ \VL	\hoekb \VL \VL 10 \VL   3,1 \VL\MR

The \hoeka and \hoekb are pictures, defined earlier.
This gives two problems:
- The other text in a row is located at the baseline. I want it to be
  centered (vertically) in each cell. (because the row gets much
  higher because of the picture)
- The first picture is located a bit too high, and overlaps with the
  upper \HL.

Thanks for your help!

-- 
Wouter Verheijen 			<wouter.verheijen@worldmail.nl>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Vertically center text in a table
  2001-01-27 13:23 Vertically center text in a table Wouter Verheijen
@ 2001-01-28 18:56 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2001-01-28 18:56 UTC (permalink / raw)
  Cc: conTeXt

At 02:23 PM 1/27/01 +0100, Wouter Verheijen wrote:
>Hi,
>
>I have a simple table, like this:
>\starttabel[|r|r|r|r|]
>		\HL
>		\VL	90$\graden$ \VL	\hoeka \VL 12 \VL   3,4 \VL\FR
>		\VL	75$\graden$ \VL	\hoekb \VL \VL 10 \VL   3,1 \VL\MR

There is one \VL too much so that will give a funny table 

>The \hoeka and \hoekb are pictures, defined earlier.
>This gives two problems:
>- The other text in a row is located at the baseline. I want it to be
>  centered (vertically) in each cell. (because the row gets much
>  higher because of the picture)
>- The first picture is located a bit too high, and overlaps with the
>  upper \HL.

% output=pdftex

\starttekst

\def\halfwaybox%
  {\dowithnextbox
     {\dp\nextbox=0pt
      \setbox\nextbox=\hbox{\lower.5\ht\nextbox\box\nextbox}%
      \box\nextbox}
   \hbox}

\starttabel[|r|r|r|r|]
\HL
\VL 90$\graden$ \VL \halfwaybox{\externalfigure[koe]} \VL 12 \VL 3,4 \VL\AR
\HL
\VL 75$\graden$ \VL \halfwaybox{\externalfigure[koe]} \VL 10 \VL 3,1 \VL\AR
\HL
\stoptabel

\stoptekst

I'll add \halfway to the supp-box file. 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-01-28 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-27 13:23 Vertically center text in a table Wouter Verheijen
2001-01-28 18:56 ` Hans Hagen

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).