There's no reason for using XeTeX with txfonts
, because the fonts are only available in Type1 format. Besides, txfonts
is to be considered obsolete because the fonts it provides have many problems with spacings and character sidebearings.
And don't do \everymath{\displaystyle}
. Even if you think that it's good, trust me and don't use it.
With the fixed
\documentclass{article}
\usepackage{newtxtext,newtxmath}
\begin{document}
\[\sum a^k=p\sum a^{k−1}−q\sum a^{k−2}+r\sum a^{k−3}.\]
\end{document}
I get
Missing character: There is no − ("2212) in font ntx-Regular-tlf-ot1!
four times.
This happens when copying material from other sources. Doing “find and replace” would work, but it's probably easier if you make U+2212 known to TeX math:
\documentclass{article}
\usepackage{newtxtext,newtxmath}
% Make U+2212 MINUS SIGN known
\Umathcodenum"2212=\Umathcodenum`\-
\begin{document}
\[\sum a^k=p\sum a^{k−1}−q\sum a^{k−2}+r\sum a^{k−3}.\]
\end{document}

The same with txfonts

Look closely for the differences, in particular for the minus sign. There are many others.
\everymath{\displaystyle}
. And don't usetxfonts
, but\usepackage{newtxtext,newtxmath}
.