summaryrefslogtreecommitdiff
path: root/macros/luatex/latex/typewriter/typewriter-guide.tex
blob: 5ecb6df160577a0315646bc6580d084cc8442aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
\documentclass{article}
\usepackage{amsmath}
\usepackage{typewriter}

\begin{document}
\title{The Typewriter Package for LaTeX}
\author{David Carlisle \thanks{https://github.com/davidcarlisle/dpctex/}}
\date{2018-02-10}

\maketitle

\section{Introduction}
The typewriter Package uses 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\ttgreyone{0.6}
\providecommand\ttgreytwo{0.3}
\providecommand\ttrotatebold{12}
\providecommand\ttdownbold{20000}
\providecommand\ttrightbold{35000}
\providecommand\ttdownshifttwo{20000}

\providecommand\ttrotatenormal{8}
\providecommand\ttrightnormal{20000}
\providecommand\ttdownnormal{20000}
\end{verbatim}

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

The rotate values can be any angle (measured 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

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}