Joel via ntg-context schrieb am 25.10.2022 um 02:35:
I have a simple tabulate environment like this:

\starttext

\starttabulate[|p(.45\textwidth)|cp(.1\textwidth)|p(.45\textwidth)|]
             \NR
                 \HL
                 \NC Cause    \NC \NC Effect    \NC\NR
                 \HL
                 \NC            \NC \NC            \NC\NR
  \NC   text a         \NC text b \NC       \input knuth     \NC\NR %<-- vertically center this row
                 \HL
             \NR
         \stoptabulate


\stoptext

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?

Use natural or extreme tables.

\starttext

\startxtable[frame=off,topframe=on,bottomframe=on]
    \startxrow
        \startxcell[width=.45\textwidth]
            Cause
        \stopxcell
        \startxcell[width=.1\textwidth]
            % empty cell
        \stopxcell
        \startxcell[width=.45\textwidth]
            Effect
        \stopxcell
    \stopxrow
    \startxrow[align={flushleft,lohi}]
        \startxcell
            text a
        \stopxcell
        \startxcell
            text b
        \stopxcell
        \startxcell
            \input knuth
        \stopxcell
    \stopxrow
\stopxtable

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to