ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [Fwd: Re: Problems with Natural Tables]
@ 2005-10-25  9:39 Vit Zyka
  2005-11-06 10:55 ` Problems with Natural Tables Vit Zyka
  0 siblings, 1 reply; 16+ messages in thread
From: Vit Zyka @ 2005-10-25  9:39 UTC (permalink / raw)


Hello Hans,

(I guess you are the only person who can specify your previous answer),
so please, is the file 'core-ntb-new.tex' somewhere available?

Actually what I want. I have plenty of natural tables. If I want to make 
closer interline space between table lines the only way I know is to 
make smaller value of offset param. But after that, columns are too 
close together (framed object as a core of natural table does not 
distinguish between vertical and horizontal offsets). So bellow mentioned
   \setupTABLE[c][1][distance=2em]
would be nice solution.

So ones more, is the new code available?

Thank you in advance for the answer.
Vit

Hans Hagen wrote:
> Adam Duck wrote:
> 
>> Eckhart Guthöhrlein <eckhart.guthoehrlein@uni-bielefeld.de> writes:
>>
>>  
>>
>>> Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
>>>
>>>   
>>>
>>>> - how do I set the spacing between a vertical line (between two
>>>>  columns) and the text inside that columns?  I already used
>>>>  "framedoffest=-3pt", but the output is unacceptable.
>>>>     
>>>
>>> Spacing is a weak point of natural tables. Afaik, there is no good way
>>> to tune spacing. I would try using dummy colums like
>>> \bTD[width=1em]\eTD.
>>>   
>>
>> OK, That sounds reasonable.  I'll try that.  On the other hand this
>> means many \bTD<something>\eTD ... but one can write a macro for that,
>> I think.
>>  
>>
> a next release will support:
> \input core-ntb-new.tex
> 
> \starttext
> 
> \showframe
> 
> \setupTABLE[c][1][distance=2em]
> \setupTABLE[c][2][distance=3em]

I was looking for core-ntb-new.tex or 'distance' in current beta
core-ntb.tex but have not been successful. Please, where I can find it?

Thanks
Vit

> \bTABLE
> \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
> \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
> \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
> \eTABLE
> 
> 
> \bTABLE[option=stretch]
> \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
> \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
> \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
> \eTABLE
> 
> \stoptext

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

* Re: Problems with Natural Tables
  2005-10-25  9:39 [Fwd: Re: Problems with Natural Tables] Vit Zyka
@ 2005-11-06 10:55 ` Vit Zyka
  2005-11-09 12:18   ` Hans Hagen
  0 siblings, 1 reply; 16+ messages in thread
From: Vit Zyka @ 2005-11-06 10:55 UTC (permalink / raw)


Vit Zyka wrote:
 > ...
> so please, is the file 'core-ntb-new.tex' somewhere available?

Solution of my own question, for who is interesting.

Description:
The next patch enables to define intercolumn gaps in Natural Table 
(bTABLE...eTABLE) environment.

Features:
- one can distinguish the amounts of first (colsepfirst), inner 
(colsepbetween), and last (colseplast) gaps.
- patch operates for both 'fit' or 'stretch' table options.
- gaps has no 'background' you have to use external one.

Example:
http://typokvitek.com/tmp/nattab-colskip.pdf

Usage:
\bTABLE[colsepbetween=2cm,colsepfirst=.3cm,colseplast=.5cm]
   \bTR
     \bTD A\eTD    \bTD B\eTD    \bTD C\eTD
   \eTR
\eTABLE

Enjoy it,
vit

Patch:
-----------------------------------------------
% suppressing spurious space from setupTABLE
\let\DosetupTABLE=\setupTABLE
\def\setupTABLE[#1][#2][#3]{\DosetupTABLE[#1][#2][#3]\ignorespaces}

% new bTABLE options <dimen>: colsepbetween, colsepfirst, colseplast
\def\nexttblcol
   {\doglobal\increment\colTBL\hskip\tbltblcolsepbetween\hbox{}&} % VZ

\def\begintblrow
   {\noalign
      {\doglobal\increment\rowTBL
       \doglobal\newcounter\colTBL}%
    \nexttblcol
    \hskip\tbltblcolsepfirst\hskip-\tbltblcolsepbetween} % VZ

\unprotected\def\endtblrow
   {\hskip-\tbltblcolsepbetween\hskip\tbltblcolseplast\hbox{}% VZ
    \crcr
    \noalign
      {\nointerlineskip
       \allowbreak
       \bgroup % protect local vars
         \@@tblsplitafter
       \egroup
       \bgroup % protect local vars
         \increment\rowTBL\relax
         \ifnum\rowTBL>\noftblhdnxlines\relax
           \ifnum\rowTBL<\maximumrow\relax
 
\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
           \fi
         \fi
       \egroup}}

\unprotected\def\endTBL
   {\appendtoks
      \endtbl
    \to\tbltoks
    \setbox\scratchbox\hbox
      {\localframed
         [\@@tbl\@@tbl]
         [\c!frame=\v!off,\c!background=,\c!align=\v!no]
         {\strut}}%
    \edef\minimalcellheight{\the\ht\scratchbox}%
    \dorecurse\maximumcol
      {\settblaut\recurselevel\!!zeropoint % \zeropoint etc
       % new
       \let\xcol\recurselevel
       \dorecurse\maximumrow
         {\settblwd \recurselevel\xcol\!!zeropoint
          \settblht \recurselevel\xcol\!!zeropoint}%
       % till here
       \settblwid\recurselevel\!!zeropoint}%
    \dorecurse\maximumrow
      {\settblhei\recurselevel\maxdimen}%
    \chardef\TBLpass\plusone
    \let\handleTBLcell\dohandleTBLcellA
    \def\makeTBL##1##2%
      {\gettbltxt{##1}{##2}}%
    \def\inTBLcell##1##2%
      {\ExpandBothAfter\doifinsetelse\localwidth{\v!fit,\v!broad} % user set
         {}
         {\scratchdimen\gettblaut\colTBL\relax
          \ifdim\localwidth>\scratchdimen
            \settblaut\colTBL\localwidth
          \fi}}%
    \setbox0\vbox{\trialtypesettingtrue \the\tbltoks}%
    \ifautoTBLspread
      % experimental, stretch non fixed cells to \hsize
      \checktblwidthsone   % trial run
      \checktblwidthstwo   % real run
      \stretchtblwidths
      \let\handleTBLcell\dohandleTBLcellB
      \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
    \else\ifdim\wd0>\hsize
      \ifautoTBLhsize
        \checktblwidthsone % trial run
        \checktblwidthstwo % real run
        \let\handleTBLcell\dohandleTBLcellB
        \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
      \fi
    \else\ifautoTBLrowspan\ifnum\maximumrowspan>1 % max ?
      % added jan 2002 because nx=* did no longer work
      \checktblwidthsone % trial run
      \checktblwidthstwo % real run
      %
      \let\handleTBLcell\dohandleTBLcellC
      \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
    \fi\fi\fi\fi
    \let\handleTBLcell\dohandleTBLcellD
    \chardef\TBLpass\plustwo
    \def\makeTBL##1##2% meer in cellD
      {\dimen2\zeropoint
       \globalpushmacro\colTBL
       \dorecurse{\gettblcol{##1}{##2}}
         {\advance\dimen2 \gettblwid\colTBL
          \advance\dimen2 \tbltblcolsepbetween % VZ
          \increment\colTBL}%
       \advance\dimen2 -\tbltblcolsepbetween % VZ
       \edef\widthTBL{\the\dimen2}%
       \globalpopmacro\colTBL
       \setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}%
       \settblht{##1}{##2}{\the\ht\scratchbox}%
       \settblwd{##1}{##2}{\the\wd\scratchbox}%
       \ifdim\ht\scratchbox>\gettblhei{##1}\relax
         \settblhei{##1}{\the\ht\scratchbox}%
       \fi}%
    \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
    \checktblheightsone
    \checktblheightstwo
    \let\handleTBLcell\dohandleTBLcellE
    \chardef\TBLpass\plusthree
    \def\makeTBL##1##2%
      {% height
       \globalpushmacro\rowTBL
       \scratchdimen\zeropoint
       \def\rowTBL{##1}%
       \ifnum\gettblcol{##1}{##2}=\maximumcol\relax
         % case: nc=maxcolumns
       \else
         \dorecurse{\gettblrow{##1}{##2}}
           {\advance\scratchdimen \gettblhei\rowTBL
            \increment\rowTBL}%
         \ifdim\scratchdimen<\gettblht{##1}{##2}\relax
           \scratchdimen\gettblht{##1}{##2}\relax
         \fi
       \fi
       \edef\heightTBL{\the\scratchdimen}%
       \globalpopmacro\rowTBL
       % width
       \globalpushmacro\colTBL
       \scratchdimen\zeropoint
       \dorecurse{\gettblcol{##1}{##2}}
         {\advance\scratchdimen \gettblwid\colTBL
          \advance\scratchdimen \tbltblcolsepbetween % VZ
          \increment\colTBL}%
       \advance\scratchdimen -\tbltblcolsepbetween % VZ
       \edef\widthTBL{\the\scratchdimen}%
       \globalpopmacro\colTBL
       % cell
       \setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}%
       \ifnum\gettblcol{##1}{##2}=\maximumcol\relax
         % case: nc=maxcolumns
       \else
         \scratchdimen\gettblhei{##1}%
         \setbox\scratchbox\hbox
           {\lower\ht\scratchbox\hbox{\raise\scratchdimen\box\scratchbox}}%
         \ht\scratchbox\scratchdimen
       \fi
       \dp\scratchbox\zeropoint
       \box\scratchbox}%
     \iftraceTABLE\showtbltoks\fi
     \ifnum\TBLlevel>\plusone
       \@EA\notsplittblbox
     \else\ifenableTBLbreak
       \@EAEAEA\splittblbox
     \else
       \@EAEAEA\notsplittblbox
     \fi\fi{\the\tbltoks}}

\unprotected\def\stretchtblwidths
   {\!!dimend\zeropoint
    \dorecurse\maximumcol
      {\advance\!!dimend\gettblwid\recurselevel
       \advance\!!dimend\tbltblcolsepbetween}% VZ
    \advance\!!dimend-\tbltblcolsepbetween   % VZ
    \advance\!!dimend\tbltblcolsepfirst      % VZ
    \advance\!!dimend\tbltblcolseplast       % VZ
    % distribute width (stretch)
    \ifdim\!!dimend<\hsize
      \advance\!!dimend-\hsize
      \!!dimend-\!!dimend
      \divide\!!dimend\maximumcol
      \dorecurse\maximumcol
        {\scratchdimen\gettblwid\recurselevel
         \advance\scratchdimen\!!dimend
         \settblwid\recurselevel{\the\scratchdimen}}%
    \fi}

\let\tbltblcolsepbetween\zeropoint
\let\tbltblcolsepfirst\zeropoint
\let\tbltblcolseplast\zeropoint
-----------------------------------------------------------

Old emails:
> Actually what I want. I have plenty of natural tables. If I want to make 
> closer interline space between table lines the only way I know is to 
> make smaller value of offset param. But after that, columns are too 
> close together (framed object as a core of natural table does not 
> distinguish between vertical and horizontal offsets). So bellow mentioned
>   \setupTABLE[c][1][distance=2em]
> would be nice solution.
> 
> So ones more, is the new code available?
> 
> Thank you in advance for the answer.
> Vit
> 
> Hans Hagen wrote:
> 
>> Adam Duck wrote:
>>
>>> Eckhart Guthöhrlein <eckhart.guthoehrlein@uni-bielefeld.de> writes:
>>>
>>>  
>>>
>>>> Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
>>>>
>>>>  
>>>>
>>>>> - how do I set the spacing between a vertical line (between two
>>>>>  columns) and the text inside that columns?  I already used
>>>>>  "framedoffest=-3pt", but the output is unacceptable.
>>>>>     
>>>>
>>>>
>>>> Spacing is a weak point of natural tables. Afaik, there is no good way
>>>> to tune spacing. I would try using dummy colums like
>>>> \bTD[width=1em]\eTD.
>>>>   
>>>
>>>
>>> OK, That sounds reasonable.  I'll try that.  On the other hand this
>>> means many \bTD<something>\eTD ... but one can write a macro for that,
>>> I think.
>>>  
>>>
>> a next release will support:
>> \input core-ntb-new.tex
>>
>> \starttext
>>
>> \showframe
>>
>> \setupTABLE[c][1][distance=2em]
>> \setupTABLE[c][2][distance=3em]
> 
> 
> I was looking for core-ntb-new.tex or 'distance' in current beta
> core-ntb.tex but have not been successful. Please, where I can find it?
> 
> Thanks
> Vit
> 
>> \bTABLE
>> \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
>> \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
>> \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
>> \eTABLE
>>
>>
>> \bTABLE[option=stretch]
>> \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
>> \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
>> \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
>> \eTABLE
>>
>> \stoptext

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

* Re: Problems with Natural Tables
  2005-11-06 10:55 ` Problems with Natural Tables Vit Zyka
