I need to change the font from lmodern to Times belonging to newtx package.
Started with this MWE
\documentclass{minimal}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\input{glyphtounicode}
\pdfgentounicode=1
\usepackage[centertags,intlimits,namelimits,sumlimits]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\(f \colon \mathbb{R} \to \mathbb{R}\) such that
\begin{align*}
f(25) &= f(5^2) \\
&= f(3^2 + 4^2) \\
&= f(3) + f(4)
\end{align*}
\end{document}
...and got to this MWE
\documentclass{minimal}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\input{glyphtounicode}
\pdfgentounicode=1
\usepackage{newtxtext}
\usepackage[centertags,intlimits,namelimits,sumlimits]{amsmath}
\usepackage{newtxmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\(f \colon \mathbb{R} \to \mathbb{R}\) such that
\begin{align*}
f(25) &= f(5^2) \\
&= f(3^2 + 4^2) \\
&= f(3) + f(4)
\end{align*}
\end{document}
The latter does not compile successfully (but it did last year on March 18, with the following versions: newtxtext 2018/03/27 v1.531, newtxmath 2018/05/15 v1.553, amsmath 2018/12/01 v2.17b AMS math features, amsfonts 2013/01/14 v3.01 Basic AMSFonts support, amssymb 2013/01/14 v3.01 AMS font symbols):
amssymb.sty:261: LaTeX Error: Command `\Bbbk' already defined.
Putting a comment on \usepackage{amssymb} resolves the issue, but there are few remarks on using newtxtext and newtxmath along with AMS stuff in newtx manual which I probably misinterpret.
- In general, how can I shift to
newtxstill using features that I used to have withlmodern? - Is there a better way of setting
amsmathoptions? Note the somewhat weird order ofnewtxtext,amsmathandnewtxmath.
Regards
minimalfor tests, unless you're testing package loading options. Not for documents to be typeset. – egreg Feb 01 '20 at 13:37Bookas well. – ivankokan Feb 01 '20 at 13:42newtxmathafter rather than beforeamssymb. But then, as @egreg has pointed out in his answer, you needn't loadamssymbto begin with, since all the symbols defined byamssymbare also defined bynewtxmath. – Mico Feb 01 '20 at 13:46lmodernif loadingnewtxtext(as the answers do). – Davislor Feb 02 '20 at 08:49unicode-mathand set the math font toTeX Gyre Termes Math, a clone ofnewtx. – Davislor Feb 02 '20 at 08:49