[texhax] highly condensed font in a figure

Ulrike Fischer news3 at nililand.de
Mon Mar 14 18:53:32 CET 2016


Am Mon, 14 Mar 2016 17:21:29 +0100 schrieb Neal H. Walfield:

> Hi,
> 
> I need to display a short code listing in a paper that I'm working on.
> Since I don't have much space, I figured I'd try to use a highly
> condensed font.  I found the following question on stack exchange,
> which looked promising:
> 
>   https://tex.stackexchange.com/questions/47489/looking-for-monospaced-condensed-font
> 
> Unfortunately, it doesn't work for me in a figure (MWE follows).  I
> have no idea why and my search engine foo has failed me.  Any ideas?

The \ttfamily is missing (figure resets the family to \familydefault
which is \rmfamily in your document).

 \begin{figure}
 {\small\ttfamily\fontseries{lc}\selectfont
   \lipsum[1]}
 \caption{Figure}
 \end{figure}




-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



More information about the texhax mailing list