@ 2005-11-09 12:18   ` Hans Hagen
  2005-11-09 14:38     ` Vit Zyka
  0 siblings, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2005-11-09 12:18 UTC (permalink / raw)


Vit Zyka wrote:

> Vit Zyka wrote:
> > ...
>
>> so please, is the file 'core-ntb-new.tex' somewhere available?
>
i merged the 'core-ntb-new.tex' code into the main file

> Solution of my own question, for who is interesting.
>
> Description:
> The next patch enables to define intercolumn gaps in Natural Table 
> (bTABLE...eTABLE) environment.


I added your patches, but renamed the keys:

\starttext

% distance mechanism, per column (H)

\start
    \setupTABLE[c][1][distance=2em]
    \setupTABLE[c][2][distance=3em]

    \bTABLE
    \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
    \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
    \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
    \eTABLE

    \bTABLE[option=stretch]
    \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
    \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
    \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
    \eTABLE
\stop

% distance mechanism, per table (V)

\framed[offset=none]{%
\setupTABLE[column][2][align=left]
\setupTABLE[column][3][align=right]
\bTABLE[columndistance=2cm,leftmargindistance=.3cm,rightmargindistance=.5cm]
  \bTR
    \bTH[nc=3] Table head\eTH
  \eTR
  \bTR\bTD[nc=2] AB\eTD\bTD C\eTD\eTR
  \bTR\bTD[nc=2,align=left] AB\eTD\bTD C\eTD\eTR
  \bTR\bTD[nc=2,align=middle] AB\eTD\bTD C\eTD\eTR
  \bTR\bTD A\eTD\bTD B\eTD\bTD C\eTD\eTR
  \bTR\bTD Aa\eTD\bTD Bb\eTD\bTD Cccc\eTD\eTR
  \bTR\bTD[nc=3,align=middle] ABC\eTD\eTR
\eTABLE
}

