[dev-context] Writing own interface for natural tables

Wolfgang Schuster schuster.wolfgang at googlemail.com
Thu Jan 25 14:16:31 CET 2007


I try currently to write a simplified environment for natural tables
to allow a simmiliar interface like tabulate and the old tables.

My problem ist that i need to save my input in a box feed this into
the \bTD/\eTD pair. This did not work if I collect all my text, put
this text into the tablebox and reuse this box for the next entry.

The follwing example shows my only working solution, it for every new
entry a new box. This works for a few entries untill my created boxes
use the same box number as the internal boxes used in the TABLE
macros.

<example>
\newbox\TABLEbox
\newcount\TABLEcount \TABLEcount\zerocount

\def\bWTD
  {\advance\TABLEcount\plusone
   \setbox\the\TABLEcount\hbox\bgroup}

\def\eWTD
  {\egroup
   \edef\wolf{\unhcopy\the\TABLEcount}
   \expanded{\bTD\wolf\eTD}}

\starttext

\bTABLE
  \bTR
    \bWTD Text 1 \eWTD
    \bWTD Text 2 \eWTD
  \eTR
  \bTR
    \bWTD Text 3 \eWTD
    \bWTD Text 4 \eWTD
  \eTR
\eTABLE

\stoptext
</example>

I hope there is a solution to solve this problem.


MfG

Wolfgang


More information about the dev-context mailing list