# [dev-context] Determining the current text style?

Brooks Moses bmoses at stanford.edu
Sun Sep 11 23:48:49 CEST 2005

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?)