How to specify relative font sizes? #2182
Replies: 2 comments 4 replies
-
It still does? This is likely wrong, there's no reason for using a "hard-coded" 3pt smaller font, not depending on what was the original size. ^^ |
Beta Was this translation helpful? Give feedback.
-
The easiest ways is to use relative units. For example the Relative sizes are typically not specified as with an absolute value offset from a relative size. You could do that, but you'd probably need to make a small wrapper function of your own to accomplish it: SILE.registerCommand("three-smaller", function (options, content)
options.size = SILE.types.measurement("1em"):absolute() - SILE.types.measurement("3pt")
SILE.call("font", options, content)
end) Then in your content, you could use |
Beta Was this translation helpful? Give feedback.
-
Looking at the code for the verbatim environment, it sets the font size to the current size - 3 (pt?). I was not able to work out how to write that in the declarative syntax. The manual mentions that you can write things in terms of the page height or width.
Beta Was this translation helpful? Give feedback.
All reactions