LaTeX Font Customization Summary

Introduction to LaTeX Font Customization

LaTeX typically chooses fonts and sizes based on document structure, but you can manually customize them. This guide covers font sizes, families, and styles.

---

Font Sizes

LaTeX font sizes are relative and identified by special names. For example, {\tiny ...} produces very small text, while {\huge ...} creates very large text. Here's a quick reference:

Command Output Example
{\tiny 123}123
{\scriptsize 123}123
{\footnotesize 123}123
{\small 123}123
{\normalsize 123}123
{\large 123}123
{\Large 123}123
{\LARGE 123}123
{\huge 123}123
{\Huge 123}123
---

Font Families

The default LaTeX text style is typically a Roman (upright) serif font. You can change font families using specific commands or switches:

  • **Commands** (for specific text): Use commands like \texttt{...} for typewriter font.
  • **Switches** (for continuous text): Use commands like \sffamily to change the font from that point onward until another switch is used.

You can also set a default font family for your entire document:

\renewcommand{\familydefault}{\sfdefault} % for sans-serif
\renewcommand{\familydefault}{\rmdefault} % for roman (serif)
---

Font Styles

Beyond common bold and italics, LaTeX offers various font styles. These can be applied with commands for specific text or switches for continuous text:

Command Switch Output Example
\textmd{Sample Text}\mdseriesSample Text 0123
\textbf{Sample Text}\bfseriesSample Text 0123
\textup{Sample Text}\upshapeSample Text 0123
\textit{Sample Text}\itshapeSample Text 0123
\textsl{Sample Text}\slshapeSample Text 0123
\textsc{Sample Text}\scshapeSample Text 0123

To return to the "normal" (default) font style, use \textnormal{...} or the \normalfont switch.

Comments

Popular Posts