I want to set font family Times new roman with font size 24 pt for the title of a paper.
\documentclass[conference]{IEEEtran}
\title{Only this TITLE should be 24pt in Times New Roman font}
How can this font be set?
fontsfontsize
I want to set font family Times new roman with font size 24 pt for the title of a paper.
\documentclass[conference]{IEEEtran}
\title{Only this TITLE should be 24pt in Times New Roman font}
How can this font be set?
Best Answer
Well, classically, you find the TFM file name for the font you want, assign it a control sequence, and then tell TeX what font that control sequence means. E.g.:
You'd then issue
\foo
to start using the fontbar
in whatever size the file provided (in this case, the file name,bar12
, indicates that it's probably a twelve-point font).LaTeX2e made this all much easier with the New Font Selection Scheme (NFSS). Instead, you can select a font in a number of different ways. For example, to select Times:
That will give you this:
The first line is Computer Modern (the default), the second is in Times. The downside of this method is that you need to know the sometimes esoteric font family name; e.g., here Times is
ptm
, which is far from intuitive. (Thep
refers to the foundry, Adobe; thetm
means Times.)For that reason, if you want your whole document set in another font, it's best to use a package designed for that purpose. E.g., for Times, the recommended package is
mathptmx
:This will set your whole document to using Times, including math.
If you're using LuaTeX or one of its progeny, there's an even simpler way using the
fontspec
package. You can use a human-readable name for the font using this system, namely whatever name the font uses on your computer. To find out what those names are, runluaotfload-tool --update
and thenluaotfload-tool --list=*
. This will give you a list of all the fonts on your system that LuaTeX knows about. So for my system, I found an easily-recognized one (Roboto Medium) and did this:And got this:
The
fontspec
documentation will tell you lots more; this is really a very powerful package. Be sure, when usingfontspec
, that you compile withlualatex
, notpdflatex
, or it simply won't work;fontspec
's ability to use any system font is limited toluatex
-based systems.