[NTG-context] Auto width and height on table cells

Pablo Rodriguez oinos at gmx.es
Thu Jun 30 16:15:10 CEST 2022


On 6/30/22 09:46, Angel M Alganza via ntg-context wrote:
> [...]
> How about the auto row height?  That'd be the only thing I'm missing.

Hi Ángel,

I’m not sure whether I’m totally missing your point, but I think this is
a way that might achieve what you want:

  \starttext
  \showframe
  \startbuffer
  row\currentxtablerow--col\currentxtablecolumn
  \stopbuffer
  \startbuffer[table]
  \startxtable[option={stretch, height}, align={lohi, middle}]
      \startxrow
          \startxcell[width=3cm, option=fixed]\inlinebuffer\stopxcell
          \dorecurse{5}
            {\startxcell\inlinebuffer\stopxcell}
      \stopxrow
      \startxrow
          \startxcell[height=3cm, option=fixed]\inlinebuffer\stopxcell
          \dorecurse{5}
            {\startxcell\inlinebuffer\stopxcell}
      \stopxrow
      \dorecurse{5}
      {\startxrow
          \dorecurse{6}
            {\startxcell\inlinebuffer\stopxcell}
      \stopxrow}
  \stopxtable
  \stopbuffer
  \getbuffer[table]
  \page
  \setuppapersize[A3, landscape]
  \getbuffer[table]
  \stoptext

Just in case it helps,

Pablo


More information about the ntg-context mailing list