\stoptext

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

* Re: Problems with Natural Tables
  2005-11-09 12:18   ` Hans Hagen
@ 2005-11-09 14:38     ` Vit Zyka
  0 siblings, 0 replies; 16+ messages in thread
From: Vit Zyka @ 2005-11-09 14:38 UTC (permalink / raw)


Hans Hagen wrote:
> Vit Zyka wrote:
> 
>> Vit Zyka wrote:
>> > ...
>>
>>> so please, is the file 'core-ntb-new.tex' somewhere available?
>>
>>
> i merged the 'core-ntb-new.tex' code into the main file
> 
>> Solution of my own question, for who is interesting.
>>
>> Description:
>> The next patch enables to define intercolumn gaps in Natural Table 
>> (bTABLE...eTABLE) environment.
> 
> 
> 
> I added your patches, but renamed the keys:

Thanks, renaming makes sence.
vit

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

* Re: Problems with Natural Tables
  2005-08-15  8:55     ` Hans Hagen
  2005-08-15 15:19       ` Adam Duck
@ 2005-10-22 13:20       ` Vit Zyka
  1 sibling, 0 replies; 16+ messages in thread
From: Vit Zyka @ 2005-10-22 13:20 UTC (permalink / raw)


Hans Hagen wrote:
> Adam Duck wrote:
> 
>> Eckhart Guthöhrlein <eckhart.guthoehrlein@uni-bielefeld.de> writes:
>>
>>  
>>
>>> Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
>>>
>>>   
>>>
>>>> - how do I set the spacing between a vertical line (between two
>>>>  columns) and the text inside that columns?  I already used
>>>>  "framedoffest=-3pt", but the output is unacceptable.
>>>>     
>>>
>>> Spacing is a weak point of natural tables. Afaik, there is no good way
>>> to tune spacing. I would try using dummy colums like
>>> \bTD[width=1em]\eTD.
>>>   
>>
>> OK, That sounds reasonable.  I'll try that.  On the other hand this
>> means many \bTD<something>\eTD ... but one can write a macro for that,
>> I think.
>>  
>>
> a next release will support:
> \input core-ntb-new.tex
> 
> \starttext
> 
> \showframe
> 
> \setupTABLE[c][1][distance=2em]
> \setupTABLE[c][2][distance=3em]

I was looking for core-ntb-new.tex or 'distance' in current beta 
core-ntb.tex but have not been successful. Please, where I can find it?

Thanks
Vit

> \bTABLE
> \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
> \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
> \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
> \eTABLE
> 
> 
> \bTABLE[option=stretch]
> \bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
> \bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
> \bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
> \eTABLE
> 
> \stoptext

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

* Re: Problems with Natural Tables
  2005-08-15 15:35         ` Hans Hagen
