Why might SetMathAlphabet{\mathit} not change the alphabet?

I'm trying to change the math alphabet. The following MWE compiles with neither error nor warning in my latex installation, but the math font is not actually changed. The math alphabet remains the same as the default text. Oddly, the \DeclareMathAlphabet command works fine, so: the first phrase is different from the last two. If it matters, I'm using pdfLaTeX.

\documentclass{article}
\SetMathAlphabet{\mathit}{normal}{OT1}{ppl}{m}{it}
\DeclareMathAlphabet{\palit}{OT1}{ppl}{m}{it}

\begin{document}
$\palit{somemathinpalatino}\ somemathinpalatino$ \textit{somemathinpalatino}
\end{document}

• Welcome to TeX.SX! \mathit is not the normal math italic, but is “text italic in math” and should be called explicitly. If you want Palatino style math italic letters, either load mathpazo or newpxmath (and newpxtext for the text fonts). – egreg Mar 17 '15 at 22:02

The math alphabet \mathit is for “text italic in math”, which is very different from the “math italic” used for single letters without markup.

In order to use some font with family name, say, fabc, you have to define a symbol font. For instance

\DeclareSymbolFont{abcletters}{OT1}{fabc}{m}{it}


and then define letters to use the abcletters symbol font:

\DeclareMathSymbol{a}{\mathalpha}{abcletters}{a}
\DeclareMathSymbol{b}{\mathalpha}{abcletters}{b}
\DeclareMathSymbol{c}{\mathalpha}{abcletters}{c}
...
\DeclareMathSymbol{y}{\mathalpha}{abcletters}{y}
\DeclareMathSymbol{z}{\mathalpha}{abcletters}{z}
\DeclareMathSymbol{A}{\mathalpha}{abcletters}{A}
\DeclareMathSymbol{B}{\mathalpha}{abcletters}{B}
...
\DeclareMathSymbol{Y}{\mathalpha}{abcletters}{Y}
\DeclareMathSymbol{Z}{\mathalpha}{abcletters}{Z}
`

Spacing will be wrong, particularly when exponents or subscripts are involved, because a math letter font needs specially crafted parameters for the characters.

• @JohnPerry Please, remove the obsolete comments – egreg Mar 17 '15 at 22:38
• Alas, I don't seem to have reputation enough to vote you up (I thought I did) but I did select yours as the correct answer. Thanks again. – John Perry Mar 17 '15 at 22:39