This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
forked from miekg/gobook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go_kindle.tex
188 lines (164 loc) · 4.08 KB
/
go_kindle.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
%\documentclass[a4paper,twoside,openleft]{blocksbook}
\documentclass[twoside,openleft]{blocksbook}
\setstocksize{11.5cm}{9cm}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\sloppy
\usepackage[cm-default]{fontspec}% provides font selecting commands
\usepackage{xunicode}% provides unicode character macros
\usepackage{xltxtra} % provides some fixes/extras
\usepackage[answerdelayed,lastexercise]{exercise}
\usepackage[labelsep=period,labelfont=it,textfont=it]{caption}
\usepackage{alltt}
\usepackage{url}
\usepackage{listings}
\usepackage{color}
\usepackage{graphicx}
\usepackage{relsize}
\usepackage{xCJK}
\usepackage{scalefnt}
\usepackage{wrapfig}
\usepackage{everypage}
% Tables from Gnumeric.
\usepackage{array}
\usepackage{longtable}
\usepackage{calc}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{ifthen}
\usepackage{upquote}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathreplacing}
\usepackage{float}
%\usepackage{natbib}
%% Local tex stuff.
\usepackage{coderemarks}
%% Must go last.
\usepackage{hyperref}
\input{go-setup.tex}
\input{go-cc-license.tex}
\setlrmarginsandblock{5mm}{5mm}{*}
\setulmarginsandblock{5mm}{5mm}{*}
\setheadfoot{\baselineskip}{1mm}
\setlength\headsep{1mm}
\checkandfixthelayout
\begin{document}
\thispagestyle{empty}
\newcommand{\version}{0.5}
%% Title page
\begin{center}
\hspace{0.4cm}{\scalefont{2.00}{\sffamily{\mbox{\vspace{0.4cm}Learning Go}}}}
\end{center}
\vspace*{0.5cm}
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=0.3]{fig/bumper-inverse.png}
\end{center}
\end{figure}
\vspace*{0.02\stockheight}
\begin{minipage}{0.4\textwidth}
\begin{flushleft} \large
\hspace*{1.0cm}Authors:\\
\hspace*{1.0cm}\emph{Miek Gieben}\\
%%\hspace*{2.0cm}\emph{JC van Winkel}\\
%%\hspace*{2.0cm}\emph{Jeroen Bulten}\\
\vfill
\end{flushleft}
\end{minipage}
\hspace{5mm}
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
Thanks to:\\
\emph{Go Authors}\\
\emph{Google}\\
\emph{Go Nuts mailing list}\\
\vfill
\end{flushright}
\end{minipage}
\vfill
\begin{center}
\hspace*{1cm}\CcGroupByNcSa{0.83}{0.95ex}\\[2.5ex]
\hspace*{1cm}{\tiny\CcNote{\CcLongnameByNcSa}}
\end{center}
\begin{center}
\hspace*{1cm}\emph{Miek Gieben -- \copyright 2010, 2011}
\end{center}
\vspace{-3em}
%% End title page %%
\newpage
\thispagestyle{empty}
\begin{figure}[H]
\begin{center}
\emph{
This work is licensed under the Attribution-NonCommercial-ShareAlike 3.0 Unported License. To
view a copy of this license, visit \url{http://creativecommons.org/licenses/by-nc-sa/3.0/}
or send a letter
to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.}
\vspace{2em}
\emph{All example code used in this book, are hereby put in the public domain.}
%%PDFcrop fails on Ubuntu
%%\includegraphics[scale=0.50]{fig/google_logo_black.pdf}
\end{center}
\end{figure}
\begin{center}
\vfill
\emph{Learning as we Go}
(\emph{\version})
\tiny{Updated to Go release \gorelease{weekly/weekly.2011-08-10}}
\vspace{.2\stockheight}
\end{center}
\clearpage
\pagenumbering{roman}
\tableofcontents*
\listoffigures*
%%\listoftables* %% there are so few
\listofcode*
\listofex*
\clearpage
\chapter*{Preface}
\label{chap:preface}
\input{go-preface.tex}
\chapter{Introduction}
\pagenumbering{arabic}
\label{chap:intro}
\input{go-intro.tex}
\chapter{Basics}
\label{chap:basics}
\input{go-basics.tex}
\chapter{Functions}
\label{chap:functions}
\input{go-functions.tex}
\chapter{Packages}
\label{chap:packages}
\input{go-packages.tex}
\chapter{Beyond the basics}
\label{chap:beyond}
\input{go-beyond.tex}
\chapter{Interfaces}
\label{chap:interfaces}
\input{go-interfaces.tex}
\chapter{Concurrency}
\label{chap:channels}
\input{go-channels.tex}
\chapter{Communication}
\label{chap:communication}
\input{go-communication.tex}
%%\chapter{Miscellaneous}
%%\label{chap:miscellaneous}
%%\input{go-misc.tex}
\appendix
\chapter{Colophon}
\input{go-colophon}
\begin{twocolumn}
\chapter{Index}
\printindex
\end{twocolumn}
\begin{onecolumn}
\bibliographystyle{plain}
\bibliography{go}
\newpage
\thispagestyle{empty}
\begin{center}
\emph{This page is intentionally left blank.}
\end{center}
\end{onecolumn}
\end{document}