@ 2005-08-15 21:35           ` Vit Zyka
  0 siblings, 0 replies; 16+ messages in thread
From: Vit Zyka @ 2005-08-15 21:35 UTC (permalink / raw)


Hans Hagen wrote:
> Adam Duck wrote:
> 
>> Hans Hagen <pragma@wxs.nl> writes:
>>
>> < 25 lines deleted by Adam Duck >
>>  
>>
>>> a next release will support:
>>>   
>>
>> This is mighty cool!  I don't want to be impolite, but when will this
>> be?  The deadline for my girlfriend's thesis is approaching fast ...
>>  
>>
> soon, for the moment just \input the file i sent you

That is needed improvement of natural tables, thanks Hans.

---

- In my vz-new.tex is another simple improvement of nat tables. Perhaps 
it can be also incorporated:

----------------------------------
\long\def\parseTH[#1]#2\eTH
   {\parseTD[#1,\c!color=\tbltblheadcolor,\c!style=\tbltblheadstyle,
    \c!align=\tbltblheadalign,\c!aligncharacter=\v!no]#2\eTD}
----------------------------------
See additional
   \c!align=\tbltblheadalign

- and what about nc=max? = Span as much as columns as there are to the 
end of line.

vit

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

* Re: Problems with Natural Tables
  2005-08-15 15:19       ` Adam Duck
  2005-08-15 15:35         ` Hans Hagen
@ 2005-08-15 15:36         ` Adam Duck
  1 sibling, 0 replies; 16+ messages in thread
