\documentclass{article}
\usepackage{amsmath}
\providecommand\ttbasefont{QTAntiquePost.otf}
\providecommand\ttmathfont{cmuntt.otf}

\providecommand\ttoverprintnormal{0}
\providecommand\ttoverprintbolda{1}
\providecommand\ttoverprintboldb{0}
\providecommand\ttoverprintboldc{0}
\providecommand\ttgreynormala{0.5}
\providecommand\ttrotatenormal{3}

\usepackage{typewriter}

\raggedright
\begin{document}
\title{The Typewriter Package for LaTeX}
\author{David Carlisle\thanks{With Contributions from Udi Fogiel}
        \thanks{https://github.com/davidcarlisle/dpctex/}}
\date{2025-02-10}

\maketitle

\section{Introduction}
The typewriter package uses (by default) the OpenType Computer Modern Unicode
Typewriter font, together with a LuaTeX virtual font setup that
introduces random variability in grey level and angle of each
character. It was originally an answer to a question on stackexchange,
http://tex.stackexchange.com/questions/344214/use-latex-to-simulate-old-typewriter-written-texts


\hrule

Currently there are no options to the package, However there are several parameters that control the offsets
and grey levels used to generate the variation. Any of the following
commands may be defined before loading the package to change the defaults shown below.

\begin{verbatim}
\providecommand\ttgreybolda{0.6}
\providecommand\ttgreyboldb{0.3}
\providecommand\ttrotatebold{12}
\providecommand\ttdownbold{20000}
\providecommand\ttrightbold{35000}
\providecommand\ttoverprintbolda{1}
\providecommand\ttoverprintboldb{1}
\providecommand\ttoverprintboldc{1}

\providecommand\ttgreynormala{0.3}
\providecommand\ttgreynormalb{0.5}
\providecommand\ttrotatenormal{8}
\providecommand\ttrightnormal{20000}
\providecommand\ttdownnormal{20000}
\providecommand\ttoverprintnormal{1}

\providecommand\ttbasefont{cmuntt.otf}
\providecommand\ttmathfont{\ttbasefont}
\providecommand\ttfontsize{12pt}
\end{verbatim}

The grey levels should be between 0 and 1 and control the maximim
amount of grey level.

The rotate values can be any angle (measured in degrees), but setting
values more than 20 makes the text more or less unreadable.

The right and down offsets (which are in the font design units) control the
maximum horizontal and vertical offsets of the overprinted characters

The flags such ttoverprintnormal control whether multiple characters are printed
By default bold font has four characters with different offsets, normal has two.
Setting the flags to 0 stops this over-printing.

By default the same font is used for text and math, but you may set
ttbasefont to the filename for the base font, and
ttmathfont to a different font, this may be useful if the main font
does not have math characters.


\hrule

There is random variability in each letter as you can see by repeating
a letter repeatededly:

OOOOOOOOOOOOONNNNNNNNNNNNNNEEEEEEEEEE

TTTTTTTTTTTTwwwwwwwwwwwwwwwwwwwwooooooooooooooooo




\subsection{Text}

one two three

\textbf{one two three}

[some greek text $θ$]

a  rule: \rule{3cm}{1pt}

\subsection{Math}

$\alpha^2=0$ and bold {\boldmath $\alpha^2=0$}



more math $x^2-\cos θ$


display math:
\[\left(\frac{x^2}{\sqrt{1+y}}\right)\]
and
\[\int_{x=0}^n f(x) dx = \sum_0^m q(y)\]

and alignments:
\begin{align}
A &\rightarrow B\\
\mupGamma &\Rightarrow C
\end{align}


\subsection{Lists}

\begin{enumerate}
\item red yellow blue green
\item black blue purple
\end{enumerate}

\begin{itemize}
\item this
\item that
\item and the other
\end{itemize}


\subsection{Tables}



\begin{center}

\begin{tabular}{|l|l|l|}
\cline{1-3}
one & two & three\\
$\alpha$ & $\beta$ & $\gamma$\\
\cline{1-3}
\end{tabular}

\end{center}

\subsection{Colophon}
\raggedleft
typeset by egreg design services

\end{document}
