How do I set text size based on context?

I feel like a similar question to this must have already been answered in this forum, but I couldn’t find anything, so I apologize if indeed there was one.

In my document, the raw font seems a bit smaller than the normal text font, despite being the same size in pt. Therefore, I tried something like this:

#set text(size: 10pt)
#show raw: set text(size: 11pt)

This works on normal text as expected to get a similar “optical size”; however, in footnotes the text itself is smaller (say, 9pt) but the raw block is still 11pt due to the #show rule above.

How can I set the raw text size depending on the “context”? Optimally, I would want to set the raw size to be 1pt above the current normal text size. Can I do that?

That’s what the em unit is for.

#show raw: set text(size: 1em + 1pt)

You could also set the size to something like 1.1em.

2 Likes

This? You can #show raw: set text(size: 1.25em) to cancel it.

2 Likes

Thank you all!

1 Like