[NTG-context] How to make a row of text have vertical centering in tabulate environment?
Pablo Rodriguez
oinos at gmx.es
Tue Oct 25 18:16:08 CEST 2022
On 10/25/22 02:35, Joel via ntg-context wrote:
> I have a simple tabulate environment like this:
> [...]
> I'd like to vertically center the content in the one marked row. By
> default, they seem to place each cell aligned to the top, but how can I
> adjust them vertically so the text is vertically centered just in
> specific rows?
Hi Joel,
I have no experience with tabulates, but I wouldn’t be surprised if they
didn’t support vertical alignment.
You can achieve that with xtables:
\starttext
\startxtable[frame=off, option={stretch, width}]
\startxrow[topframe=on, bottomframe=on]
\startxcell[nx=2]
Cause
\stopxcell
\startxcell
Effect
\stopxcell
\stopxrow
\startxrow[bottomframe=on]
\startxcell[width=.45\textwidth, align=lohi]
text a
\stopxcell
\startxcell[width=.1\textwidth, align=lohi]
text b
\stopxcell
\startxcell[width=.45\textwidth, align=center]
\input knuth
\stopxcell
\stopxrow
\stopxtable
\stoptext
xtables-mkiv.pdf contains all the details.
Just in case it might help,
Pablo
More information about the ntg-context
mailing list