On 3/27/07, Johannes Kuester
Dear all,
I'm trying to typeset a rather simple list or table where each line should keep the overall grid of my page design. For this I tried "tabulate", "table", and "TABLE", but all failed.
What I need is the following: 4 columns, each with a fixed width. One of the columns may contain a paragraph (i.e. more than one line), like:
Axxx yyyy first entry with zzz more text Bxxx yyyy next entry zzz
some ideas %%%%%%%%%%%%%%%%%% \newdimen\CellWidth \CellWidth=0.2\textwidth %% or whatever is good \newdimen\CellHeightOne \CellHeightOne=\lineheight %% synch with grid \newdimen\TestDim \long\def\CellContent#1{% \setbox100=\vbox{\hsize=\CellWidth% #1} \dp100=0pt% \TestDim=\CellHeightOne \doloop{%30 \ifdim\ht100<\TestDim% \setbox100=\vbox to \TestDim{\hsize=\CellWidth \recurselevel #1}\exitloop\fi \TestDim=\dimexpr(\CellHeightOne+\TestDim)\relax} \dp100=0pt% \ruledvbox{\box100}%ruled for test } \setupcolors[state=start] \setuplayout[grid=yes] \setupTABLE[width=\CellWidth,offset=0pt,strut=no] \showgrid \starttext \ \blank \bTABLE \bTR \bTD\CellContent{Axxx}\eTD \bTD\CellContent{yyyy} \eTD \bTD\CellContent{first entry with \\ more text}\eTD \bTD\CellContent{zzz} \eTD \eTR \bTR \bTD\CellContent{Bxxx} \eTD \bTD\CellContent{fff}\eTD \bTD\CellContent{next entry} \eTD \bTD\CellContent{zzz}\eTD \eTR \bTR \bTD\CellContent{Axxx}\eTD \bTD\CellContent{foo \\ boo \\ coo \\ doo} \eTD \bTD\CellContent{\input ward }\eTD \bTD\CellContent{zzz} \eTD \eTR \eTABLE \stoptext 1) there are extra spaces between rows that i don't manage 2) i think to avoid \CellContent every \bTD\..\eTD (re-reading core-ntb) luigi