Whenever I use the \accentedoperators command from spanish, babel, alongside the package newpxmath, the accents on math commands disappear. Not only that, dots on i's disappear as well.
\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[spanish.noindentfirst,
%don't mind these, just playing with some options and solutions
%mexico,
%es-minimal,
%es-noindentfirst,
%mexico-com,
%es-sloppy,
]{babel}
\accentedoperators
\decimalpoint
\usepackage{newpxtext}
\usepackage[varg]{newpxmath} %if you comment out this line, it works
\begin{document}
\chapter{}
These words should be accented: límite, gráfica, función.
Both of these should use a decimal point: $2.099$ and 2.099.
These words need to be accented: $\lim$, $\max$, $\min$.
$$\lim f=\max g=\min h$$
Both of these should have angle quotes: "`John"', <<Juan>>.
\end{document}
This used to work until some time ago, I don't know exactly when it stopped.

$$should not be used in LaTeX. – egreg Oct 11 '18 at 08:44\makeatletter(second line)\DeclareMathAccent{\TONEacute}{\mathord}{operators}{"13}(third line)\renewcommand{\es@op@ac}[1]{\TONEacute{\if i#1\dotlessi\else #1\fi}}(fourth line)\makeatotherNote: there is a single space in the four lines, namely between\ifandi. – egreg Oct 11 '18 at 09:56