[Tex/LaTex] Why is there extra space after (:) in \texttt{}

spacing

Whenever I type a space after a colon (:) in a \texttt{} command I end up with extra space — here is a minimal example:

\documentclass[12pt]{article}

\thispagestyle{empty}

\begin{document}
\section*{Test Space after Colon}  

\texttt{1234 : 8901}\\
\texttt{12345678901}

\vspace{\baselineskip}

\noindent 
The above was produced by 
\begin{verbatim}
\texttt{1234 : 8901}\\
\texttt{12345678901}  
\end{verbatim}
and has extra space after 
the colon (:) 

\vspace{\baselineskip}

\noindent 
\textsf{1234 : 8901}\\
\textsf{12345678901}

\noindent 
The above was produced by 
\begin{verbatim}
\textsf{1234 : 8901}\\
\textsf{12345678901}  
\end{verbatim}
and has no extra space after 
the colon (:) 

\end{document}

The above code produces

Test space after colon

As you can see in the example, the extra space does not appear in the \textsf{} command for example.

Any idea what is going on here?

Best Answer

This is the affect of the default \nonfrenchspacing which adds extra space after sentence/clause ending punctuation. The monospacing of \texttt highlights the effect.

\texttt{\frenchspacing1234 : 8901}\\

produces even spacing as does

\verb|1234 : 8901|\\
Related Question