Newer and simpler solution
Since v1.401 of newpxmath
(released on October 2, 2019, now available in both MiKTeX and TeX Live), the package offers a new option fracspacing
that “modifies fontdimens 8 and 11 of the symbol font to values more appropriate to the newpx fonts”.
\documentclass{article}
% New package option since 2019/10/02 update
\usepackage[fracspacing]{newpxmath}[2019/10/02]
\usepackage{mathtools}% for \clap
\newcommand*\drawbaseline{%
\clap{\rule{80pt}{0.4pt}}%
}
\begin{document}
\[
\begin{gathered}
x,y\drawbaseline,z\\
\frac{\partial x}{\partial t} \frac{\partial y\drawbaseline}{\partial t} \frac{\partial z_j}{\partial t} \frac{\partial z_{j_j}}{\partial t}\\
\frac{\partial x}{\partial t} \frac{\partial y}{\partial t} \frac{\partial z_j}{\partial t} \frac{\partial z_{j_j}}{\partial t}\\
\end{gathered}
\]
\end{document}
The output looks very similar to the one in the old answer below. The parameters are refined from the very crude 0.8.
Old and depreciated answer
The design of Palatino contains long descenders. When a math font is based Palatino, the various math font dimensions should be chosen to avoid unevenness, as much as possible.
There are many font dimensions governing the positions of numerator and denominator in a fraction. We can change two of them in newpxmath
which are the most relevant.
\documentclass{article}
\usepackage{newpxmath}
% Code modified from lmsnpxsy.fd
\makeatletter
\expandafter\ifx\csname npxmath@scaled\endcsname\relax
\let\npxmath@@scaled\@empty%
\else
\edef\npxmath@@scaled{s*[\csname npxmath@scaled\endcsname]}%
\fi
\DeclareFontFamily{LMS}{npxsy}{\providecommand {\setSYdimens}{}\setSYdimens\skewchar \font =120}
\DeclareFontShape{LMS}{npxsy}{m}{n}{%
<-> \npxmath@@scaled zplsy
}{%
\fontdimen 8\font=0.8\fontdimen6\font % was 0.677 of a quad
\fontdimen11\font=0.8\fontdimen6\font % was 0.686 of a quad
}
\makeatother
\usepackage{mathtools}% for \clap
\newcommand*\drawbaseline{%
\clap{\rule{80pt}{0.4pt}}%
}
\begin{document}
\[
\begin{gathered}
x,y\drawbaseline,z\\
\frac{\partial x}{\partial t} \frac{\partial y\drawbaseline}{\partial t} \frac{\partial z_j}{\partial t} \frac{\partial z_{j_j}}{\partial t}\\
\frac{\partial x}{\partial t} \frac{\partial y}{\partial t} \frac{\partial z_j}{\partial t} \frac{\partial z_{j_j}}{\partial t}\\
\end{gathered}
\]
\end{document}
Modifying font dimensions gives the most consistent look for all your fractions, but this requires your own aesthetic judgement.
Here, I changed the numerator raising dimension from 0.677
to 0.8
to give more room for long descender. I also changed the denominator dropping dimension from 0.686
to 0.8
for more even spacing both above and below the fraction bar.
\frac{\partial z_{j_j}}{\partial t}
the numerator would be shifted upward too.\vphantom{A^A j_j}
automatically. [EDIT: I would be happy to accept this as an answer btw, if it's the most LaTeX-onic way of doing it - would you like to post it, for the points? :-) ]\partial x
and\partial y
are not on the same baseline either). I would say this is due to the (not-so-well) design ofnewpxmath
, so I think we can play with font dimensions here…