forked from marijnh/Eloquent-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook.tex
More file actions
177 lines (125 loc) · 4.26 KB
/
book.tex
File metadata and controls
177 lines (125 loc) · 4.26 KB
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
168
169
170
171
172
173
174
175
176
177
\documentclass[fontsize=13pt,oneside,headings=small,chapterprefix]{scrbook}
\usepackage{listings}
\usepackage{graphicx}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\usepackage{natbib}
\usepackage{scrhack}
\usepackage{charter}
\usepackage{bookmark}
\usepackage{ucharclasses}
\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{pdfpages}
\usepackage{arabxetex}
\usepackage{makeidx}
% epigraph is used to style chapter quotes
\usepackage{epigraph}
\setlength{\epigraphwidth}{.8\textwidth}
\setlength{\epigraphrule}{0pt}
\lstset{basicstyle=\ttfamily,xleftmargin=0.8em,breaklines=true,lineskip=-0.2em,aboveskip=0.8em,belowskip=0.8em}
\renewcommand*{\chapterheadstartvskip}{\vspace*{3cm}}
\date{}
\lstset{escapeinside={$<}{>$}}
\makeatletter
\lst@InputCatcodes
\def\lst@DefEC{%
\lst@CCECUse \lst@ProcessLetter
^^80^^81^^82^^83^^84^^85^^86^^87^^88^^89^^8a^^8b^^8c^^8d^^8e^^8f%
^^90^^91^^92^^93^^94^^95^^96^^97^^98^^99^^9a^^9b^^9c^^9d^^9e^^9f%
^^a0^^a1^^a2^^a3^^a4^^a5^^a6^^a7^^a8^^a9^^aa^^ab^^ac^^ad^^ae^^af%
^^b0^^b1^^b2^^b3^^b4^^b5^^b6^^b7^^b8^^b9^^ba^^bb^^bc^^bd^^be^^bf%
^^c0^^c1^^c2^^c3^^c4^^c5^^c6^^c7^^c8^^c9^^ca^^cb^^cc^^cd^^ce^^cf%
^^d0^^d1^^d2^^d3^^d4^^d5^^d6^^d7^^d8^^d9^^da^^db^^dc^^dd^^de^^df%
^^e0^^e1^^e2^^e3^^e4^^e5^^e6^^e7^^e8^^e9^^ea^^eb^^ec^^ed^^ee^^ef%
^^f0^^f1^^f2^^f3^^f4^^f5^^f6^^f7^^f8^^f9^^fa^^fb^^fc^^fd^^fe^^ff%
тявΧαίρετΑΊΡΤΕ“”
^^00}
\lst@RestoreCatcodes
\makeatother
\setcounter{secnumdepth}{0}
\setcounter{tocdepth}{1}
\setmonofont[Scale=0.8]{Inconsolata LGC}
\defaultfontfeatures[\emojifont]{Scale=1.15}
\newfontface{\emojifont}{Symbola_hint.ttf}
\newfontfamily{\cjkfont}{TW-Sung}
\setTransitionsFor{MiscellaneousSymbolsAndPictographs}{\emojifont}{\normalfont}{}
\newfontfamily{\cinzel}{Cinzel}
\setkomafont{disposition}{\bfseries\cinzel}
\definecolor{silver-chalice}{HTML}{AAAAAA}
\setkomafont{chapterprefix}{\small\color{silver-chalice}}
\RedeclareSectionCommand[innerskip=0pt]{chapter}
\pagestyle{plain}
\usepackage{newunicodechar}
\newunicodechar{π}{$\pi$}
\newunicodechar{ϕ}{$\varphi$}
\newunicodechar{≈}{$\approx$}
\newunicodechar{β}{\ss}
\newunicodechar{⮪}{\emojifont{⮪}}
\graphicspath{{../}}
\definecolor{coveryellow}{rgb}{0.997,0.840,0.122}
\definecolor{blue-bayoux}{rgb}{0.267,0.4,0.467}
\hypersetup{colorlinks,linkcolor=blue-bayoux,urlcolor=black}
\makeindex
\begin{document}
\pagecolor{coveryellow}
\includepdf{../img/cover.jpg}
\pagecolor{white}
\author{Marijn Haverbeke}
\title{Eloquent JavaScript}
\subtitle{3rd edition}
\maketitle
\frontmatter
\noindent Copyright \textcopyright{} 2018 by Marijn Haverbeke
\vskip 1em
\noindent This work is licensed under a Creative Commons
attribution-noncommercial license
(\url{http://creativecommons.org/licenses/by-nc/3.0/}). All code in
the book may also be considered licensed under an MIT license
(\url{http://opensource.org/licenses/MIT}).
The illustrations are contributed by various artists: Cover and
chapter illustrations by Madalina Tantareanu. Pixel art in Chapters
7 and 16 by Antonio Perdomo Pastor. Regular expression diagrams in
Chapter 9 generated with \href{http://regexper.com}{regexper.com} by
Jeff Avallone. Village photograph in Chapter 11 by Fabrice Creuzot.
Game concept for Chapter 15 by \href{http://lessmilk.com}{Thomas
Palef}.
The third edition of Eloquent JavaScript was made possible
by \href{https://eloquentjavascript.net/backers3.html}{325 financial backers}.
\vskip 1em
\noindent You can buy a print version of this book, with an extra
bonus chapter included, printed by No Starch Press at
\url{http://a-fwd.com/com=marijhaver-20&asin-com=1593279507}.
{
\hypersetup{hidelinks}
\tableofcontents
}
\mainmatter
\input{00_intro.tex}
\input{01_values.tex}
\input{02_program_structure.tex}
\input{03_functions.tex}
\input{04_data.tex}
\input{05_higher_order.tex}
\input{06_object.tex}
\input{07_robot.tex}
\input{08_error.tex}
\input{09_regexp.tex}
\input{10_modules.tex}
\input{11_async.tex}
\input{12_language.tex}
\input{13_browser.tex}
\input{14_dom.tex}
\input{15_event.tex}
\input{16_game.tex}
\input{17_canvas.tex}
\input{18_http.tex}
\input{19_paint.tex}
\input{20_node.tex}
\input{21_skillsharing.tex}
\input{hints.tex}
\backmatter
{
\hypersetup{hidelinks}
\printindex
}
\end{document}