# Same font for variable in \mathit and regular math mode [closed]

I'm trying to have the same font for the p in \mathit (or \textit) (the idea is to have a multiletter variable) and the single p, with mathpazo and fourier.

\documentclass{article}
\usepackage[sc]{mathpazo}
\usepackage{fourier}
\begin{document}

$\mathit{ap}_i = p_i.$

\end{document}


This is not working for me.

## closed as unclear what you're asking by egreg, user36296, Stefan Pinnow, Phelype Oleinik, TeXnicianApr 11 '18 at 12:01

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• (1) welcome, (2) exactly what error do you get? – daleif Apr 10 '18 at 8:17
• I get exactly the same glyph (in the Utopia Italic font). By the way, fourier will completely override the font settings done by mathpazo. – egreg Apr 10 '18 at 9:26
• daleif, thank you. I get two different p's. egreg, hmm… I wonder what is causing the two different p's then. – N. Short Apr 10 '18 at 10:00
• Show your log-file. – Ulrike Fischer Apr 10 '18 at 10:19

I just figured out what was causing the problem: I had a \mathversion{…} command that was changing the math font, and that I forgot about and couldn't see among all other commands.