# Font-independent convention for multi-letter variables in math mode

For several years now, I have always used \mathit to display variables that have more than one letter, to ensure proper kerning:

\fbox{$foo = f(jazz)$} vs. \fbox{$\mathit{foo} = f(\mathit{jazz})$}


I see that this has been suggested several times here as well.

However I would now like to update my document and use the Euler math fonts. In this setup, the default mathematical font has upright letters, and suddenly, all my \mathit have become wrong. I do not even know how to fix it:

\documentclass{minimal}
\usepackage{eulervm}
\begin{document}
\fbox{$foo = f(jazz)$} vs. \fbox{$\mathit{foo} = f(\mathit{jazz})$}
vs. \fbox{$\mathrm{foo} = f(\mathrm{jazz})$}
vs. \fbox{$\mbox{foo} = f(\mbox{jazz})$}
\end{document}


Surely there must be a way to tell LaTeX "here is a block of text to treat as a single name", disabling the spacing for the implicit multiplication, and without forcing any particular font, so that the formula can be rendered nicely independently of the mathematical font I later decide to use?

• By "wrong" I mean one should never use \mathit to mean "Dear TeX, do not space these letters like in a product" assuming the font is in italics. I'm presently using a macro called \var, and defined exactly like your \mlv (i.e., it currently expands to #1 if I use Euler fonts), the result is not fully satisfactory. For instance with Euler math there is too much space between j and azz in $jazz$. – adl Jul 30 '14 at 15:42
• Euler math letters are not made for multiletter identifiers. – egreg Jul 30 '14 at 15:49
• @adl -- you say 'By "wrong" I mean one should never use \mathit to mean "Dear TeX, do not space these letters like in a product" assuming the font is in italics.' this is a misconception. what \mathit means is what egreg says: '\mathit uses the italic text font.'. this is different from what knuth defines as "math italic", and it could be considered a bad naming decision in latex. however, quoting from lamport, p. 51, "You should use \mathit for multiletter symbols in formulas". seems like eulervm is doing the wrong thing. – barbara beeton Nov 12 '15 at 17:43