[Tex/LaTex] Font used by revtex

fontsrevtex

Hello I haven't been able to find the font used by revtex4-1 prb. I want to use it in some plots in matplotlib. Can somebody help me find it?

BTW: I tried the solution \show\the\font but didn't do anything

Best Answer

I took an article from Phys. Rev. B without images, so that there are no extra fonts embedded from those. For example this one: https://journals.aps.org/prb/abstract/10.1103/PhysRevB.87.134510

Then I run pdffonts on the file and get

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
JHKIEA+Times-Roman                   Type 1C           MacRoman         yes yes no     523  0
JHKIEB+Times-Bold                    Type 1C           WinAnsi          yes yes no     525  0
JHKIFB+Times-Italic                  Type 1C           WinAnsi          yes yes no     527  0
JHKIFC+MTMI                          Type 1C           Custom           yes yes yes    530  0
JHKIJC+MTSY                          Type 1C           Custom           yes yes yes    266  0
JHKIKD+MTEX                          Type 1C           Custom           yes yes yes    269  0
JHKIKE+CMSY10                        Type 1C           Custom           yes yes yes    272  0
JHKILE+MTSYB                         Type 1C           Custom           yes yes yes    275  0
JHKINE+MSAM10                        Type 1C           Custom           yes yes no     278  0

As you can see from these codes, the fonts used are

  • Times
  • Mathtime Pro
  • Computer Modern (for the \mathcal alphabet)
  • AMS symbol font (amssymb)

Both Times and Mathtime Pro are commercial fonts, for which you have to buy a license. Mathtime Pro comes with LaTeX support, but Times you'll probably get as TTF which you would have to convert for LaTeX use (or use Lua/XeLaTeX).

If you are fine with using a close-enough clone of these fonts, you might want to take a look at STIX. Matplotlib also supports STIX out-of-the-box without having to process the labels through LaTeX.

import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.rcParams["font.family"] = "serif"
mpl.rcParams["font.serif"] = "STIX"
mpl.rcParams["mathtext.fontset"] = "stix"

plt.title(r"$\int_{-\infty}^\infty \sum_{n=0}^N \sin\left[\exp\left(\frac{\alpha \xi}{\nabla}\right)\right] \blacksquare$")
plt.plot([1,2,3],[1,2,3],label="Some text")
plt.legend()
plt.savefig("test.png")

enter image description here

Related Question