Problems with Natural Tables
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.
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
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
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 -----------------------------------------------------------------
Eckhart Guthöhrlein
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:
gives 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 } 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:
doesn't split the table. The output looks exactly like the \midaligned{} one. bye, Adam.
Adam Duck wrote:
Eckhart Guthöhrlein
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 -----------------------------------------------------------------
Hans Hagen
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.
Adam Duck wrote:
Hans Hagen
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 -----------------------------------------------------------------
Hans Hagen wrote:
Adam Duck wrote:
Hans Hagen
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
Adam Duck
Hans Hagen
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.
Hans Hagen wrote:
Adam Duck wrote:
Eckhart Guthöhrlein
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
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 -----------------------------------------------------------------
participants (4)
-
Adam Duck
-
Eckhart Guthöhrlein
-
Hans Hagen
-
Vit Zyka