Wondering if people here have a thought on what the best practice is here (if it matters).
I used to use baskerville (well, the baskervald
package) as my main font and charter as my math font (since baskerville has no math font). Since there was a slight difference in the style of the italicized font, I would put all author defined constant symbols (e.g., "Let a be a number such that….") in text in inline math mode environments to preserve a consistent look between occurrences of that symbol in the text and in equations.
Now I use Palatino (or whatever you'd call the Palatino equivalent provided by mathpazo
) and so don't have to worry about the font matching issue, is there any difference between $a$ and \textit{a} in that case? I think I'd still prefer to use $a$ since it makes more sense semantically (math constants in math mode….), but I'm wondering if there are any downsides or really any differences at all.
Is the italic math "a" any different from the italic text "a"? Is there any reason to prefer \texit{a} to $a$?
Bonus Question (that would be nice, but not mandatory, for an answer to address): where can I find information about math fonts and how LaTeX calls them?
Best Answer
Definitely you should use math,
$x$
or for multi-letter identifiers$\mathit{foo}$
even if as appears to be the case here the fonts are virtual fonts using the same glyphs, they are, to LaTeX different fonts with different encodings and metrics. Even if the letters you are using happen to have the same metrics, the document is then very fragile and will do the wrong thing if you ever change the font options. Somewhere Knuth (if I recall correctly) writes how he was caught out using digits as1
rather than$1$
which produces the same output in computer modern (and most other) font setups but broke in (I think) concrete math setup where the math and text digits were in different styles.A small example using
mathpazo
which produces
or perhaps more usefully:
Where you can see that the math fonts don't have the
fi
ligature and introduce a small kern after thei
which is not in the text font.