6

I want to use Times Roman (times) as the default font and Computer Modern Typewriter (cmtt) for monospaced text. However, Computer Modern is a little too large. How do I scale it down document-wide?

If I were using Courier as my monospace font, I could do:

\usepackage[scaled=0.95]{couriers}

But I cannot find any scaling options for Computer Modern.

1

1 Answer 1

5

The typeface package makes scaling pretty easy. By default, it autoscales \sfdefault, \ttdefault and math to \rmdefault ex-height.

Try the little program below, noting that:

  • the cm-super font set should first be installed (otherwise you'll be loading bitmap computer modern fonts).
  • you can see your font metrics using \tfprint... commands (enable using typeface option printinfo=true). This info is usually somewhat wider than a normal page, hence the included \usepackage[margin=0.5in,landscape]{geometry}.
  • set typeface option debug=true to highlight font families in different colors.
  • replace option monotypeface=cm with monotypeface=cm:scale:false, monotypeface=cm:scale:1.2 or monotypeface=cm:scale:uppercase to see what the scale suboption can do.

.

\documentclass[11pt,a4paper]{article}

% Ensure cm-super fonts are installed or monotypeface=cm option will load
% bitmap (jagged edges, poor scalability) rather than scalable outline fonts
\usepackage[typeface=times,         % as requested
            sanstypeface=helvetica, % for example
            monotypeface=cm,        % as requested
            fontencoding=T1,        % defaults to T1; cf. OT1
            printinfo]{typeface}    % enables \tfprint commands below

\usepackage[margin=0.5in,landscape]{geometry}

\begin{document}

\tfprintinfo
\tfprinttextalphabets

Sample text: ABCDEfghij\texttt{ABCDEfghij}ABCDEfghij

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .