-
Notifications
You must be signed in to change notification settings - Fork 50
/
ErlangHandbook.tex
149 lines (109 loc) · 3.65 KB
/
ErlangHandbook.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
%&pdfLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[oneside]{book}
%%%%%%
%% package includes
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{textcomp}
\usepackage{array}
\usepackage{color}
\usepackage[hmargin=2.5cm,vmargin=2.5cm]{geometry}
\usepackage{minted}
\usepackage{todonotes}
\usepackage{parskip}
\usepackage[Bjornstrup]{fncychap}
\usepackage{listings}
%%%%%%
%% package setup
\hypersetup{
colorlinks=true,
linktoc=all,
linkcolor=red,
}
%%%%%%
%% hacks and macros
\newminted[erlang]{erlang}{xleftmargin=1cm,xrightmargin=1cm,frame=single,framerule=1pt}
%% hack to fix the margin issue in \item s in 1.2.1
\newminted[erlangim]{erlang}{xleftmargin=-1.5cm}
%%% display todo notes or not?
\newcommand{\todonote}[1]{\todo[inline]{\textbf{Note:} #1}}
%\newcommand{\todonote}[1]{}
%% typesetting for the "results in" notation used.
\def\resultingin{$\quad\Rightarrow\quad$}
\begin{document}
%%%%%%
%% Title
\begin{titlepage}
\centering
\vspace*{70pt}
\includegraphics[scale=0.3]{includes/erlang-logo.png}\\[0.8\baselineskip]
{\Huge \sffamily HANDBOOK}\\
\vspace{250pt}
{\LARGE \sffamily Bjarne D\"acker}\par
{\LARGE \sffamily Robert Virding}\par
\end{titlepage}
%%%%%%
%% Info Page
\clearpage
\thispagestyle{empty}
{\Huge Erlang Handbook}\\[0.1\baselineskip]
\hspace{10pt}{\large{by Bjarne Däcker and Robert Virding}}
\vspace{20pt}
{\Large \textbf{Revision:}\\[0.2\baselineskip]
\immediate\write18{git log -n1 | grep 'Date:' | sed 's/Date: //g' > _revision.tex}
\input{_revision}
\immediate\write18{rm _revision.tex}
}
\vspace{20pt}
{\large Latest version of this handbook can be found at:\\
\url{http://opensource.erlang-solutions.com/erlang-handbook}}
ISBN: 978-1-938616-04-4
\vfill
\textbf{Editor}\\[0.1\baselineskip]
%\begin{tabular}{@{\hspace{3ex}}p{42em}}
Omer Kilic
%\end{tabular}
\textbf{Contributors}\\[0.1\baselineskip]
%\begin{tabular}{@{\hspace{3ex}}p{42em}}
The list of contributors can be found \href{https://github.com/esl/erlang-handbook/graphs/contributors}{on the project repository}.
%\end{tabular}
\vspace{20pt}
\textbf{Conventions}\\
Syntax specifications are set using \texttt{this monotype font}. Square brackets
([ ]) enclose optional parts. Terms beginning with an uppercase letter like
\textit{Integer} shall then be replaced by some suitable value. Terms beginning
with a lowercase letter like \texttt{end} are reserved words in Erlang. A
vertical bar (\textbar{}) separates alternatives, like Integer \textbar{} Float.
\vspace{20pt}
\textbf{Errata and Improvements}\\
This is a live document so please file corrections and suggestions for
improvement about the content using the issue tracker at
\url{https://github.com/esl/erlang-handbook}. You may also fork this repository
and send a pull request with your suggested fixes and improvements. New
revisions of this document will be published after major corrections.
\vspace{20pt}
\includegraphics[scale=0.7]{includes/cc-by-sa.png}\\ This text is made available
under a Creative Commons Attribution-ShareAlike 3.0 License. You are free to
copy, distribute and transmit it under the license terms defined at
\url{http://creativecommons.org/licenses/by-sa/3.0}
\newpage
%%%%%%
%% TOC
\tableofcontents
%%%%%%
%% Chapters
\input{chapters/01-background}
\input{chapters/02-structure-of-an-erlang-program}
\input{chapters/03-data-types}
\input{chapters/04-pattern-matching}
\input{chapters/05-functions}
\input{chapters/06-processes}
\input{chapters/07-error-handling}
\input{chapters/08-distributed-erlang}
\input{chapters/09-ports-and-port-drivers}
\input{chapters/10-code-loading}
\input{chapters/11-macros}
\input{chapters/12-further-reading}
\end{document}