[texhax] highly condensed font in a figure

Paul Gessler pdgessler at gmail.com
Mon Mar 14 17:44:59 CET 2016

Hi Neal,

You just need to re-select \ttfamily inside the figure environment:


Without this, the font selected inside the figure reverts to the
normal document font, Latin Modern Roman (lmr), which does not provide
a light condensed (lc) series. Note the font substitution warning

LaTeX Font Warning: Font shape `T1/lmr/lc/n' undefined
(Font)              using `T1/lmr/m/n' instead on input line 14.

Hope this helps,


On Mon, Mar 14, 2016 at 11:21 AM, Neal H. Walfield <neal at walfield.org> wrote:
> 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?
> Thanks in advance!
> :) Neal
> \documentclass{article}
> \usepackage[T1]{fontenc}
> \usepackage{lmodern}
> \usepackage{lipsum}
> \begin{document}
> \ttfamily\lipsum[1]
> {\small\fontseries{lc}\selectfont
> \lipsum[1]}
> \begin{figure}
> {\small\fontseries{lc}\selectfont
>   \lipsum[1]}
> \caption{Figure}
> \end{figure}
> \end{document}
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org

More information about the texhax mailing list