# Computer Modern Roman in Mathematica 8.0

What should be command for font style "Computer Modern Roman" in Mathematica, as the default font style of LaTeX is "Computer Modern Roman". Tried this

Plot[z^2, {z, 0, 1},
PlotLabel ->
StyleForm[z^y, FontFamily -> "CMUSerif-Italic",
FontSlant -> "Plain", FontSize -> 20]]


However when saved as .eps and used in .tex file, the generated figure in .pdf was having font of "Times"

• What have you tried? Have you installed the font for your operating system already? Have you looked up how to change fonts in Mathematica? – Szabolcs Mar 2 '15 at 23:50
• did not find any suitable example yet. However the tried one is mentioned in edited version of question. – zenith Mar 3 '15 at 0:02

Personally I installed the Latin Modern font for this, which is an OpenType-packaged version of the same font face.

When we set the font in Mathematica using the FontFamily option, we need to use the font name that the operating system uses, not the filename of the font. You can find this by looking at a font chooser dialog in any application.

Example:

The "matex" part is just some package I'm working on to use LaTeX typesetting in Mathematica ;-)
Update: MaTeX is released now.

For this specific font I needed to use the name Latin Modern Roman. Take a look at any font chooser to find out what is the correct name for the font you installed. Note that the same font may show up under different names on different operating systems.

• Would you mind sharing matex? I'm very interested in that. – xslittlegrass Mar 3 '15 at 4:57
• @xslittlegrass All in due time :) I need time to clean it up and add error checking. You'll be the first to know. – Szabolcs Mar 3 '15 at 16:58
• @Szabolcs Thank u for the detailed reply. A curiosity: Why there is need of Latin Modern Roman Package? – zenith Mar 4 '15 at 0:14
• @zenith There's no need for it. I'm trying to say that you need to use the correct font name. I'm pretty sure CMUSerif-Italic is not the correct font name. Maybe it's the file name, not the font name. So check what is the correct font name and use that. – Szabolcs Mar 4 '15 at 0:40
• @Sczabolcs Alright. Thank you for the explaination – zenith Mar 4 '15 at 9:37

You can install CMU font set here and this answer shows how to change the base font in the stylesheet editor. I did it and it looks fine on my system:

• @M Thank you. For Mac systems?? – zenith Mar 4 '15 at 0:19
• yes, this is on a Mac running yosemite – M.R. Mar 4 '15 at 0:27