Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Maybe this answer can help. –  egreg Sep 20 '12 at 10:29
add comment

1 Answer

up vote 4 down vote accepted

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}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.