I tried to use a font different than courier for monospaced fonts but none of this list (http://www.ctan.org/topic/font-mono) are available on my system – and as we work in a distributed system custom local additions are not an option. (Build server, standards, etc.)
so question is
- is there a usullay available monospace font, that is more condensed, i.e. needs less horizontal space?
- how can i reduce the general kerning for all letters in \texttt or the whole font?
Best Answer
Here are two ways: 1) with
microtype
's\textls
macro, and the other,\spaceout
, without any packages. I have wrapped those macros into\textttA
and\textttB
invocation forms.The
\textls
macro uses an optional argument to specify the compression or expansion, while\spaceout
uses the values of\theLetterSpace
and\extraWordSpace
to modify the default spacings.Both approaches support line wrapping.
Summarizing from the comments below, it is worth noting that the
\textls
approach supports hyphenation, whereas the\spaceout
approach does not. In addition, the argument to\spaceout
cannot include a macro that itself takes an argument.