From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34007 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Vertical text alignment in nested natural tables Date: Thu, 29 Mar 2007 10:34:26 +0200 Message-ID: <115224fb0703290134s34cc7a11icb9d4094cd1033cd@mail.gmail.com> References: <20070328091156.85kplgbcggcogwo8@serenity.landy.cx> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2042337893==" X-Trace: sea.gmane.org 1175157509 2192 80.91.229.12 (29 Mar 2007 08:38:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2007 08:38:29 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 29 10:38:23 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HWq9G-0003eL-Qn for gctc-ntg-context-518@m.gmane.org; Thu, 29 Mar 2007 10:38:22 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7946120402; Thu, 29 Mar 2007 10:38:22 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04360-03; Thu, 29 Mar 2007 10:38:21 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7A51520048; Thu, 29 Mar 2007 10:34:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 77FB020048 for ; Thu, 29 Mar 2007 10:34:30 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03794-02-9 for ; Thu, 29 Mar 2007 10:34:26 +0200 (CEST) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by ronja.ntg.nl (Postfix) with ESMTP id B892A1FF0F for ; Thu, 29 Mar 2007 10:34:26 +0200 (CEST) Original-Received: by nf-out-0910.google.com with SMTP id p77so104318nfc for ; Thu, 29 Mar 2007 01:34:26 -0700 (PDT) Original-Received: by 10.78.97.7 with SMTP id u7mr145133hub.1175157266431; Thu, 29 Mar 2007 01:34:26 -0700 (PDT) Original-Received: by 10.78.29.14 with HTTP; Thu, 29 Mar 2007 01:34:26 -0700 (PDT) In-Reply-To: <20070328091156.85kplgbcggcogwo8@serenity.landy.cx> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:34007 Archived-At: --===============2042337893== Content-Type: multipart/alternative; boundary="----=_Part_51266_4288010.1175157266341" ------=_Part_51266_4288010.1175157266341 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 2007/3/28, Brian R. Landy : > > 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 Hi Brian, I will show a few solution to your problem for the following table. We will start with a simple table that contains the error. \starttext \bTABLE \bTR \bTD {\bTABLE \bTR \bTD SSSS \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext Your own solution with adding a strut to the inner table can be done in a better way by adding the strut to the setup of the beginning of the table. \starttext \bTABLE \bTR \bTD {\bTABLE[left=\strut] \bTR \bTD SSSS \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext Another mothod is to use the same method, that is used for the outer table. I took a look into the source and found the following method, that works also. \starttext \bTABLE \bTR \bTD {\bTABLE[strut=yes,autostrut=no] \bTR \bTD SSSS \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext After that a was interested why we need to set the values in the last example again, because they are already set in core-ntb. The solution is, the values in nested tables are removed and replaced by new ones. This behaviour can be changed and is shown in my last example. \starttext \setfalse\resetTABLEmode \bTABLE \bTR \bTD {\bTABLE \bTR \bTD SSSS \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext Another example that shows the effect of \resetTABLEmode is: \starttext %\settrue\resetTABLEmode % default setting \setupTABLE[frame=off] \bTABLE \bTR \bTD {\bTABLE\bTR\bTD Text \eTD\eTR\eTABLE} \eTD \bTD Text \eTD \eTR \eTABLE \setfalse\resetTABLEmode \bTABLE \bTR \bTD {\bTABLE\bTR\bTD Text \eTD\eTR\eTABLE} \eTD \bTD Text \eTD \eTR \eTABLE \stoptext Wolfgang ------=_Part_51266_4288010.1175157266341 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

2007/3/28, Brian R. Landy <landy@alumni.caltech.edu>:
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

Hi Brian,

I will show a few solution to your problem for the following table.
We will start with a simple table that contains the error.

\starttext

\bTABLE
  \bTR
    \bTD
      {\bTABLE
      \bTR
        \bTD SSSS \eTD
        \bTD Swap \eTD
      \bTR
    \eTABLE}
    \bTD
  \eTR
\eTABLE

\stoptext


Your own solution with adding a strut to the inner table can be done
in a better way by adding the strut to the setup of the beginning of the table.

\starttext

\bTABLE
  \bTR
    \bTD
      {\bTABLE[left=\strut]
        \bTR
          \bTD SSSS \eTD
          \bTD Swap \eTD
        \bTR
      \eTABLE}
    \bTD
  \eTR
\eTABLE

\stoptext
 


Another mothod is to use the same method, that is used for the
outer table. I took a look into the source and found the following method,
that works also.

\starttext

\bTABLE
  \bTR
    \bTD
      {\bTABLE[strut=yes,autostrut=no]
         \bTR
           \bTD SSSS \eTD
           \bTD Swap \eTD
         \bTR
       \eTABLE}
    \bTD
  \eTR
\eTABLE

\stoptext


After that a was interested why we need to set the values in the
last example again, because they are already set in core-ntb.
The solution is, the values in nested tables are removed and replaced
by new ones. This behaviour can be changed and is shown in my last
example.

\starttext

\setfalse\resetTABLEmode

\bTABLE
  \bTR
    \bTD
      {\bTABLE
         \bTR
           \bTD SSSS \eTD
           \bTD Swap \eTD
         \bTR
       \eTABLE}
    \bTD
  \eTR
\eTABLE

\stoptext


Another example that shows the effect of \resetTABLEmode is:

\starttext

%\settrue\resetTABLEmode % default setting

\setupTABLE[frame=off]

\bTABLE
  \bTR
    \bTD
      {\bTABLE\bTR\bTD Text \eTD\eTR\eTABLE}
    \eTD
    \bTD
      Text
    \eTD
  \eTR
\eTABLE

\setfalse\resetTABLEmode

\bTABLE
  \bTR
    \bTD
      {\bTABLE\bTR\bTD Text \eTD\eTR\eTABLE}
    \eTD
    \bTD
      Text
    \eTD
  \eTR
\eTABLE

\stoptext


Wolfgang

------=_Part_51266_4288010.1175157266341-- --===============2042337893== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============2042337893==--