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

Pablo Rodriguez oinos at gmx.es
Thu Jun 30 18:44:07 CEST 2022


On 6/30/22 18:10, Angel M Alganza via ntg-context wrote:
> [...]
> No, you aren't, and it almost does it, except when the fixed width
> column is other than the first one, I'm afraid.

Hi Ángel,

there might be a way to get it, as long as you don’t define height
directly, such as in:

 \starttext
  \showframe
  \startbuffer
  row\currentxtablerow--col\currentxtablecolumn
  \stopbuffer
  \startbuffer[table]
  \startxtable[option={stretch, height}, align={lohi, middle}]
      \startxrow
          \dorecurse{5}
            {\startxcell[width=.115\textwidth]\inlinebuffer\stopxcell}
          \startxcell\inlinebuffer\stopxcell
      \stopxrow
      \startxrow
          \dorecurse{5}
            {\startxcell\inlinebuffer\stopxcell}
          \startxcell[offset=1em]\input zapf\stopxcell
      \stopxrow
      \dorecurse{5}
      {\startxrow
          \dorecurse{6}
            {\startxcell\inlinebuffer\stopxcell}
      \stopxrow}
  \stopxtable
  \stopbuffer
  \getbuffer[table]
  \page
  \setuppapersize[A3, landscape]
  \getbuffer[table]
  \stoptext

Again, just in case it helps,

Pablo


More information about the ntg-context mailing list