1

This question already has an answer here:

I am trying to write a tex file in Kile with font \textt.

This font looks like following typing in a book Number fields-Marcus.

But when after \begin{document} I wrote \tt or \texttt, the text was exceeding line in the pdf file; in other words, it was showing some warning.

How can I settle the \texttt font in Kile?

marked as duplicate by Fran, egreg, Stefan Pinnow, Zarko, Henri Menke Dec 23 '16 at 10:29

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.

  • This book was written on a typewriter. Today we are able to do fine typesetting using a desktop computer, so there is no need to fake the very bad typography produced by a typewriter. – Henri Menke Dec 23 '16 at 8:53
  • If you nevertheless want to do this, use \ttfamily\raggedright after \begin{document}. – Henri Menke Dec 23 '16 at 8:54
  • 1
    @HenriMenke you mean fine luatex settings like this? – David Carlisle Dec 23 '16 at 9:43
3
\documentclass[english]{article}
\usepackage{fontspec}
\setmonofont[ 
  Scale=MatchLowercase,
  FakeStretch=0.85, 
]{DejaVu Sans Mono}
\usepackage{babel}

\usepackage[math]{blindtext}%% only demo

\renewcommand\familydefault{\ttdefault}
\AtBeginDocument{%  for justified typewriter
  \fontdimen3\font=3pt  
  \fontdimen4\font=1pt 
}
\begin{document}

\blinddocument

\end{document}

enter image description here

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