How to create font sizes and colors for Headers

I want to be able to create different font size for

= font = 16pt, grey, all uppercase
== font = 14pt, black normal case

etc

When I look it up on the site for Header. I keep finding informatin on Header/Footers not on the different header types. Please let

I think you’re looking for “heading” rather than “header”. The docs are available at https://typst.app/docs/reference/model/heading/.

To apply those styles, you can use the following:

#show heading.where(level: 1): it => {
  upper(text(fill: gray, 16pt, it))
}

#show heading.where(level: 2): set text(14pt)
2 Likes

It is not recommended to define show-set rules with closure in between as this restricts some further styling modifications.

#show heading.where(level: 1): set text(16pt, gray)
#show heading.where(level: 1): upper
#show heading.where(level: 2): set text(14pt)

= 16 pt, gray, uppercase
== 14 pt, black, normal case

image

Hi @Mark_Pinsley, don’t forget to tick :ballot_box_with_check: one of the responses if you got a satisfying answer. The answer you choose should usually be the response that you found most correct/helpful/comprehensive for the question you asked. Thanks!