ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: ntg-context@ntg.nl
Subject: Re: Vertical text alignment in nested natural tables
Date: Wed, 4 Apr 2007 18:32:21 +0200	[thread overview]
Message-ID: <20070404183221.f4c8addd.schuster.wolfgang@googlemail.com> (raw)
In-Reply-To: <C29DD35D-1DBC-488F-9DE6-BDA1652825FC@alumni.caltech.edu>

On Thu, 29 Mar 2007 23:16:43 -0400
"Brian R. Landy" <landy@alumni.caltech.edu> wrote:

> I had played around with strut=yes, but had not realized I also  
> needed to set autostrut=no.  That approach ended up working best; my  
> initial solution broke aligncharacter, and I like the table  
> environment to reset.  It is a bit odd that it resets to something  
> different than the default.
> 
> As an aside, what books are good for learning TeX programming for  
> ConTeXt?  Anything besides the TeXBook (and I saw TeX by Topic  
> mentioned on the list the other day).
> 
> 
> Thanks again,
> Brian

Hi Brian,

the best method to control nested tables is by integrating a setup
command for nested tables.

\unprotect

\def\setupresetTABLE
  {\dodoubleargument\getparameters[\@@tbl\@@tbl\@@tbl]}

\def\resetallTABLEparameters% moet genest wel werken
  {\ifnum\TBLlevel>\plusone % in ieder geval
     \ifconditional\resetTABLEmode
       \presetlocalframed   % breedte hoogte diepte offset
         [\@@tbl\@@tbl]%    % achtergrond, achtergrondraster,
achtergrondkleur \copyparameters
         [\@@tbl\@@tbl][\@@tbl\@@tbl\@@tbl]
         [\c!frameoffset,\c!backgroundoffset,\c!framecolor,\c!color,
          \c!strut,\c!autostrut,\c!aligncharacter,\c!alignmentcharacter,
          \c!style,\c!option,\c!maxwidth,\c!textwidth,\c!left,\c!right]
     \else
       \setupTABLE
         [\c!width=\v!fit,
          \c!height=\v!fit]%
     \fi
  \fi}

\setupresetTABLE
  [\c!frameoffset=.5\linewidth,
   \c!backgroundoffset=\v!frame,
   \c!framecolor=\s!black,
   \c!color=,
   \c!style=,
   \c!strut=\v!yes,
   \c!autostrut=\v!no,
   \c!aligncharacter=\v!no,
   \c!alignmentcharacter={,},
   \c!option=,
   \c!maxwidth=8em,
   \c!textwidth=\hsize,
   \c!left=,
   \c!right=]

\protect

\starttext

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

\stoptext

Wolfgang

      reply	other threads:[~2007-04-04 16:32 UTC|newest]

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

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=20070404183221.f4c8addd.schuster.wolfgang@googlemail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).