From: Adam Duck @ 2005-08-15 15:36 UTC (permalink / raw)


Adam Duck <duck@informatik.uni-frankfurt.de> writes:

> Hans Hagen <pragma@wxs.nl> writes:
>
> < 25 lines deleted by Adam Duck >
>> a next release will support:
> This is mighty cool!  I don't want to be impolite, but when will this
> be?  The deadline for my girlfriend's thesis is approaching fast ...

Sorry about this mail.  And thank you for the very fast response and
coding.

bye, Adam.

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

* Re: Problems with Natural Tables
  2005-08-15 15:19       ` Adam Duck
@ 2005-08-15 15:35         ` Hans Hagen
  2005-08-15 21:35           ` Vit Zyka
  2005-08-15 15:36         ` Adam Duck
  1 sibling, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2005-08-15 15:35 UTC (permalink / raw)


Adam Duck wrote:

>Hans Hagen <pragma@wxs.nl> writes:
>
>< 25 lines deleted by Adam Duck >
>  
>
>>a next release will support:
>>    
>>
>This is mighty cool!  I don't want to be impolite, but when will this
>be?  The deadline for my girlfriend's thesis is approaching fast ...
>  
>
soon, for the moment just \input the file i sent you

>< 6 lines deleted by Adam Duck >
>
>  
>
>>\setupTABLE[c][1][distance=2em]
>>\setupTABLE[c][2][distance=3em]
>>    
>>
>Will this be both: the distance to the left and the right frame?
>  
>
you set distances after the column (so, [c][1] means "after column 1" with the last column ignored; 

doing left/right take a bit more code and time so maybe some day 



Hans 


-----------------------------------------------------------------
                                          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] 16+ messages in thread

