TransWikia.com

How to get tabulate to expand vertically to fit larger text in ConTeXt?

TeX - LaTeX Asked on April 16, 2021

I used the following text to create a tabulate environment:

definefont[bigfont][name:alegreyasansscextrabold at 50pt]

define[1]maketextbig{{bigfont #1}}

starttext

    starttabulate[|p|p|p|]
        HL
        NC A NC B NC C NCNR
        HL
        NC maketextbig{big text} NC regular text NC regular text NCNR
        NC maketextbig{big text} NC regular text NC regular text NCNR
        NC maketextbig{big text} NC regular text NC regular text NCNR
        NC maketextbig{big text} NC regular text NC regular text NCNR
        HL
    stoptabulate


stoptext

When compiled, the big text smashes together. How can I get the rows to expand, and let the other text in the rows be centered vertically?

One Answer

I think extreme tables are a convenient way to answer your problem. They split nicely accross pages, as requested in your comment.The stretch option is described in extreme tabulars manual. It can be used to make the table use the whole horizontal space.

definefont[bigfont][name:pagella at 50pt]

define[1]maketextbig{{bigfont #1}}

starttext

startxtable [align={middle,lohi},option=stretch]
   startxrow 
      startxcell A
      stopxcell
      startxcell B
      stopxcell
      startxcell C
      stopxcell
   stopxrow
   startxrow 
      startxcell maketextbig{big text}
      stopxcell
      startxcell regular text
      stopxcell
      startxcell regular text
      stopxcell
   stopxrow
   startxrow 
      startxcell maketextbig{big text}
      stopxcell
      startxcell regular text
      stopxcell
      startxcell regular text
      stopxcell
   stopxrow
   startxrow 
      startxcell maketextbig{big text}
      stopxcell
      startxcell regular text
      stopxcell
      startxcell regular text
      stopxcell
   stopxrow
stopxtable

stoptext

compilation output

Correct answer by sztruks on April 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP