ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: newline with \setupTABLE[bottom=...]
Date: Fri, 23 Jun 2006 10:21:20 +0200	[thread overview]
Message-ID: <449BA480.6010201@wxs.nl> (raw)
In-Reply-To: <Pine.LNX.4.58.0606221843370.16445@gaston.pm>

� wrote:
> Hello,
> in accordance to http://context.literatesolutions.com/collector/52
> I got used to write things like:
>
> \starttext
> \setupTABLE[c][1][style=before,bottom=after]
> \bTABLE
> \bTR\bTD X\eTD\bTD bla\eTD\eTR
> \bTR\bTD X\eTD\bTD bla\eTD\eTR
> \eTABLE
> \stoptext
>
> This worked fine, but with the latest ConTeXt, the bottom=... introduces a
> newline. Do you have a solution for this issue?
>   
first of all, style is rather special, so you'd better not abuse that one to often (there is some checking on the meaning done) 

the companion of bottom is top and both are meant for vertical things, normally the \start/\stop things ; some commands provide left and right for horizontal things which is probably what you're looking for 

top bottom usage: the following sets a narrower text (the origin of this thread) 

\bTABLE[top=\startnarrower,bottom=\stopnarrower]
\bTR \bTD something \eTD \eTR
\eTABLE

this is also a nice one: 

\startsetups whatever
    whatever initialzations needed
\stopsetups

\bTABLE[setups=whatever]
\bTR \bTD something \eTD \eTR
\eTABLE

the next code implements left/right: 

\unprotect 

\def\bTBLCELL % why not \doinhibitblank
  {\inhibitblank
   \doconvertfont\tbltblstyle\empty
   \everypar{\tbltblleft\delayedbegstrut}}

\def\eTBLCELL
  {\ifhmode
     \delayedendstrut
     \tbltblright
     \par % added 13/4/2006
   \else
     \par
     \ifdim\prevdepth<\zeropoint % =-1000pt ?
       \vskip-\strutdp
     \else
       \removebottomthings
     \fi
   \fi}

\setupTABLE
  [\c!left=,
   \c!right=]


\bTABLE[left={(},right={)},top=\startnarrower,bottom=\stopnarrower]
\bTR \bTD something \eTD \eTR
\eTABLE

\stoptext




-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-06-23  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 16:55 Peter Münster
2006-06-23  8:21 ` Hans Hagen [this message]
2006-06-23 16:52   ` Peter Münster

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=449BA480.6010201@wxs.nl \
    --to=pragma@wxs.nl \
    --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).