* Re: Problems with Natural Tables
  2005-08-15  8:55     ` Hans Hagen
@ 2005-08-15 15:19       ` Adam Duck
  2005-08-15 15:35         ` Hans Hagen
  2005-08-15 15:36         ` Adam Duck
  2005-10-22 13:20       ` Vit Zyka
  1 sibling, 2 replies; 16+ messages in thread
From: Adam Duck @ 2005-08-15 15:19 UTC (permalink / raw)


Hans Hagen <pragma@wxs.nl> writes:

< 25 lines deleted by Adam Duck >
> a next release will support:
This is mighty cool!  I don't want to be impolite, but when will this
be?  The deadline for my girlfriend's thesis is approaching fast ...

< 6 lines deleted by Adam Duck >

> \setupTABLE[c][1][distance=2em]
> \setupTABLE[c][2][distance=3em]
Will this be both: the distance to the left and the right frame?

< 28 lines deleted by Adam Duck >

bye, Adam.

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

* Re: Problems with Natural Tables
  2005-08-14 22:31   ` Adam Duck
@ 2005-08-15  8:55     ` Hans Hagen
  2005-08-15 15:19       ` Adam Duck
  2005-10-22 13:20       ` Vit Zyka
  0 siblings, 2 replies; 16+ messages in thread
From: Hans Hagen @ 2005-08-15  8:55 UTC (permalink / raw)


Adam Duck wrote:

>Eckhart Guthöhrlein <eckhart.guthoehrlein@uni-bielefeld.de> writes:
>
>  
>
>>Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
>>
>>    
>>
>>>- how do I set the spacing between a vertical line (between two
>>>  columns) and the text inside that columns?  I already used
>>>  "framedoffest=-3pt", but the output is unacceptable.
>>>      
>>>
>>Spacing is a weak point of natural tables. Afaik, there is no good way
>>to tune spacing. I would try using dummy colums like
>>\bTD[width=1em]\eTD.
>>    
>>
>OK, That sounds reasonable.  I'll try that.  On the other hand this
>means many \bTD<something>\eTD ... but one can write a macro for that,
>I think.
>  
>
a next release will support: 

\input core-ntb-new.tex

\starttext

\showframe

\setupTABLE[c][1][distance=2em]
\setupTABLE[c][2][distance=3em]

\bTABLE
\bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
\bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
\bTR \bTD test \eTD  \bTD[nx=2] test \eTD \eTR
\eTABLE


\bTABLE[option=stretch]
\bTR \bTD test \eTD  \bTD test \eTD  \bTD test \eTD \eTR
\bTR \bTD[nx=2] test \eTD  \bTD test \eTD \eTR
\bTR \bTD test \eTD  \bTD[nx=2] test \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
-----------------------------------------------------------------

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

* Re: Problems with Natural Tables
  2005-08-14 19:13 ` Eckhart Guthöhrlein
  2005-08-14 21:37   ` Vit Zyka
@ 2005-08-14 22:31   ` Adam Duck
  2005-08-15  8:55     ` Hans Hagen
  1 sibling, 1 reply; 16+ messages in thread
From: Adam Duck @ 2005-08-14 22:31 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

Eckhart Guthöhrlein <eckhart.guthoehrlein@uni-bielefeld.de> writes:

> Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
>
>> - how do I set the spacing between a vertical line (between two
>>   columns) and the text inside that columns?  I already used
>>   "framedoffest=-3pt", but the output is unacceptable.
>
> Spacing is a weak point of natural tables. Afaik, there is no good way
> to tune spacing. I would try using dummy colums like
> \bTD[width=1em]\eTD.
OK, That sounds reasonable.  I'll try that.  On the other hand this
means many \bTD<something>\eTD ... but one can write a macro for that,
I think.

>> - how do I center the whole table?  This one is really crucial: my GF
>>   also accepts hacks ;).
>
> \midaligned{..} works
Yep, but only if I don't split the table:


[-- Attachment #2: Type: application/tex, Size: 197 bytes --]

[-- Attachment #3: Type: text/plain, Size: 8 bytes --]


gives


[-- Attachment #4: Type: text/plain, Size: 525 bytes --]

ERROR: Missing } inserted.

--- TeX said ---
<inserted text> 
                }
<to be read again> 
                   \unvcopy 
\splittblboxa ...p \page \egroup \fi \fi \unvcopy 
                                                  2 \ifcase \noftblnextlines...

\splittblbox ...tblsplitmethod }\splittblboxa {#1}
                                                  \fi 
\eTABLE ...}}\eTBL }\removeunwantedspaces \endTBL 
                                                  \stopTBLprocessing \egroup...
l.11 \eTABLE
            }

[-- Attachment #5: Type: text/plain, Size: 328 bytes --]

and \startalignment[middle]...\stopalignment doesn't seem to do
anything in that case.

>> - why doesn't \splitfloat{\placetable...} work with Natural Tables?
>>   (They won't get splitted at all, but with tables and linetables it
>>   works...)
>
> \setupTABLE[split=yes] or \setupTABLE[split=repeat]
That's not what I meant:


[-- Attachment #6: Type: application/tex, Size: 254 bytes --]

[-- Attachment #7: Type: text/plain, Size: 92 bytes --]


doesn't split the table.  The output looks exactly like the
\midaligned{} one.

bye, Adam.

[-- Attachment #8: 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] 16+ messages in thread

* Re: Problems with Natural Tables
  2005-08-14 21:37   ` Vit Zyka
