Aggiunte in treno
[gapil.git] / gapil.tex
1 %% gapil.tex
2 %%
3 %% Copyright (C) 2000-2015 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.3 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,fontsize=\footnotesize}
58
59 \DefineVerbatimEnvironment{Command}{Verbatim}
60 {xleftmargin=\parindent,xrightmargin=\parindent,fontseries=b,
61 fontsize=\footnotesize}
62
63 \DefineVerbatimEnvironment{Console}{Verbatim}
64 {commandchars=\\\{\},xleftmargin=\parindent,xrightmargin=\parindent,fontsize=\footnotesize}
65
66
67 \usepackage[bookmarks=true,plainpages=false,pdfpagelabels,
68 hyperfootnotes=false]{hyperref}
69
70 \usepackage{makeidx}
71 \usepackage{pst-node}
72 \usepackage{eso-pic}
73 \usepackage{graphicx}
74 \usepackage[italian]{babel}
75 \usepackage{cite}
76 \usepackage{amsmath}
77 \usepackage{amsfonts}
78 \usepackage[hang,bf,footnotesize,it]{caption}
79 \usepackage{listings}
80 \lstloadlanguages{C++}
81 \usepackage{color} 
82
83 \providecommand{\defaultdesc}{%
84 \desclabelstyle{\pushlabel}%
85 \renewcommand{\makelabel}[1]{##1}%
86 \setlength{\labelwidth}{0pt}%
87 }
88 \usepackage{mdwlist}
89
90 \usepackage{boxedminipage}
91 \usepackage{multirow}
92 \usepackage{longtable}
93 \usepackage{varwidth}
94 %\usepackage{footnote} 
95 %\usepackage{mdwtab} 
96
97 \usepackage{tikz}
98 \usetikzlibrary{shapes}
99
100 \frenchspacing
101
102 %\includeonly{macro,pref,intro,fdl}
103
104 \title{\Huge \textbf{\textsl{G}a\textsl{P}i\textsl{L}}\\
105 \huge Guida alla Programmazione in Linux} 
106
107 \author{Simone Piccardi}
108
109 \makeindex
110
111 % Solo prima parte, scommentare 
112 % \includeonly{macro,preambolo,pref,intro,process,prochand,filedir,
113 %   fileunix,filestd,system,signal,session,fileadv,ipc,errors,
114 %   ringraziamenti,fdl}
115
116 % Solo seconda parte e appendici, scommentare
117 %\includeonly{macro,preambolo,network,socket,tcpsock,sockctrl,othersock,
118 %  sockadv,netlayer,trasplayer,errors,ringraziamenti,fdl}
119
120 \begin{document}
121
122 \frontmatter
123
124 \maketitle
125
126 \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}
127 \cleardoublepage}}
128
129 \begin{quote}
130   
131   Copyright \copyright\ 2000-2015 Simone Piccardi.  Permission is granted to
132   copy, distribute and/or modify this document under the terms of the GNU Free
133   Documentation License, Version 1.3 or any later version published by the
134   Free Software Foundation; with the Invariant Sections being ``Un preambolo''
135   in ``Prefazione'',
136   with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the
137   license is included in the section entitled ``GNU Free Documentation
138   License''.
139
140 \end{quote}
141 \clearemptydoublepage
142
143 %\ifx\hcode\undefined\else
144 \tableofcontents
145 %\fi
146
147 \clearemptydoublepage
148 \include{macro}
149 \include{preambolo}
150 \include{pref}
151 \clearemptydoublepage
152 \mainmatter
153
154 \lstset{language=C++} 
155
156 \lstset{basicstyle=\small,
157   numbers=left,
158   numberstyle=\tiny,
159   stepnumber=1,
160   numbersep=2pt, 
161   frame=TB,
162   framesep=5pt,
163 %  xleftmargin=0.3cm,
164   basicstyle=\ttfamily,
165   keywordstyle=\color{blue}\ttfamily,
166   ndkeywordstyle=\color{yellow}\ttfamily,
167 %  rdkeywordstyle=\ttfamily,
168   identifierstyle=\ttfamily,
169   commentstyle=\color{red}\ttfamily,
170   stringstyle=\color{green}\ttfamily,
171 %  texcsststyle=\ttfamily,
172   directivestyle=\color{magenta}\ttfamily
173
174
175 % distance from margins for boxedminipage
176 %\fboxsep=6pt
177
178 \part{Programmazione di sistema}
179 \label{part:progr-di-sist}
180 \include{intro}
181 \include{process}
182 \include{prochand}
183 \include{filedir}
184 \include{fileio}
185 %\include{fileunix}
186 %\include{filestd}
187 \include{system}
188 \include{signal}
189 \include{session}
190 \include{fileadv}
191 \include{ipc}
192 \include{thread}
193
194 % Commentare sotto se si genera la prima parte
195 \part{Programmazione di rete}
196 \label{part:progr-di-rete}
197
198 \include{network}
199 \include{socket}
200 \include{tcpsock}
201 \include{sockctrl}
202 \include{othersock}
203 \include{sockadv}
204 \appendix
205
206 \part{Appendici}
207 \label{part:appendici}
208 \include{errors}
209 \include{netlayer}
210 \include{trasplayer}
211 \include{build}
212 \include{ringraziamenti}
213 \include{fdl-1.3}
214
215 % at the end put the bibliography
216 \backmatter
217 \printindex
218 %\bibliographystyle{phaip}
219 %\bibliographystyle{ieeetr}
220 \bibliographystyle{abstract}
221 \bibliography{biblio}
222
223 \end{document}