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