@ 2005-08-14 22:03     ` Hans Hagen
  0 siblings, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2005-08-14 22:03 UTC (permalink / raw)


Vit Zyka wrote:

> Eckhart Guthöhrlein wrote:
>
>> Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
>>
>>> - how do I set the spacing between a vertical line (between two
>>>  columns) and the text inside that columns?  I already used
>>>  "framedoffest=-3pt", but the output is unacceptable.
>>
>>
>>
>> Spacing is a weak point of natural tables. Afaik, there is no good way
>> to tune spacing. I would try using dummy colums like
>> \bTD[width=1em]\eTD.
>
>
> Yes, I was also thinking about that. Perhaps adding lefttext= and 
> righttext= params to \framed (since table cell is framed) solves some 
> problem.
>
> Imagine:
>   \setupTABLE[column][1,2][align=right,lefttext=\hskip.5em]
> or
>   \setupTABLE[column][3][align=left,righttext=\hskip5pt$\bullet$]
> ...
> \bTABLE
>
> \eTABLE

probably a distance parameter then (unrelated to framed); it's slightly more complex than you think because we need to take spans into account (so it shows up in prerolls etc) but it's doable 

HAns  

-----------------------------------------------------------------
                                          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] 16+ messages in thread

* Re: Problems with Natural Tables
  2005-08-14 19:13 ` Eckhart Guthöhrlein
@ 2005-08-14 21:37   ` Vit Zyka
  2005-08-14 22:03     ` Hans Hagen
  2005-08-14 22:31   ` Adam Duck
  1 sibling, 1 reply; 16+ messages in thread
From: Vit Zyka @ 2005-08-14 21:37 UTC (permalink / raw)


Eckhart Guthöhrlein wrote:
> Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
> 
>>- how do I set the spacing between a vertical line (between two
>>  columns) and the text inside that columns?  I already used
>>  "framedoffest=-3pt", but the output is unacceptable.
> 
> 
> Spacing is a weak point of natural tables. Afaik, there is no good way
> to tune spacing. I would try using dummy colums like
> \bTD[width=1em]\eTD.

Yes, I was also thinking about that. Perhaps adding lefttext= and 
righttext= params to \framed (since table cell is framed) solves some 
problem.

Imagine:
   \setupTABLE[column][1,2][align=right,lefttext=\hskip.5em]
or
   \setupTABLE[column][3][align=left,righttext=\hskip5pt$\bullet$]
...
\bTABLE

\eTABLE

vit

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

* Re: Problems with Natural Tables
  2005-08-14 15:17 Adam Duck
  2005-08-14 19:13 ` Eckhart Guthöhrlein
