2

I use mtpro2 package in my article for writing math and Times Roman for text. The question is how to use certain Greek letters (like \gamma which I see better in newtxmath) from newtxmath instead of those in mtpro2. Here is a MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\renewcommand{\rmdefault}{ptm}
\usepackage{amsmath,amsfonts}
\usepackage[zswash,lite]{mtpro2}
\usepackage{bm}

\begin{document}

Law of Quadratic Reciprocity:

Some text goes here ...
\begin{equation}
f(z) = 50\sigma \times E_0 e^{-\gamma x} \cos(\omega t-\beta z) \mathbf{a}_x \quad \mathbf{A} + \Gamma
\end{equation}
\end{document}

UPDATE:

For gamma, the problem was solved with the the answer by @egreg below, but for Gamma it wasn't. I tried the following workaround:

\DeclareSymbolFont{newtxletters}{OML}{ntxmi}{m}{it}
\SetSymbolFont{newtxletters}{bold}{OML}{ntxmi}{b}{it}
\DeclareMathSymbol{\Gamma}{\mathord}{newtxletters}{0}

but it gave me the italic version of Gamma. I know that mtpro2 and newtxmath have different (and incompatible) output encodings, but there must be some workaround. Here is my current code:

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{tgtermes}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage[lite]{mtpro2}
\usepackage{bm}

\begin{document}

\[
\gamma \ \bm{\gamma} \ \Gamma \ \bm{\Gamma} 
\]

\end{document}

Which outputs this:

enter image description here

But the required is this:

enter image description here

Thank you.

latex fan
  • 520

1 Answers1

3

Define a new symbol font using the font of newtxmath and tell TeX to take \gamma from it.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tgtermes}
\usepackage{amsmath,amsfonts}
\usepackage[zswash,lite]{mtpro2}
\usepackage{bm}

\DeclareSymbolFont{newtxletters}{OML}{ntxmi}{m}{it}
\SetSymbolFont{newtxletters}{bold}{OML}{ntxmi}{b}{it}
\DeclareMathSymbol{\gamma}{\mathord}{newtxletters}{13}

\begin{document}

Law of Quadratic Reciprocity: $\gamma\ne\beta$
\begin{equation}
f(z) = 50\sigma \times E_0 e^{-\gamma x} \cos(\omega t-\beta z) \mathbf{a}_x \quad \mathbf{A} + \Gamma
\end{equation}
\end{document}

enter image description here

Here's the same without the change.

enter image description here

egreg
  • 1,121,712
  • @ egreg The solution does not work in case of \mathbf{\gamma}. Any idea? Thank you. – latex fan May 19 '15 at 23:46
  • @latexfan Of course it doesn't; mtpro2 has a special setup for that; it uses different specially tailored output encodings. And no, it's incompatible with the standard encoding used by newtxmath. But \bm{\gamma} will do. – egreg May 19 '15 at 23:50
  • @ egreg - Nice, it works for \bm{\gamma}, but for uppercase \Gamma it doesn't. I guess I should \DeclareMathSymbol{\Gamma}{\mathord}{newtxletters}{<number>}? – latex fan May 19 '15 at 23:56
  • I tried \DeclareMathSymbol{\Gamma}{\mathord}{newtxletters}{0}, but it gave me the italic version ... any more ideas? – latex fan May 20 '15 at 00:18
  • @latexfan What's the problem with \Gamma? They are the same! – egreg May 20 '15 at 06:24
  • The upright bold \Gamma is incorrectly encoded, @egreg. It appears as two shifted Gammas. – latex fan May 20 '15 at 10:17
  • @latexfan As I said, mtpro2 uses different font encodings; you want to do an almost impossible thing. In any case, the uppercase \Gamma is the same with newtx and mtpro2, as far as I can see. – egreg May 20 '15 at 10:36
  • @egreg can you please tell how to do the same for replacing the \lambda from mtpro2 with that from amsmath ? – Aim Dec 25 '21 at 15:13
  • @Aim amsmath doesn't define any character. – egreg Dec 25 '21 at 15:19
  • @egreg I found the name of the package. It is fontenc and not amsmath. – Aim Jan 01 '22 at 09:49
  • @Aim No, neither fontenc. – egreg Jan 01 '22 at 09:51
  • @egreg I want to replace \lambda from mtpro2 with this. I am not able find which package offers it. – Aim Jan 02 '22 at 06:35
  • 1
    @Aim Oh, the standard Computer Modern symbol? Do \DeclareSymbolFont{cmletters}{OML}{cmm} {m}{it} \SetSymbolFont{cmletters}{bold}{OML}{cmm}{b}{it} \DeclareMathSymbol{\lambda}{\mathord}{cmletters}{"15} – egreg Jan 02 '22 at 10:40
  • @egreg Thank you! Also, can you please tell where can I find the numbers that correspond to different Greek alphabets for e.g. ''15 corresponds to \lambda and 13 corresponds to \gamma. – Aim Jan 02 '22 at 16:23
  • 1
    @Aim Look for the fontmath.ltx file on your system. – egreg Jan 02 '22 at 16:28
  • @egreg Thank you once again! – Aim Jan 02 '22 at 16:34