computersci.org
Print     Recent Changes     Search    
Home




LaTeX Reference Manual


Typefaces

« Text Boxes | Table of Contents | Parameters »
The typeface is specified by giving the “size” and “style”. A typeface is also called a “font”.

Styles

There are two basic methods for changing the font styles in LaTeX One is the old method of using the predefined font attributes commands (i.e. \rm, \em, etc). The other is the use of new commands for changing a specific attribute of a given font.

Font Changing

LaTeX has added new commands for selecting the font used for text in the document. These new commands allow the changing of a single font attribute: family, series, and shape. The following is a description of the commands used in changing font attributes. The new definition of the old La Te X font commands are given in parenthesis.

Font Families

\rmfamily (\rm) - Roman font
\sffamily (\sf) - sans serif font
\ttfamily (\tt) - typewriter font

Font Series

\bfseries (\bf) - boldface
\mdseries - medium

Font Shape

\upshape - normal
\itshape (\it) - italics
\slshape (\sl) - slanted
\scshape (\sc) - small caps

These declaration forms are cumulative; i.e., you can say \sffamily\bfseries to get sans serif boldface. You can also use the environment form of the declaration forms; e.g. \begin{ttfamily}…\end{ttfamily}.

Command Forms

These commands are used like \textit{italics text}. The corresponding command in parenthesis is the “declaration form”, which takes no arguments. The scope of the declaration form lasts until the next type style command or the end of the current group. The following is a list of the typeface styles available in La Te X:

\textrm (\rmfamily)
Roman.
\textit (\itshape)
Italics.
\emph
Emphasis (toggles between \textit and \textrm).
\textmd (\mdseries)
Medium weight (default). The opposite of boldface.
\textbf (\bfseries)
Boldface.
\textup (\upshape)
Upright (default). The opposite of slanted.
\textsl (\slshape)
Slanted.
\textsf (\sffamily)
Sans serif.
\textsc (\scshape)
Small caps.
\texttt (\ttfamily)
Typewriter.
\textnormal (\normalfont)
Main document font.
\mathrm
Roman, for use in math mode.
\mathbf
Boldface, for use in math mode.
\mathsf
Sans serif, for use in math mode.
\mathtt
Typewriter, for use in math mode.
\mathit
Italics, for use in math mode, e.g. variable names with several letters.
\mathnormal
For use in math mode, e.g. inside another type style declaration.
\mathcal
Calligraphic letters, for use in math mode.

Sizes

The following standard type size commands are supported by LaTeX

The commands as listed here are “declaration forms”. The scope of the declaration form lasts until the next type style command or the end of the current group.

You can also use the environment form of these commands; e.g. \begin{tiny}…\end{tiny}.

 \tiny
 \scriptsize
 \footnotesize
 \small
 \normalsize (default)
 \large
 \Large
 \LARGE
 \huge
 \Huge

Low-Level Font Commands

These commands are primarily intended for writers of macros and packages. The commands listed here are only a subset of the available ones. For full details, you should consult Chapter 7 of The LaTeX Companion.

\fontencoding{enc}
Select font encoding. Valid encodings include OT1 and T1.
\fontfamily{family}
Select font family. Valid families include, among others:
cmr for Computer Modern Roman
cmss for Computer Modern Sans Serif
cmtt for Computer Modern Typewriter
\fontseries{series}
Select font series. Valid series include, among others:
m - Medium (normal)
b - Bold
c - Condensed
bc - Bold condensed
bx - Bold extended
\fontshape{shape}
Select font shape. Valid shapes are:
n Upright (normal)
it Italic
sl Slanted (oblique)
sc Small caps
ui Upright italics
ol Outline
The two last shapes are not available for most font families.
\fontsize{size}{skip}
Set font size. The first parameter is the font size to switch to; the second is the \baselineskip to use. The unit of both parameters defaults to pt. A rule of thumb is that the baselineskip should be 1.2 times the font size.
\selectfont
The changes made by calling the four font commands described above do not come into effect until \selectfont is called.
\usefont{enc}{family}{series}{shape}
Equivalent to calling \fontencoding, \fontfamily, \fontseries and \fontshape with the given parameters, followed by \selectfont.



« Text Boxes | Table of Contents | Parameters »

Page last modified on February 24, 2009, at 12:34 PM