0

In LaTex, I could do something like:

\newcolumntype{C}[1]
{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\newcolumntype{L}[1]
{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\newcolumntype{R}[1]
{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\begin{longtabu} to \linewidth
  {R{3cm} | X[l] | L{2cm}}
  ...
\end{longtabu}

and, as a result, the central column would take what's left of the page after right and left columns are forced to occupy fixed width. How to do the same in ConTeXt?

  • propably off topic but isn't there a way to set the middle column width to something like \dimexpr\linewidth-3cm-2cm\relax? – user4686 Nov 18 '13 at 17:26
2

I don't exactly know what the longtable macros do. I am guessing what you want, and here is one alternative.

\startsetups table:align
  \setupTABLE[column][1][width=3cm, align=flushright]
  \setupTABLE[column][2][width=broad, align=middle]
  \setupTABLE[column][3][width=2cm, align=flushleft]
\stopsetups

\starttext

\startTABLE[setups={table:align}]
  \NC One \NC \input ward \NC Two \NC \NR
\stopTABLE

\stoptext

which gives

enter image description here

  • Can this be used with tables, a multi-page table? – Alexander Shukaev Nov 18 '13 at 20:15
  • Oh, I've just noticed that tables are deprecated, and that TABLE is recommended. Can you confirm that? Do you recommend me to go with TABLE for a multi-page table? – Alexander Shukaev Nov 18 '13 at 20:23
  • 1
    Yes. You need to add \startTABLE[split=yes] for multipage tables. The only drawback of using TABLE for multi-page tables is that the table only splits at the end of a row; it is not possible to split a table inside a row. – Aditya Nov 18 '13 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.