ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to increase left and right padding of cells in a natural table?
@ 2006-06-22 11:28 Nicolas Grilly
  2006-06-22 12:10 ` Vit Zyka
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Grilly @ 2006-06-22 11:28 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 674 bytes --]

Hello,
 
I'm using natural tables (\bTABLE ... \eTABLE) and I want to increase the
space between the cells borders and the text inside the cells (CSS calls
that left-padding and right-padding).
 
I didn't use parameter "offset" because I want to increase only left and
right padding. I don't want to increase top and bottom padding.
 
How can I do that?
 
Thanks for your ideas,
 
Nicolas
 
 
--
Nicolas Grilly
Garden - Agence conseil en CRM
Marketing multicanal - Etudes clients - Système d'information
Tel +33 1 45 72 48 78 - Mob +33 6 03 00 25 34 - www.garden-paris.com
<http://www.garden-paris.com/> 

Skype :  <skype:ngrilly?call> My status 
 

[-- Attachment #1.1.2: Type: text/html, Size: 2226 bytes --]

[-- Attachment #1.2: ngrilly --]
[-- Type: application/octet-stream, Size: 1197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to increase left and right padding of cells in a natural table?
  2006-06-22 11:28 How to increase left and right padding of cells in a natural table? Nicolas Grilly
@ 2006-06-22 12:10 ` Vit Zyka
  2006-06-22 12:49   ` Nicolas Grilly
  0 siblings, 1 reply; 7+ messages in thread
From: Vit Zyka @ 2006-06-22 12:10 UTC (permalink / raw)




Nicolas Grilly wrote:
> Hello,
>  
> I'm using natural tables (\bTABLE ... \eTABLE) and/ /I want to increase 
> the space between the cells borders and the text inside the cells (CSS 
> calls that left-padding and right-padding).
>  
> I didn't use parameter "offset" because I want to increase only left and 
> right padding. I don't want to increase top and bottom padding.

Let try
    offset=2pt,                    % hor+vert each cell
    distance=\zeropoint,           % individual column
    columndistance=\zeropoint,     % each column (whole table)
    leftmargindistance=\zeropoint, % whole table
    rightmargindistance=\zeropoint,% whole table

Vit

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to increase left and right padding of cells in a natural table?
  2006-06-22 12:10 ` Vit Zyka
@ 2006-06-22 12:49   ` Nicolas Grilly
  2006-06-22 14:02     ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Grilly @ 2006-06-22 12:49 UTC (permalink / raw)




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            |
---------------------------------

 <--offset-->       <--offset-->


> Nicolas Grilly wrote:
> > Hello,
> >  
> > I'm using natural tables (\bTABLE ... \eTABLE) and/ /I want to 
> > increase the space between the cells borders and the text 
> inside the 
> > cells (CSS calls that left-padding and right-padding).
> >  
> > I didn't use parameter "offset" because I want to increase 
> only left 
> > and right padding. I don't want to increase top and bottom padding.
> 
> Let try
>     offset=2pt,                    % hor+vert each cell
>     distance=\zeropoint,           % individual column
>     columndistance=\zeropoint,     % each column (whole table)
>     leftmargindistance=\zeropoint, % whole table
>     rightmargindistance=\zeropoint,% whole table
> 
> Vit

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to increase left and right padding of cells in a natural table?
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2006-06-22 14:02 UTC (permalink / raw)


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 

-----------------------------------------------------------------
                                          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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to increase left and right padding of cells in a natural table?
  2006-06-22 14:02     ` Hans Hagen
@ 2006-06-22 14:40       ` Nicolas Grilly
  2006-06-22 19:03       ` Vit Zyka
  1 sibling, 0 replies; 7+ messages in thread
From: Nicolas Grilly @ 2006-06-22 14:40 UTC (permalink / raw)




Hans,

Thanks for your help, but I don't know where to put your code.

I tried the following code (and other similar solutions) but it doesn't
work:

\bTABLE
\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 \leftskip1cm \leftskip\rightskip Second movie \eTD
\eTR
\eTABLE


Moreover, I want to set this not for one table cell but for EVERY table
cells.

Do you have any advice?

Nicolas


> -----Message d'origine-----
> De : ntg-context-bounces@ntg.nl 
> [mailto:ntg-context-bounces@ntg.nl] De la part de Hans Hagen
> Envoyé : jeudi 22 juin 2006 16:03
> À : mailing list for ConTeXt users
> Objet : Re: [NTG-context] How to increase left and right 
> padding of cells in a natural table?
> 
> 
> 
> 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 
> 
> -----------------------------------------------------------------
>                                           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
> 
> 
> 
> --
> If this email is spam, report it here:
> http://www.OnlyMyEmail.com/reportSpam?Id=MTk4NDk6MTM2ODc4OTg1O
> m5ncmlsbHlAb25seW15ZW1haWwuY29t
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to increase left and right padding of cells in a natural table?
  2006-06-22 14:02     ` Hans Hagen
  2006-06-22 14:40       ` Nicolas Grilly
@ 2006-06-22 19:03       ` Vit Zyka
  2006-06-22 21:22         ` Nicolas Grilly
  1 sibling, 1 reply; 7+ messages in thread
From: Vit Zyka @ 2006-06-22 19:03 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to increase left and right padding of cells in a natural table?
  2006-06-22 19:03       ` Vit Zyka
@ 2006-06-22 21:22         ` Nicolas Grilly
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Grilly @ 2006-06-22 21:22 UTC (permalink / raw)




Vit,

Thanks for your quick answer. I tried your "quick" solution (\bTD \hskip1cm
Second movie \hskip2cm\null\eTD) but it doesn't work when cell contains a
multiline text: the left space is only present on the first line and the
right space is only present on the last line.

Andmy natural table have some cells containing two or three lines of text.
Do you have any idea?

Thanks,

Nicolas


PS: If someone is able to develop an extension to natural tables in order to
have parameters like leftoffset, rightoffset, topoffset and bottomoffset in
bTABLE and setupTABLE, my company is interested to pay some hours/days of
development and release the result to ConTeXt project.


Vit 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-06-22 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-22 11:28 How to increase left and right padding of cells in a natural table? 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
2006-06-22 21:22         ` Nicolas Grilly

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).