Command/definebodyfontenvironment

From Wiki
Jump to navigation Jump to search


\definebodyfontenvironment

Summary

The command \definebodyfontenvironment is used to set relative font sizes.

Settings

\definebodyfontenvironment[...][...][...=...,...]
[...]name
[...]default dimension
bigdimension number
smalldimension number
adimension number
bdimension number
cdimension number
ddimension number
textdimension number
xdimension number
xxdimension number
scriptdimension number
scriptscriptdimension number
interlinespacedimension
emslanted italic style command
*number

OptionExplanation
name of the set, can be font dependent, e.g. “modern”
default generally, for all sizes
dimension settings for a specific body font size
interlinespace
Set the interlinespace for a font size, see example.
em
How should \em work? Default is \sl.

Description

Set up font scaling for [tf]a-[tf]d

All size settings accept a number (factor) or a dimension (e.g. a size in pt).

  • a to d, x and xx are used for \tfa\tfxx.
  • small is e.g. used for footnotes.
  • script and scriptscript are used for math.

A default setting looks like:

\definebodyfontenvironment[12pt][
            text=12pt,
          script=9pt,
    scriptscript=7pt,
               x=10pt,
              xx=8pt,
             big=12pt,
           small=10pt,
]

The first argument specifies the bodyfont size to which the settings apply. All second parameters are specified in dimensions and tell us more about related sizes.

Find out about the current settings with \showbodyfontenvironment:


Examples

Define a new relative size

\definefontsize[e]

\definebodyfontenvironment
  [default]
  [b=4,e=10]

This will be {\tfb really} {\bfe Huge}

yields

Instead of default you can also specify the fontsize you’re working with.

Set the interlinespace for a special font size

This is e.g. useful for multi-line titles.

\definebodyfontenvironment[28pt][interlinespace=38pt]

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: