ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Brian R. Landy" <landy@alumni.caltech.edu>
To: ntg-context@ntg.nl
Subject: Vertical text alignment in nested natural tables
Date: Wed, 28 Mar 2007 09:11:56 -0400	[thread overview]
Message-ID: <20070328091156.85kplgbcggcogwo8@serenity.landy.cx> (raw)

Hi,

I am having a problem using nested natural tables, to which I have a  
solution but feel that it my not be the proper approach.  I'm pretty  
much a TeX and ConTeXt novice.

The problem is that the row height it reduced when a table is nested,  
breaking vertical text alignment across cells.  In my example the  
cells "SSSSS" and "Swap" to not align vertically due to the presence  
of the "p".  I have an example of the problem and my fix below.

I'm curious if someone knows a better way to fix this.

Thanks for your help,
Brian



\starttext
Working table:\par
\start
\bTABLE[frame=on,align={middle,lohi}]
\bTR
\bTD SSSSS \eTD
\bTD Swap \eTD
\eTR
\eTABLE
\stop

Nested table changes cell height, breaks text alignment with "lohi":\par
\start
\bTABLE[frame=on,height=0.50in]
\bTR
\bTD
{\start
\bTABLE[frame=on,align={middle,lohi}]
\bTR
\bTD SSSSS \eTD
\bTD Swap \eTD
\eTR
\eTABLE
\stop}
\eTD
\eTR
\eTABLE
\stop

setting height to baselineskip does not help:\par
\start
\bTABLE[frame=on,height=0.50in]
\bTR
\bTD
{\start
\bTABLE[height=\the\baselineskip,frame=on,align={middle,lohi}]
\bTR
\bTD SSSSS \eTD
\bTD Swap \eTD
\eTR
\eTABLE
\stop}
\eTD
\eTR
\eTABLE
\stop

One fix is a strut:\par
\start
\bTABLE[frame=on,height=0.50in]
\bTR
\bTD
{\start
\bTABLE[frame=on,align={middle,lohi}]
\bTR
\bTD \strut{SSSSS} \eTD
\bTD \strut{Swap} \eTD
\eTR
\eTABLE
\stop}
\eTD
\eTR
\eTABLE
\stop
\stoptext

             reply	other threads:[~2007-03-28 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28 13:11 Brian R. Landy [this message]
2007-03-29  8:34 ` Wolfgang Schuster
2007-03-30  3:16   ` Brian R. Landy
2007-04-04 16:32     ` Wolfgang Schuster

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=20070328091156.85kplgbcggcogwo8@serenity.landy.cx \
    --to=landy@alumni.caltech.edu \
    --cc=ntg-context@ntg.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).