0

I cannot eliminate the space before a heading. I’ve tried adding all variants of before=\nowhitespace, but I was unsuccessful. Minimal example:

\showframe
\setuppapersize[S33]
\setuphead [title] [style=\bfd]

\starttext
  % This text touches the top border
  {\bfd Foobar}

  % This text has a small space above
  \starttitle[title=Foobar]
  \stoptitle
\stoptext

Notice the small gap above the text on the second page. With bigger text sizes and different fonts, this can be very noticeable.

rendered PDF

1 Answer 1

2

ConTeXt inserts a strut by default. You have to disable it using strut=no

\showframe
\setuppapersize[S33]
\setuphead [title] [strut=no,style=\bfd]

\starttext
  \starttitle[title=Foobar]
  \stoptitle
\stoptext

enter image description here

4
  • Thanks! Although actually, that behaviour is quite useful – could I set the normal text to use a strut also? Jan 3, 2021 at 13:31
  • 1
    @JurajFiala Doesn't grid typesetting do that job? If you want to arbitrarily insert a strut somewhere, there's TeX's \strut. Let me know if I understood well.
    – user226564
    Jan 3, 2021 at 13:34
  • Yes, I guess grid typesetting is the way to go. Jan 3, 2021 at 13:45
  • 1
    Just a note for anyone wondering – the get \strut to scale, I had to use \setupstrut after the font change. Jan 3, 2021 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .