Inizio revisione capitolo 3 e solite indicizzazioni e aggiornamento
[gapil.git] / gapil.tex
1 %% gapil.tex
2 %%
3 %% Copyright (C) 2000-2011 Simone Piccardi.  Permission is granted to
4 %% copy, distribute and/or modify this document under the terms of the GNU Free
5 %% Documentation License, Version 1.1 or any later version published by the
6 %% Free Software Foundation; with the Invariant Sections being "Un preambolo",
7 %% with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the
8 %% license is included in the section entitled "GNU Free Documentation
9 %% License".
10 %%
11 %% GaPiL : Guida alla Programmazione in Linux
12 %%
13 %% S. Piccardi Oct. 2000
14 %% 
15 %% gapil.tex: file principale, gli altri vanno inclusi da questo.
16 %%
17 \documentclass[10pt,twoside]{book}
18 \usepackage[paperwidth=18.91cm,paperheight=24.589cm,
19 inner=2.5cm,outer=1.8cm,bottom=3.3cm,top=2.3cm]{geometry}
20
21 % encodings
22 \usepackage[T1]{fontenc}
23 \usepackage[utf8]{inputenc}
24 \usepackage{ae,aecompl}
25
26 %
27 % New header style
28 %
29 \usepackage{fancyhdr}
30 \pagestyle{fancy}
31 \fancyhf{}
32 \fancyhead[RE]{\slshape \rightmark}
33 \fancyhead[RO,LE]{\thepage}
34 \fancyhead[LO]{\slshape \leftmark}
35
36 \renewcommand{\chaptermark}[1]{% 
37 \markboth{\thechapter.% 
38 \ #1}{}} 
39
40 \renewcommand{\sectionmark}[1]{% 
41 \markright{\ \thesection% 
42 \ #1}{}}
43
44
45 % more fonts
46 \usepackage{inconsolata}
47
48 % fancy verbatim
49 \usepackage{fancyvrb}
50 \DefineVerbatimEnvironment{Example}{Verbatim}
51 {xleftmargin=1cm,xrightmargin=1cm}
52
53 \DefineVerbatimEnvironment{FileExample}{Verbatim}
54 {frame=lines,framerule=0.5mm,framesep=2mm,xleftmargin=1cm,xrightmargin=1cm,fontsize=\footnotesize}
55
56 \DefineVerbatimEnvironment{Terminal}{Verbatim}
57 {xleftmargin=\parindent,xrightmargin=\parindent,fontfamily=courier,fontsize=\footnotesize}
58
59 \DefineVerbatimEnvironment{Command}{Verbatim}
60 {xleftmargin=\parindent,xrightmargin=\parindent,fontseries=b,
61 fontfamily=courier,fontsize=\footnotesize}
62
63 \usepackage[bookmarks=true,plainpages=false,pdfpagelabels,
64 hyperfootnotes=false]{hyperref}
65
66 \usepackage{makeidx}
67 \usepackage{pst-node}
68 \usepackage{eso-pic}
69 \usepackage{graphicx}
70 \usepackage[italian]{babel}
71 \usepackage{cite}
72 \usepackage{amsmath}
73 \usepackage{amsfonts}
74 \usepackage[hang,bf,footnotesize,it]{caption}
75 \usepackage{listings}
76 \lstloadlanguages{C++}
77 \usepackage{color} 
78 \usepackage{mdwlist}
79 \usepackage{boxedminipage}
80 \usepackage{multirow}
81 \usepackage{longtable}
82 %\usepackage{footnote} 
83 %\usepackage{mdwtab} 
84
85 \usepackage{tikz}
86 \usetikzlibrary{shapes}
87
88 \frenchspacing
89
90 %\includeonly{macro,pref,intro,fdl}
91
92 \title{\Huge \textbf{\textsl{G}a\textsl{P}i\textsl{L}}\\
93 \huge Guida alla Programmazione in Linux} 
94
95 \author{Simone Piccardi}
96
97 \makeindex
98
99 % Solo prima parte, scommentare 
100 %\includeonly{macro,preambolo,pref,intro,process,prochand,fileintro,filedir,
101 %  fileunix,filestd,system,system,signal,session,fileadv,ipc,errors,
102 %  ringraziamenti,fdl}
103
104 % Solo seconda parte e appendici, scommentare
105 %\includeonly{macro,preambolo,network,socket,tcpsock,sockctrl,othersock,
106 %  sockadv,netlayer,trasplayer,errors,ringraziamenti,fdl}
107
108 \begin{document}
109
110 \frontmatter
111
112 \maketitle
113
114 \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}
115 \cleardoublepage}}
116
117 \begin{quote}
118   
119   Copyright \copyright\ 2000-2011 Simone Piccardi.  Permission is granted to
120   copy, distribute and/or modify this document under the terms of the GNU Free
121   Documentation License, Version 1.1 or any later version published by the
122   Free Software Foundation; with the Invariant Sections being ``Un preambolo''
123   in ``Prefazione'',
124   with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the
125   license is included in the section entitled ``GNU Free Documentation
126   License''.
127
128 \end{quote}
129 \clearemptydoublepage
130
131 %\ifx\hcode\undefined\else
132 \tableofcontents
133 %\fi
134
135 \clearemptydoublepage
136 \include{macro}
137 \include{preambolo}
138 \include{pref}
139 \clearemptydoublepage
140 \mainmatter
141
142 \lstset{language=C++} 
143
144 \lstset{basicstyle=\small,
145   numbers=left,
146   numberstyle=\tiny,
147   stepnumber=1,
148   numbersep=2pt, 
149   frame=TB,
150   framesep=5pt,
151 %  xleftmargin=0.3cm,
152   basicstyle=\ttfamily,
153   keywordstyle=\color{blue}\ttfamily,
154   ndkeywordstyle=\color{yellow}\ttfamily,
155 %  rdkeywordstyle=\ttfamily,
156   identifierstyle=\ttfamily,
157   commentstyle=\color{red}\ttfamily,
158   stringstyle=\color{green}\ttfamily,
159 %  texcsststyle=\ttfamily,
160   directivestyle=\color{magenta}\ttfamily
161
162
163 % distance from margins for boxedminipage
164 %\fboxsep=6pt
165
166 \part{Programmazione di sistema}
167 \label{part:progr-di-sist}
168 \include{intro}
169 \include{process}
170 \include{prochand}
171 \include{fileintro}
172 \include{filedir}
173 \include{fileunix}
174 \include{filestd}
175 \include{system}
176 \include{signal}
177 \include{session}
178 \include{ipc}
179 \include{fileadv}
180 \include{thread}
181
182 % Commentare sotto se si genera la prima parte
183 \part{Programmazione di rete}
184 \label{part:progr-di-rete}
185
186 \include{network}
187 \include{socket}
188 \include{tcpsock}
189 \include{sockctrl}
190 \include{othersock}
191 \include{sockadv}
192 \appendix
193
194 \part{Appendici}
195 \label{part:appendici}
196 \include{netlayer}
197 \include{trasplayer}
198 \include{errors}
199 \include{build}
200 \include{ringraziamenti}
201 \include{fdl}
202
203 % at the end put the bibliography
204 \backmatter
205 \printindex
206 %\bibliographystyle{phaip}
207 %\bibliographystyle{ieeetr}
208 \bibliographystyle{abstract}
209 \bibliography{biblio}
210
211 \end{document}