edit this page - page history - about editing

Changing the Default Font for the Report documentclass in Latex


I've spent the last five hours trying to format my Latex document; in particular, trying to get a \documentclass{report} to all be in the Times font.

This is because using something like
does nothing (i.e. it does not select times, as it does for {article} and other document classes).

After an incredible amount of searching, and being inspired by this blog post and this reference, the solution is to add this before your \begin{document}:

\usepackage{mathptmx} % - sets \rmdefault to 'ptm', i.e. times
\renewcommand{\familydefault}{ptm} % using \rmdefault here doesn't work

This changes all fonts (headings, equations, bibliography references) to the times font. A list of all of the magic font codes can be found at Latex Font Catalogue.

I also noticed that when I managed to change fonts, my bibliography style - IEEEtran - did not correctly use the new default font for its URLs. However, the correct font is still used elsewhere in the document. Thus, I had to disable using IEEEtran.
Categories: Latex
edit this page - what links to here? - page history - top
Last edited by jevon jevon 111 months ago