TransWikia.com

Is there a collision between lmodern and mathptmx?

TeX - LaTeX Asked on March 8, 2021

I have realized that in my document there are multiple fonts loaded:

usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage[nomath]{lmodern} % first = lmodern
usepackage{amsmath,amssymb} 
usepackage{mathptmx} % second = Times
usepackage{mathtools} 

My question is: Is there a collision between these two? I found that generally the second font loaded overwrites the first one, but not always. Currently I am not sure if my document is created in Times or lmodern.

One Answer

As you load mathptmx as second it will set the roman (serif) font. You can check this with

documentclass[]{article}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage[nomath]{lmodern} % first = lmodern
usepackage{amsmath,amssymb}
usepackage{mathptmx} % second = Times
usepackage{mathtools} 
begin{document}
 aaaaaaaaa
end{document}

The log-file will show at the end a times font:

    /texmf-dist/fonts/type1/urw/times/utmr8a.pfb

The sans serif font and the mono font will be from lmodern.

Correct answer by Ulrike Fischer on March 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP