90

If I want to apply the courier font to a small piece of text in my file, how can I do that? I have searched around but can't seem to find information for the courier font.

Joeblackdev
  • 1,135

2 Answers2

118

Use the courier package. Consequently, the minimal example

\documentclass{article}
\usepackage{courier}
\begin{document}
This is not Courier font. \texttt{This is Courier font.}
\end{document}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

produces

Courier font in LaTeX

There is a marginal difference between the output generated via \texttt{...} with/without the courier package:

  • Without courier package:

Typewriter font in LaTeX

  • With courier package:

Courier font in LaTeX

Werner
  • 603,163
57

Is \texttt{} what you are looking for?

\documentclass{article}

\begin{document}
Here is some \texttt{fixed width} text.
\end{document}
Peter Grill
  • 223,288
  • 5
    There is a difference between the output generated via \texttt{...} to what is produced when using the courier package. – Werner Aug 03 '11 at 20:47
  • 26
    Even though there's a difference, Peter's answer is a good addition. Most viewers, like me, come here for the \texttt option as it is difficult to ask Google the question relevant to \texttt. – Shashank Sawant Jun 06 '14 at 04:09