[Tex/LaTex] uniform spacing between words and sentences

spacing

I would like to specify a particular global setting in my thesis, so that every time I use the space tab in my keyboard, I get the exact same appearance in my latex document. As of now, that is not the case. I see marked discrepancies in the generated PDF file, even though upon checking the source .tex file I can see that the spacing is uniform. I would greatly appreciate any useful tips.

Best Answer

The TeX program does not really use spaces in its output. Unless told to do otherwise (e.g., \obeyspaces), it actually discards the spaces that you type when it processes your file. Then TeX puts words and sentences into boxes and stretches or shrinks the amount of "glue" between them until they form lines, paragraphs, and pages that satisfy the program's algorithms to meet a standard for a well-formed page. This is one of the primary functions of the program, but you can disable it.

If you are really serious about not having any spacing adjustments between words or sentences, then use a monospaced (typewriter) font, \frenchspacing between sentences, and \raggedright alignment.

\documentclass{article}
\usepackage{lmodern} % or any other package providing a monospaced (typewriter) font
\usepackage[T1]{fontenc}
\usepackage{lipsum} % for example dummy text

\renewcommand*{\familydefault}{\ttdefault} % set typewriter font as default
\frenchspacing % only one space between sentences
\raggedright   % do not adjust interword spacing, leave right margin uneven 

\begin{document}
\lipsum
\end{document}

enter image description here

Another option would be just to use a typewriter! :)

Related Question