13

I'm using TeX Gyre Pagella as the main font of a document which is typeset using a font size of 10pt. For the technical terms, I want to replace the default Computer Modern Typewriter with Bera Mono -- mostly because of the dotted zero. The problem is that now the terms marked with \texttt{} appear too large compared to the rest of the text.

\documentclass[pdftex,fontsize=10pt]{scrbook}

\usepackage{tgpagella}        
\usepackage[scaled]{beramono} 
\usepackage[T1]{fontenc}      

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non velit in ligula volutpat
condimentum. Now for some technical terms: \texttt{Phasellus}, \texttt{ultrices} aliquam
\texttt{nulla}, in imperdiet magna feugiat sed. Ugh, the technical terms are too large             
compared to the rest of the text. 
\end{document}

How can I tell (pdf)LaTeX to use a smaller font size (9pt?) for the \texttt{} parts only?

12

default value for option 'scaled' is '.9. You can set scale to explicit value, e.g., \usepackage[scaled=.7]{beramono}

  • excellent! Probably needs to be tweaked on a font-by-font basis. In my case, scaled=0.85 was best, judged by comparing the height of the letter a. – PatrickT Apr 27 '18 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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