# How to use Palladio font in text body but Computer Modern for Equations?

i want my text body to be set in a Palladio-like font, but my equations to be set in Computer Modern.

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lipsum}

\usepackage[sc]{mathpazo}

\begin{document}
\lipsum[1]

$$f(x)=x^2 \cdot \int_{-\infty}^{\infty} \sin(2\pi f_0 t)$$
\end{document}


What should i do?

• Welcome to TeX.SE. – Mico May 25 at 11:35
• That seems a strange setup: Computer Modern math fonts are largely visually incompatible with Palladio/Palatino. – egreg May 25 at 13:07
• Maybe i identified the fonts in the document i want to replicate wrong. See follow up questeion tex.stackexchange.com/questions/492591/… – Marvin Noll May 25 at 13:16
• If you want to use an up-to-date Palatino text font, you should really also go for an up-to-date Palatino math font. The mathpazo package is beyond ancient. Do consider loading the newpxtext and newpxmath font packages. – Mico May 25 at 21:36

Don't load the mathpazo package. Instead, load the newpxtext package. As the name of the package indicates, it provides only text fonts, no math fonts.

A full MWE:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lipsum}

%%\usepackage[sc]{mathpazo}
\usepackage{newpxtext}

\begin{document}
\lipsum[2]
$$f(x)=x^2 \int_{-\infty}^{\infty} \sin(2\pi f_0 t)\,dt$$
\end{document}


Just rename the default family name:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lipsum}

\renewcommand{\rmdefault}{pplj}

\begin{document}

\textsc{Abcdef}

\lipsum[1]

$$f(x)=x^2 \cdot \int_{-\infty}^{\infty} \sin(2\pi f_0 t)$$
\end{document}


The output of pdffonts is

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
DZRMSF+URWPalladioL-Roma             Type 1            Custom           yes yes no       4  0
CXJMMY+TeXPalladioL-SC               Type 1            Custom           yes yes no       5  0
NMBJYD+CMMI12                        Type 1            Builtin          yes yes no       6  0
VRSLZY+CMR12                         Type 1            Builtin          yes yes no       7  0
VOPKHO+CMR8                          Type 1            Builtin          yes yes no       8  0
CKUQXN+CMSY10                        Type 1            Builtin          yes yes no       9  0
UYVLXV+CMEX10                        Type 1            Builtin          yes yes no      10  0
BECFBN+CMSY8                         Type 1            Builtin          yes yes no      11  0


With pplx instead of pplj you get “uppercase digits” and true small caps (thanks to Ralf Steubner for suggesting it).

The output of pdffonts

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
DKRBIK+URWPalladioL-Roma             Type 1            Custom           yes yes no       4  0
GDZRLO+TeXPalladioL-SC               Type 1            Custom           yes yes no       5  0
NMBJYD+CMMI12                        Type 1            Builtin          yes yes no       6  0
VRSLZY+CMR12                         Type 1            Builtin          yes yes no       7  0
VOPKHO+CMR8                          Type 1            Builtin          yes yes no       8  0
CKUQXN+CMSY10                        Type 1            Builtin          yes yes no       9  0
UYVLXV+CMEX10                        Type 1            Builtin          yes yes no      10  0
BECFBN+CMSY8                         Type 1            Builtin          yes yes no      11  0


The output is bad in either case, as Palatino/Palladio is visually incompatible with Computer Modern.

• +1 for "The output is bad in either case, as Palatino/Palladio is visually incompatible with Computer Modern." – Mico May 25 at 19:57
• @Mico +1 also for me. It is absolutely true that the fonts are not compatible, but the retina monitor of the MaC of egreg is simply fantastic :-) that makes fonts look like they fit perfectly. – Sebastiano May 25 at 21:14
• I dont quite get it. Could you two elaborate on 'visually incompatible'? What do you mean by that and then why does some books use this setup? – Marvin Noll May 26 at 14:06
• You can use pplx to get real small caps together with lining figures. – Ralf Stubner May 28 at 9:47
• @RalfStubner Thanks for the suggestion! – egreg May 28 at 10:23