How do I switch from the default Computer Modern for text and math to Latin Modern for text and Latin Modern Math for math?
In the preamble I put \usepackage{lmodern}
to switch to Latin Modern for text. But what should I add to the preamble so that the document uses Latin Modern Math for math?
The Latin Modern Math download page seems to be for downloading the font for use with MS Word or Adobe or something.
Best Answer
If you use
pdflatex
, then justwill completely replace Computer Modern with Latin Modern for text and math, because its code is
However, when used in combination with
amsmath
it has a problem: withamsmath
(and no font package), thelargesymbols
font is scalable, but withlmodern
it becomes fixed size.Minimal example:
If you uncomment the
\usepackage{lmodern}
line you getwhich is unacceptable. The usage of a fixed font size for
largesymbols
has other nasty consequences, so I recommend adding\usepackage{fixcmex}
(that was written exactly for solving this problem). It will revert thelargesymbols
font to Computer Modern, preciselycmex10
and other sizes, butlmex10
is a straightforward copy ifcmex10
, so there will be essentially no difference.Don't load
lmodern
if you're using XeLaTeX or LuaLaTeX. If you use these engines, the default font is Latin Modern (with Computer Modern for math) even if you don't loadfontspec
; loading alsounicode-math
will use Latin Modern Math.