ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Vit Zyka <vit.zyka@seznam.cz>
Subject: Re: How to increase left and right padding of cells in a natural table?
Date: Thu, 22 Jun 2006 21:03:39 +0200	[thread overview]
Message-ID: <449AE98B.4070904@seznam.cz> (raw)
In-Reply-To: <449AA30E.1070206@wxs.nl>

Hans Hagen wrote:
> Nicolas Grilly wrote:
>> Vit,
>>
>> I just tried your solution, but it doesn't work: it adds space to the four
>> side of table cells. But I want to add space ONLY TO LEFT AND RIGHT, not to
>> top and bottom, like in the following illustration:
>>
>> ---------------------------------
>> |            My text            |
>> ---------------------------------
>>   
> inside the cell 
> 
> \leftskip1em \rightskip\leftskip 

Not to four sides but between columns. Rows distance is not affected. 
But you are right it does not increase distance between text and cell 
frame. Since natural tables uses \framed construct in each cell and 
\framed has no 'before'/'after'/'hoffset'/'leftoffset'/'rightoffset' it 
can not be simply set for whole natural table.

Solution?

a) quick:
      \bTD \hskip1cm Second movie \hskip2cm\null\eTD
    or with macro:
    \newdimen\lOffset \lOffset=1cm
    \newdimen\rOffset \rOffset=2cm
    \def\myNatTabCell#1{\bTD\hskip\lOffset#1\hskip\rOffset\null\eTD}
    ...
    \myNatTabCell{Second movie}
    ...

b) systematic
    create alternative \extframed with 'before', 'after', 'hoffset', 
'leftoffset', 'rightoffset', 'voffset', 'topoffset', 'bottomoffset'
and add switches:
   \bTABLE[alternative=extframed,leftoffset=1cm,rightoffset=2cm]

Vit

Minimal example:
---------------------------------------
\starttext
\bTABLE[frame=on]
\bTR
     \bTH My Title \eTH
     \bTH Your title \eTH
\eTR
\bTR
     \bTD First try \eTD
     \bTD Second try \eTD
\eTR
\bTR
     \bTD First movie \eTD
     \bTD \hskip1cm Second movie \hskip2cm\null\eTD
\eTR
\eTABLE
\stoptext

  parent reply	other threads:[~2006-06-22 19:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 11:28 Nicolas Grilly
2006-06-22 12:10 ` Vit Zyka
2006-06-22 12:49   ` Nicolas Grilly
2006-06-22 14:02     ` Hans Hagen
2006-06-22 14:40       ` Nicolas Grilly
2006-06-22 19:03       ` Vit Zyka [this message]
2006-06-22 21:22         ` Nicolas Grilly

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=449AE98B.4070904@seznam.cz \
    --to=vit.zyka@seznam.cz \
    --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).