I just stumbled upon the fact that the font lmtt
(latin modern typewriter) seems to exist in
- italic
- slanted
- bold
- bold slanted
but not
- bold italic
At least the file t1lmtt.fd
contains the lines
\DeclareFontShape{T1}{lmtt}{m}{it}
{<-> ec-lmtti10}{}
\DeclareFontShape{T1}{lmtt}{m}{sl}
{<-> ec-lmtto10}{}
\DeclareFontShape{T1}{lmtt}{b}{sl}
{<-> ec-lmtko10}{}
\DeclareFontShape{T1}{lmtt}{b}{it}
{<->sub*lmtt/b/sl}{}
which, upon naïve use, leads to the rather unpleasant result
At the moment, my clumsy fix for this is
\input{t1lmtt.fd}
\DeclareFontShape{T1}{lmtt}{m}{it}
{<-> sub*lmtt/m/sl}{}
which means I get slanted typewriter (instead of italic) everywhere.
What would be a better alternative?
Mind you, I'm not complaining the bold italic font seems to be missing.
AFAICS the family cmtt
doesn't really have any bold fonts anyway, so another obvious alternative would be to map bold italic to medium italic also for lmtt
.
Best Answer
I think using slanted everywhere for monospace italic is OK.
Italic typewriter
is a distinctly odd concept anyway:-) The substitution in the font shape is as good a way as any to achieve this.