@ 2005-08-14 19:24 ` Hans Hagen
  1 sibling, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2005-08-14 19:24 UTC (permalink / raw)


Adam Duck wrote:

>Hello ConTeXters,
>
>my girlfriend writes her dimploma thesis now and I talked her into
>using ConTeXt, but now I'm not sure anymore that this was the right
>thing to do.  So, the problems are numerous and some of them are:
>
>- how do I set the spacing between a vertical line (between two
>  columns) and the text inside that columns?  I already used
>  "framedoffest=-3pt", but the output is unacceptable.
>- how do I center the whole table?  This one is really crucial: my GF
>  also accepts hacks ;).
>- why doesn't \splitfloat{\placetable...} work with Natural Tables?
>  (They won't get splitted at all, but with tables and linetables it
>  works...)
>- how do I refer to tables then?
>
>I have chosen Natural Tables because they were the only one that
>splitted correctly (tables and linetables let out 2/3 of a page).  So,
>that's all for now.
>  
>
we need small examples showing/solving the problems 

Hans 

-----------------------------------------------------------------
                                          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] 16+ messages in thread

* Re: Problems with Natural Tables
  2005-08-14 15:17 Adam Duck
@ 2005-08-14 19:13 ` Eckhart Guthöhrlein
  2005-08-14 21:37   ` Vit Zyka
  2005-08-14 22:31   ` Adam Duck
  2005-08-14 19:24 ` Hans Hagen
  1 sibling, 2 replies; 16+ messages in thread
From: Eckhart Guthöhrlein @ 2005-08-14 19:13 UTC (permalink / raw)


Am Sonntag, den 14.08.2005, 17:17 +0200 schrieb Adam Duck:
> - how do I set the spacing between a vertical line (between two
>   columns) and the text inside that columns?  I already used
>   "framedoffest=-3pt", but the output is unacceptable.

Spacing is a weak point of natural tables. Afaik, there is no good way
to tune spacing. I would try using dummy colums like
\bTD[width=1em]\eTD.

> - how do I center the whole table?  This one is really crucial: my GF
>   also accepts hacks ;).

\midaligned{..} works

> - why doesn't \splitfloat{\placetable...} work with Natural Tables?
>   (They won't get splitted at all, but with tables and linetables it
>   works...)

\setupTABLE[split=yes] or \setupTABLE[split=repeat]

> - how do I refer to tables then?

If you don't put them in \placetable -- I don't know.

-- 
Eckhart

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

* Problems with Natural Tables
@ 2005-08-14 15:17 Adam Duck
  2005-08-14 19:13 ` Eckhart Guthöhrlein
  2005-08-14 19:24 ` Hans Hagen
  0 siblings, 2 replies; 16+ messages in thread
From: Adam Duck @ 2005-08-14 15:17 UTC (permalink / raw)


Hello ConTeXters,

my girlfriend writes her dimploma thesis now and I talked her into
using ConTeXt, but now I'm not sure anymore that this was the right
thing to do.  So, the problems are numerous and some of them are:

- how do I set the spacing between a vertical line (between two
  columns) and the text inside that columns?  I already used
  "framedoffest=-3pt", but the output is unacceptable.
- how do I center the whole table?  This one is really crucial: my GF
  also accepts hacks ;).
- why doesn't \splitfloat{\placetable...} work with Natural Tables?
  (They won't get splitted at all, but with tables and linetables it
  works...)
- how do I refer to tables then?

I have chosen Natural Tables because they were the only one that
splitted correctly (tables and linetables let out 2/3 of a page).  So,
that's all for now.

bye, Adam.

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

end of thread, other threads:[~2005-11-09 14:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-25  9:39 [Fwd: Re: Problems with Natural Tables] Vit Zyka
2005-11-06 10:55 ` Problems with Natural Tables Vit Zyka
2005-11-09 12:18   ` Hans Hagen
2005-11-09 14:38     ` Vit Zyka
  -- strict thread matches above, loose matches on Subject: below --
2005-08-14 15:17 Adam Duck
2005-08-14 19:13 ` Eckhart Guthöhrlein
2005-08-14 21:37   ` Vit Zyka
2005-08-14 22:03     ` Hans Hagen
2005-08-14 22:31   ` Adam Duck
2005-08-15  8:55     ` Hans Hagen
2005-08-15 15:19       ` Adam Duck
2005-08-15 15:35         ` Hans Hagen
2005-08-15 21:35           ` Vit Zyka
2005-08-15 15:36         ` Adam Duck
2005-10-22 13:20       ` Vit Zyka
2005-08-14 19:24 ` Hans Hagen

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