# How to change the sans serif font used by IEEEtran document class

The sans serif fonts used by article and IEEEtran document classes clearly differ. Below are two MWEs and corresponding outputs.

\documentclass[10pt]{article}
\begin{document}
\textsf{The quick brown fox jumps over the lazy dog}
\end{document}


\documentclass[10pt]{IEEEtran}
\begin{document}
\textsf{The quick brown fox jumps over the lazy dog}
\end{document}


To me, the sans-serif font used by article class looks more aesthetically pleasing. Is there any means by which I can use the same font for IEEEtran, too?

• By default, the article class uses Computer Modern Sans -- code: cmss -- whereas the IEEEtran class uses Helvetica -- code: phv. (Note that the IEEEtran class uses Times Roman as the main text font.) To switch from Helvetica to Computer Modern Sans, you'll need to execute the instruction \renewcommand{\sfdefault}{cmss}. – Mico Apr 12 '15 at 3:23
• Worked perfectly. A stupid question follows: 'Where are these font codes, e.g. phv, cmss defined in Latex documentations?' – Holmes.Sherlock Apr 12 '15 at 3:27
• Under pdf(La)TeX, the font name codes are based mainly on the "Berry" naming scheme; type texdoc fontname at a command prompt to learn much more about this scheme; section 2 of the document is particularly relevant. If one uses Xe(La)TeX and/or Lua(La)TeX along with the fontspec package, it's possible (and highly preferable...) to use the names provided by the font files themselves. – Mico Apr 12 '15 at 3:38
• Note that if you are submitting this to a journal or conference and have been told to use this class, you should not redefine the fonts. You will just annoy people. If that's not why you're using it, well, you are probably better off with a more flexible class. – cfr Apr 12 '15 at 3:41

As I noted in an earlier comment, the IEEEtran document class uses Helvetica ("Berry" fontname code: phv) for sans serif material, along with Times Roman ("Berry" code: ptm) as the main text font.

To switch to Computer Modern Sans Serif (the default sans font used by the article class), you could issue the command

\renewcommand{\sfdefault}{cmss}


in the preamble.

However, as @cfr has already pointed out in a comment, if you're using the IEEEtran class to submit a paper to a conference, a proceedings volume, etc., changing the default sans serif family will likely annoy editors and conference organizers.

I can suggest a middle way, which is based on the observation that Times and Helvetica have very different x-heights and thus don't harmonize very well unless one or the other font is re-scaled. A way to alleviate the scaling problem is to issue the command

\usepackage[scaled=0.88]{helvet}


in the preamble. That way, Helvetica is scaled down 12%, making it stand out much less when interspersed among Times-based text:

For comparison, this is what one gets without scaling:

Whichever route you choose, do be sure to point out to editors and others that you've modified at least some aspects of the sans-serif font used in your document.

\documentclass{IEEEtran}
\usepackage[scaled=0.88]{helvet}  % comment out this instruction to suspend scaling
\begin{document}
The \textsf{quick} brown \textsf{fox} jumps \textsf{over} the \textsf{lazy} dog.
\end{document}


Aside: I don't know why the creator(s) of the IEEEtran document class didn't incorporate at least some scaling of Helvetica. After all, the issue of Times and Helvetica not getting along all that well unless they're rescaled has been around for many years.

• Thank you for the detailed response. Marked it as accepted answer. Personally I'd love to use cmss font as article class uses. But, you are right in speculating that I'm going to submit it in an IEEE conference. So, I'm refraining from making any aesthetic edits. But, it was good to know about the font-families used by different LaTeX classes. – Holmes.Sherlock Apr 12 '15 at 4:37
• @Holmes.Sherlock - You're welcome! Incidentally, I've taken the liberty of editing your posting a bit, e.g., by adding backticks around LaTeX-specific strings and adding the tag "IEEEtran". – Mico Apr 12 '15 at 4:53