Document ClassesDifferent fonts in math and text for IEEEconf class

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
jazzgossen
Posts: 26
Joined: Mon Mar 09, 2009 3:19 pm

Different fonts in math and text for IEEEconf class

Post by jazzgossen »

I'm preparing an IEEE conference paper, and the math fonts in my document are not the same as in the text, which annoys me.

Consider the following test document

Code: Select all

\documentclass[letterpaper, 10pt, conference]{ieeeconf}
\begin{document}
r$r$\emph{r}
\end{document}
I would expect the last two 'r' characters to look the same, but on my system it looks like the attached screenshot. Is that normal?
Attachments
screenshot4.png
screenshot4.png (548 Bytes) Viewed 10019 times
Last edited by jazzgossen on Thu Mar 17, 2011 12:58 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Different fonts in math and text for IEEEconf class

Post by Frits »

In the common classes (book, article, KOMA, etc), \emph{r} and $r$ are indeed the same fonts. You might want to take a look in the ieeeconf .cls file to check if something regarding this is coded (which probably will be the case, but I'm not familiar with ieeeconf).

Edit: Let's be a bit more precise. The \emph{r} uses the utopia font, while the $r$ uses the the standard LaTeX math font.
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Different fonts in math and text for IEEEconf class

Post by localghost »

Somehow I can't comprehend the problem (see attachment). Supplementing your code with the \listfiles command in the very first line, you will get information about the version of the class and packages. I obtain the following list from the log file. Compare with yours.

Code: Select all

 *File List*
IEEEconf.cls    2009/04/05 v1.4 IEEE Computer Society 8.5x11" conference proceedings
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
geometry.sty    2010/07/13 v5.5 Page Geometry
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
   ifpdf.sty    2010/01/28 v2.1 Provides the ifpdf switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
mathptmx.sty    2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS) 
  helvet.sty    2005/04/12 PSNFSS-v9.2a (WaS) 
 courier.sty    2005/04/12 PSNFSS-v9.2a (WaS) 
   array.sty    2008/09/09 v2.4c Tabular extension package (FMi)
titlesec.sty    2007/08/12 v2.8 Sectioning titles
  ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.
ot1ztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OT1/ztmcm.
omlztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OML/ztmcm.
omsztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMS/ztmcm.
omxztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMX/ztmcm.
 ***********
I assume that it's just a matter of outdated class and packages.


Thorsten
Attachments
The output of the provided code on TeX Live 2010.
The output of the provided code on TeX Live 2010.
IEEEconf-fonts.png (906 Bytes) Viewed 10012 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
jazzgossen
Posts: 26
Joined: Mon Mar 09, 2009 3:19 pm

Different fonts in math and text for IEEEconf class

Post by jazzgossen »

Thanks for the hint about \listfiles. With the provided test document above, I get

Code: Select all

 *File List*
../styles/ieeeconf.cls
  ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.
 ***********
and nothing more. And looking at my "ieeeconf.cls", the comment at the top of the file says "IEEEtran.cls 2002/11/18 version V1.6b". So it probably is an outdated version of the class, even though it is the file that's officially supplied by the conference. I'll look for "IEEEconf.cls 2009/04/05 v1.4" instead to see if that looks better.
jazzgossen
Posts: 26
Joined: Mon Mar 09, 2009 3:19 pm

Different fonts in math and text for IEEEconf class

Post by jazzgossen »

Update:
I shouldn't actually use the current IEEEconf class, but rather
\usepackage[conference]{IEEEtran}
After using that and installing the IEEEtran version of Ubuntu 10.04, I get the following output from \listfiles:

Code: Select all

 *File List*
IEEEtran.cls    2007/03/05 V1.7a by Michael Shell
  ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.
 ***********
and the font selection is still the same as before.

If I do use the current IEEEconf, the fonts are as I think they should, but the overall formatting is completely different.

So maybe the problem is just that the conference (IROS) provides a poor style file.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Different fonts in math and text for IEEEconf class

Post by localghost »

I have built a complete example as shown below.

Code: Select all

\listfiles
\documentclass[12pt,letterpaper,conference]{IEEEtran}

\begin{document}
  r$r$\emph{r}
\end{document}
Processing this with PDFLaTeX leaves me with the same result as you described. The file list looks like the one you got.

Code: Select all

 *File List*
IEEEtran.cls    2007/03/05 V1.7a by Michael Shell
  ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.
 ***********
Looking at the fonts of the resulting PDF I obtain the following.

Code: Select all

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
OYEIID+NimbusRomNo9L-Regu            Type 1            yes yes no       4  0
CLHIQO+CMMI12                        Type 1            yes yes no       5  0
MXFINE+NimbusRomNo9L-ReguItal        Type 1            yes yes no       6  0
The Computer Modern (CM) in 12pt size is used for the math expression. The text font is Nimbus Roman 9L (a clone of Times New Roman). Adding the txfonts package has the result shown in my first reply.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
jazzgossen
Posts: 26
Joined: Mon Mar 09, 2009 3:19 pm

Different fonts in math and text for IEEEconf class

Post by jazzgossen »

localghost wrote: Adding the txfonts package has the result shown in my first reply.
Perfect! That's it!
Post Reply