Open main menu

In LaTeX

\documentclass{article}
\begin{document}
a box with a table:
\fbox{\begin{tabular}[c]{l}1\\2\\3\end{tabular}}\par
a midaligned parbox: \parbox[c]{1em}{1 2 3}
\end{document}

In ConTeXt: ???

Please note that this is only my suggestion. I believe there must be an easier way too!

For the first box:

\setupTABLE[frame=off]
\setupTABLE[c][1,2][align=lohi]
\bTABLE
\bTR\bTD
	a box with a table:
\eTD\bTD[frame=on]
	{\bTABLE[frame=off]
	\bTR\bTD 1 \eTD\eTR
	\bTR\bTD 2 \eTD\eTR
	\bTR\bTD 3 \eTD\eTR
	\eTABLE}
\eTD\eTR
\eTABLE

or

a box with a table: \vcenter{\framed{
\bTABLE[frame=off]
	\bTR\bTD 1 \eTD\eTR
	\bTR\bTD 2 \eTD\eTR
	\bTR\bTD 3 \eTD\eTR
\eTABLE}}

It works on older ConTeXt distributions, here it seems to be broken:

 

The second box should be possible to typeset as

\setupTABLE[frame=on]
\setupTABLE[c][1,2][align=lohi]
\bTABLE
\bTR\bTD
    a midaligned parbox:
\eTD\bTD[offset=0pt,width=1em]
    1 2 3
\eTD\eTR
\eTABLE

but it doesn't work: