Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Font sizes can be set with (more or less) absolute commands such as \large, \Large, \LARGE, and so on.

Are there also commands that can increase or reduce a font size by some proportion or percentage not in absolute terms but relative to the preceding text?

I am hoping to find a way to do this in the midst of chapter titles, which are set in the preamble to be \LARGE\bfseries. But when a colon appears in a chapter title, followed by a subtitle, I am being asked to reduce the size of the subtitle by just a small amount — and the result of using the absolute \Large is not satisfactory. I could redefine \Large just for this situation, but I'd prefer to find a relative command to change font size, as described above, as that would be useful in many other situations.

share|improve this question
    
You may find this answer useful. –  Brent.Longborough Oct 6 '12 at 9:53
add comment

1 Answer

Thanks to the hint from Brent.Longborough, I found the relsize package, which does what is required.

The package allows relative resizing of fonts: normally, resizing is done to the ten fixed "sizing commands" (\Large etc.). To go to the next whole size up one uses \larger or \relsize{1}, to the next whole size down \smaller or \relsize{-1}.

The interesting thing is that fine control of this kind can be attained with the commands \relscale{〈factor〉} and \text-scale{〈factor〉}{〈text〉}, where 〈factor〉 can be a non-integer decimal number.

In addition, \relsize also accepts a non-integer factor as argument: \relsize{0.8} (not mentioned in the 20030704 documentation).

Examples below, all showing a \LARGE chapter title with the font reduced after the colon:

  • Font reduced using \Large{〈text〉} or \smaller or \relsize{-1}: Example with whole-step-down sizing

  • Font reduced using \relscale{0.9}: Example with fractional <code>\relscale</code>

  • Font reduced using \relsize{-0.8}: Example with fractional <code>\relsize</code>

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.