0

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}
Skillmon
  • 60,462
Silver
  • 1
  • 1
  • 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 –  Feb 12 '18 at 06:42
  • @ChristianHupfer. My document was alright. However, when, I use this code \renewcommand{\familydefault}{\ttdefault}. I get this problem. – Silver Feb 12 '18 at 06: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? –  Feb 12 '18 at 06:46
  • I just want to write the sentences. So, instead of writing something, I just used .... – Silver Feb 12 '18 at 06:52
  • @ChristianHupfer, I added two pictures to explain my question. – Silver Feb 12 '18 at 06:57
  • Depending on the document class you employ, hyphenation and even (full) justification may be disabled for paragraphs set in a monospaced font. Please do reveal which TeX engine you employ and which document class you use. Sharing a secret or two about how you've set the margins of the text block would be helpful as well. – Mico Feb 12 '18 at 07:01
  • Incidentally, is there a reason for the inter-word space between "non-" and "Gaussian"? – Mico Feb 12 '18 at 07:03
  • Hi @Mico. I did not put any spaces. I edited my question with the information that may help you to understand my question. – Silver Feb 12 '18 at 07:05
  • @Mico My question is that, I get a sentences which are not at the same margins. They must come in the same margin. Imagine that I have a frame and would like all the sentences to be inside this frame. For me some sentences are out of the frame. – Silver Feb 12 '18 at 07:07
  • @Mico, I am using overleaf on Mac. I edited the question. – Silver Feb 12 '18 at 07:10
  • 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 08:03

1 Answers1

2

Just try this:

\renewcommand*\ttdefault{cmvtt}

\renewcommand*\familydefault{\ttdefault}

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

CarLaTeX
  • 62,716
Alice
  • 203
  • 1
  • 8
  • 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 08:31