Hey!
I have figured out that I can do this to set the font for “raw” text:
#show raw: set text(font: "PT Mono", size: 8pt)
However, this also sets the font for “inline” raw text, i.e. `this`, not just:
```
this
```
Can I somehow set the fonts differently for these two?
Thanks!
sijo
2
Hi, welcome to the forum! Please note that you can put your Typst code in a markdown code block to format it properly (see here for more information.)
To answer your question, you can write a rule that only affects raw blocks by writing
#show raw.where(block: true): set text(font: "PT Mono", size: 8pt)
1 Like
Thank you for the quick reply and answer!
I have edited my question to use a code block. Ironic that I left that out considering my question.
Thanks!
1 Like
Andrew
4
To enable syntax highlighting you need to add typ
to the right of the first there ```.
1 Like