TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The scenario is as follows. I am working on a paper using the IEEEtran latex class. I am generating some figures using the Matplotlib plotting library in Python. Matplotlib lets the user adjust the font and compile figures with the help of tex so that you can get nice looking fonts in your figure labels which match the font used in the document the figures are going into. What I would like to know though, is what font is the IEEEtran class actually using so that I can configure Matplotlib to use the same font?

I guess this problem generalizes beyond IEEEtran which I happen to be using. Short of eyeballing a font, is there a reliable way to determine which font is being used at a given point in a document? I'm guessing the font can be overridden in any one of a million possible places, so I'm really interested in knowing whether there is a generalized solution that isn't "read through the manual of whatever class files/other files you're using until you figure it out". Is there a command I can put inline in the middle of a paragraph or something that will tell me the font details in the current context?

share|improve this question
Export your data to pgfplots and you don't need to tweak anything at all. – percusse Apr 20 '13 at 6:45
@percusse I have complex plots generated in matplotlib - I'd rather not learn yet another plotting library just for the sake of figure insertion. – Bryce Thomas Apr 20 '13 at 8:34
We'll talk again when IEEE sends back the article for the final proof :) – percusse Apr 20 '13 at 8:38
up vote 8 down vote accepted

To show the font at the current point you can use


TeX will stop as if for an error message (just hit return and it will carry on) the message will look something like

> \OT1/cmr/m/n/10 .
<recently read> \font 

which means classic (OT1) font encoded computer modern roman (cmr) medium weight (m) normal shape (n) 10pt (10) font.

Alternatively (or as well) you can use


In which case you get (in this document)

> \OT1/cmr/m/n/10=select font cmr10.
<inserted text> \OT1/cmr/m/n/10 

which tells you that the actual font metric file is cmr10.tfm That possibly more closely corresponds to the font name to use in other applications.

share|improve this answer

To answer your first question, IEEEtran class uses times.sty, i.e.

  • Times for \textrm
  • Helvetica for \textsf
  • Courier for \texttt
share|improve this answer

you should create a MWE with the IEEE class. The resulted pdf can be analyzed with pdffonts (on Linux). In a MWE, not so much fonts should be included. Not the smartest way, but hopefully a step to solve the issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.