LaTeX - Text formatting

October 2016

Text Style

The following commands allow you to change the text style:

\textbf{text} write text in bold.

\textit{text} write text in italics.

\textsc{text} set text in small caps.

\textrm{text} use the Roman font

\textsf{text} use the Sans serif font

Font size

LaTeX also has commands to change the size of the characters, that is to say the font size:
  • \tiny
  • \scriptsize
  • \footnotesize
  • \small
  • \normalsize
  • \large
  • \Large
  • \LARGE
  • \huge
  • \Huge


It is also possible to force the layout of the document using line breaks, page breaks and spacing commands:


\newpage allows you to start a new page
\hspace{size} add an horizontal space
\vspace{size} add a vertical space

Where size can be expressed in mm or cm.

Note that: The space created can be a compressed by LaTeX to fit in the overall layout. It you don't want LaTex to compress the empty space, add an asterisk to the command:


Text presentation

The presentation of the text can also be enhanced through the itemize, enumerate and description environments. The following examples demonstrate their use:

The above code gives the following result:

Text Color

It is possible to assign a color to the text using the color (\usepackage{color}) environment.
  • \textcolor{color}{text} assign a specific color to text.
  • \colorbox{color}{text} displays text on a colored background.
  • \fcolorbox{color of border}{background color}{text} creates a frame around the colored background.
  • \pagecolor{color} assigns a background color to the page.

LaTeX offers eight preset colors:
  • black
  • white
  • red
  • green
  • blue
  • cyan
  • magenta
  • yellow

New colors can be set using the following commands:
  • \definecolor{name of new color}{rgb}{red value, green value, blue value} 
  • \definecolor{cmyk}{cyan, magenta, yellow, black}) :

Examples of colors:


Original document published on

Related :

This document entitled « LaTeX - Text formatting » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.