12 Sep
2005
12 Sep
'05
8:35 a.m.
Brooks Moses wrote:
Hi!
I'd like to write some macros that do different things depending on the style of the current font. That is, \mymacro in this example
\mymacro {\bf \mymacro} {\it \mymacro}
should be able to do something different in each of those three cases. I remember seeing a bit of clever code in a recent message that could test whether or not it was being used in a region of typewriter font and adjust accordingly; are there similar tests that can be used for \bf, \it, and so forth? If so, what are they? (And how reliable are they?)
The thing to check is the value of \fontalternative. Look up the definition of \em in font-ini.tex for its usage. Cheers, Taco