Subject says it all.
Is testing f@shape the cleanest, clearest, simplest, most reliable way to check for italic and slant modes? e.g.:
\ifthenelse{\equal{\f@shape}{sl}}{italic}{not italic}
\ifthenelse{\equal{\f@shape}{it}}{slant}{not slant}
Obviously, without more context, the question is a bit broad—for example, rather than wrapping this in an \ifthenelse, it might be cleaner to set an internal length variable depending on the mode. In my case, I simply want to emit varying amounts of kerning in the middle of a macro—none for normal text, a little bit for slanted text, and a little more for italics. This is for a macro that typesets fractions. I've got it working but I'm just wondering if this is the cleanest way.
\itshapeor\upshape. – Ulrike Fischer Feb 02 '12 at 18:26