0

This question already has an answer here:

Not like thisI would like to have like thisI am writing a report using LaTeX. I would like to change the font to be typewriter. Once, I did this, the typesetting is affected. That is, the sentences are not fall in the same margins also, I got a spaces between words. could someone help me please? What is the good way to change the font without affecting the typesetting?

Here is the packages that I use:

\documentclass{article}[12pt]
\usepackage[utf8]{inputenc}
\usepackage[margin=0.45in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{nomencl}
\usepackage[T1]{fontenc}
\renewcommand{\familydefault}{\ttdefault}
\usepackage{lipsum}
\begin{document}

My document here. 
\lipsum
\end{document}

marked as duplicate by Skillmon, CarLaTeX, Bobyandbob, Troy, Stefan Pinnow Feb 12 '18 at 10:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Welcome to TeX.SE. Such descriptions are not useful, unfortunately. There are one billion ways in order to achieve this (which looks awkward anyway). Please post the document that has this issue – user31729 Feb 12 '18 at 6:42
  • @ChristianHupfer. My document was alright. However, when, I use this code \renewcommand{\familydefault}{\ttdefault}. I get this problem. – Silver Feb 12 '18 at 6:44
  • 1
    \renewcommand{\familydefault}{\ttdefault} is a font changing instruction, in the very end, which influences the typesetting of course. What are the ...... supposed to be? – user31729 Feb 12 '18 at 6:46
  • I just want to write the sentences. So, instead of writing something, I just used .... – Silver Feb 12 '18 at 6:52
  • 1
    @Silver - Your new example, which typesets a three-word sentence, doesn't generate any particular isssues, does it? Please amend your posting accordingly. – Mico Feb 12 '18 at 8:03
2

Just try this:

\renewcommand*\ttdefault{cmvtt}

\renewcommand*\familydefault{\ttdefault}

For more options, visit this site: http://www.tug.dk/FontCatalogue/computermoderntypewriterproportional/

  • This is what I would suggest as well, excepted that, since the OP uses the Cork font encoding (T1), the Latin Modern version of these fonts would be more suited than their Computer Modern counterparts. \renewcommand*\ttdefault{lmvtt} – Franck Pastor Feb 12 '18 at 8:31

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