-
Notifications
You must be signed in to change notification settings - Fork 5
/
why.tex
167 lines (154 loc) · 6.97 KB
/
why.tex
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
\chapter{Typography and You}
\label{typography}
Life is a parade of written language.
Ads, apps, articles, emails, essays, menus, messages, and more
constantly shove text in your face.
And when you read that text, you see so much more than the author's
verbiage.
Consciously or not, you notice the shapes and sizes of letters.
You notice how those letters are arranged into words,
how those words are arranged into paragraphs,
how those paragraphs are arranged onto pages and screens.
You notice \introduce{typography}.
% Smoke test: a line should be 2-3 alphabets wide
%\\ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
\begin{leftfigure}
\fontspec{TeX Gyre Termes}\fontsize{12bp}{24bp}\selectfont\raggedright
Typography is why these two lines remind you of awful essays
you wrote in school.
Do many books look this way? Why not?
\end{leftfigure}
\medskip
\noindent There is a reason street signs don't look like this:
\begin{leftfigure}
\fontspec[Scale=MatchUppercase]{KJV1611}\Large E Gorham St.
\end{leftfigure}
And why a very important switch in a spaceship is labeled like this:
\begin{leftfigure}
\fontspec[Scale=MatchUppercase]{Futura-Med}CM/SM SEP
\end{leftfigure}
Not like this:
\begin{leftfigure}
\fontspec{Pinyon Script}\Large CM/SM Sep
\end{leftfigure}
Effective writing isn't just about the words you choose,
it's also about their look and layout.
Good typography isn't just art---it's a tool to help people understand you
better, faster.
And if you want to leverage that tool, you should try \LaTeX!
\clearpage
\section{What is \texorpdfstring{\LaTeX}{LaTeX}?}
\LaTeX{} (pronounced ``lay-tech'' or ``lah-tech'') is an
alternative to word processors like Microsoft Word,
Apple Pages, Google Docs, and LibreOffice.
These other applications follow the principle of
\introduce{What You See Is What You Get}
\acronym{(wysiwyg)}, where what is on screen is the same
as what comes out of your printer.
\LaTeX{} is different. Here, documents are written as
``plain'' text files, using \introduce{markup}
to specify how the final result should look.
If you've done any web design, this is a similar
process---just as \acronym{html} and \acronym{css}
describe the page you want browsers to draw,
markup describes the appearance of your document to \LaTeX.
\begin{samepage}
\begin{leftfigure}
\begin{lstlisting}
\LaTeX{} (pronounced ``lay-tech'' or ``lah-tech'') is an
alternative to word processors like Microsoft Word,
Apple Pages, Google Docs, and LibreOffice.
These other applications follow the principle of
\introduce{What You See Is What You Get}
\acronym{(wysiwyg)}, where what is on screen is the same
as what comes out of your printer.
\LaTeX{} is different. Here, documents are written as
``plain'' text files, using \introduce{markup}
to specify how the final result should look.
If you've done any web design, this is a similar
process---just as \acronym{html} and \acronym{css}
describe the page you want browsers to draw,
markup describes the appearance of your document to \LaTeX.
\end{lstlisting}
\captionof{figure}{The \LaTeX{} markup for the paragraph above}
\end{leftfigure}
\end{samepage}
This might seem strange if you haven't worked with markup before,
but it comes with a few advantages:
\begin{enumerate}
\item You can handle your writing's content and its presentation separately.
At the start of each document,
you describe the design you want.
\LaTeX{} takes it from there, consistently formatting your whole text
just the way you asked.
Compare this to a \acronym{wysiwyg} system,
where you constantly deal with appearances
as you write.
If you changed the look of a caption,
were you sure to find all the other captions and do the
same?
If the program arranges something in a way you don't like,
is it hard to fix?%\footnote{I spent far too much of my childhood
%fighting with Word about how it wrapped text around images.}
\item You can define your own commands, then tweak them to instantly adjust
every place they're used.
For example, the \verb|\introduce| and \verb|\acronym| commands
in the example above are my own creations.
One \introduce{italicizes} text, and the other sets words in
\acronym{small caps} with a bit of extra
\mbox{\textsc{\addfontfeature{LetterSpace=15}letterspacing}} so the characters
don't look \textsc{\addfontfeature{LetterSpace=-10}too crowded}.
If I decide that I'd prefer new terms to
\textbf{\itshape have this look}, or that acronyms should be formatted
{\small\addfontfeature{LetterSpace=6} LIKE THIS},
I just change the two lines that define those commands,
and every instance in this book immediately takes on the new look.
\item Being able to save the document as plain text has its own benefits:
\begin{itemize}
\item You can edit it with any basic text editor.
\item Structure is immediately visible
and simple to replicate.\punckern\footnote{Compare this to
\acronym{wysiwyg} systems, where it's not always obvious
how certain formatting was produced or how to match it.}
\item You can automate content creation using scripts and programs.
\item You can track your changes with version control software, \\
like Git or Mercurial.
\end{itemize}
\end{enumerate}
\section{Another guide?}
You might wonder why the world needs another guide for \LaTeX{}.
After all, it has been around for decades.
A quick search finds nearly a dozen books on the topic.
There are plenty of resources online.
Unfortunately, most \LaTeX{} guides have two fatal flaws:
they are long, and they are old.
Beginners don't want---or need---hundreds of pages just to learn the basics,
and older guides waste your time with outdated information.
When \LaTeX{} was first released in 1986, none of the publishing technologies
we use today existed.
Adobe wouldn't debut their Portable Document Format for seven more years,
and desktop publishing was a fledgling curiosity.
This shows---badly---in many \LaTeX{} guides.
If you look for instructions to change your document's font,
you get swamped with bespoke nonsense.\punckern\footnote{%
Take these criticisms with a grain of
salt. The fact that \LaTeX{} is still here after all of the technology around it became
obsolete---multiple times---is a testament to its staying power.}
\clearpage
The good news is that \LaTeX{} has improved by leaps and bounds in recent years.
It's time for a guide that doesn't weigh you down with decades of legacy
or try (in vain) to be a comprehensive reference.
After all, you're a smart, resourceful person who knows how to use a
search engine.
This book will:
\begin{enumerate}
\item Teach you the fundamentals of \LaTeX.
\item Point you to places where you can learn more.
\item Show you how to take advantage of modern typesetting technologies.%
\footnote{By modern, I mean ``from the mid-1990s''\quotekern,
but most web browsers and desktop publishing software are only just starting
to catch up.}
\item End promptly thereafter.
\end{enumerate}
\vspace{\baselineskip}
\noindent Let's begin.