3

In a similar question it is possible to adopt Greek characters in math mode from mtrpo2 to be used together with newtxmath and baskervaldx.

My question is similar, except, I would like to adopt some other symbols like \int, \sum, or even brackets \left\{ and \right\}.

Instead of completely switching to mtpro2, I like to use newtxmath as the main math font for the consistency with baskervaldx text font, since the text font can be natively used in math.

Is it possible to import the above symbols form mtpro2 or even from the default computer modern font?

Here are the differences, using newtxmath:

enter image description here

and using mtpro2:

enter image description here

\documentclass[10pt]{article}

\usepackage[lf]{Baskervaldx}
\usepackage{amsmath}

% Option 1, using newtxmath
\usepackage[baskervaldx,cmintegrals,bigdelims,vvarbb]{newtxmath}

% Option 2, using mtpro2 (I only need a few symbols from this package
% \usepackage{etex}
% \usepackage[lite]{mtpro2}

\begin{document}
\begin{equation*}
    L^2_0(\Omega) = \left\{ f \in L^2(\Omega)  ~:~ \int_{\Omega} f dx = 0 \right\}.
\end{equation*}
\end{document}

2

Please try with this:

\documentclass[10pt]{article}

\usepackage[lf]{Baskervaldx}
\usepackage{amsmath}

% Option 1, using newtxmath
\usepackage[baskervaldx,cmintegrals,bigdelims,vvarbb]{newtxmath}

% Option 2, using mtpro2 (I only need a few symbols from this package
% \usepackage{etex}
% \usepackage[lite]{mtpro2}

\DeclareFontFamily{U}{mtt}{}
\DeclareFontShape{U}{mtt}{m}{up}{<->mt2exa}{}

\DeclareSymbolFont{splgreek}{U}{mtt}{m}{up}
\SetSymbolFont{splgreek}{normal}{U}{mtt}{m}{up}

\DeclareMathSymbol{\splsum}{\mathop}{splgreek}{"50}
\let\sum\splsum
\DeclareMathSymbol{\intop}{\mathop}{splgreek}{"52}

\begin{document}
\begin{equation*}
\sum    L^2_0(\Omega) = \left\{ f \in L^2(\Omega)  ~:~ \int_{\Omega} f dx = 0 \right\}.
\end{equation*}
\end{document}

Output: enter image description here

  • 2
    I appreciate your response, it works perfectly. May I ask to explain above solution? How do you find the codes for each symbol, like "50 for int? For example if I want to do the same for say \prod and the brackets \left\{ and \right\} where should I look at? – Sia Oct 21 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.