5

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}

enter image description here

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

enter image description here

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?

4
  • 1
    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
    Commented Apr 12, 2015 at 3:23
  • Worked perfectly. A stupid question follows: 'Where are these font codes, e.g. phv, cmss defined in Latex documentations?'
    – sherlock
    Commented Apr 12, 2015 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
    Commented Apr 12, 2015 at 3:38
  • 1
    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
    Commented Apr 12, 2015 at 3:41

1 Answer 1

4

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:

enter image description here

For comparison, this is what one gets without scaling:

enter image description here

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.

3
  • 1
    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.
    – sherlock
    Commented Apr 12, 2015 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
    Commented Apr 12, 2015 at 4:53
  • Thanks for that answer, and rightly pointed out: I've been half-heartedly looking for a solution to this issue for quite a while, and I'm also wondering why this hasn't been fixed right away in IEEEtran, a style that I actually quite like? It seems fixable to me without any latent incompatibilities.
    – mfg
    Commented Sep 1, 2020 at 9:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .