8e762b9377694692d02befa845820e4aa7e84f44
[gapil.git] / gapil.tex
1 %% gapil.tex
2 %%
3 %% Copyright (C) 2000-2007 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[a4paper,11pt,twoside]{book}
18 \usepackage{ae,aecompl}
19 \usepackage[T1]{fontenc}
20 \usepackage[latin1]{inputenc}
21 %\usepackage[tex4ht, bookmarks=true]{hyperref}
22 \usepackage[bookmarks=true,plainpages=false,pdfpagelabels,hyperfootnotes=false]{hyperref}
23 \usepackage{makeidx}
24 %\usepackage{booktabs}
25 %\usepackage{pstcol}
26 %\usepackage{pslatex}
27 \usepackage{pst-node}
28 \usepackage{graphicx}
29 \usepackage[italian]{babel}
30 \newcommand{\includecodesnip}[1]{\lstinputlisting[stepnumber=0,frame=]{#1}}{}
31 \newcommand{\includestruct}[1]{\lstinputlisting[stepnumber=0]{#1}}{}
32 \newcommand{\includecodesample}[1]{\lstinputlisting{#1}}{}
33 \usepackage{cite}
34 \usepackage{amsmath}
35 \usepackage{amsfonts}
36 \usepackage[hang,bf,footnotesize,it]{caption}
37 \usepackage{listings}
38 \lstloadlanguages{C++}
39 \usepackage{color} 
40 \usepackage{mdwlist}              % scommentare per la stampa (PS e PDF)
41 \usepackage{boxedminipage}        % scommentare per la stampa (PS e PDF)
42 \usepackage{multirow}
43 %\usepackage{footnote} 
44 %\usepackage{mdwtab} 
45 \usepackage{geometry}
46 \usepackage{fancyvrb}
47
48 \usepackage{tikz}
49
50 \def\tild{\char'176}
51
52 %
53 % Setting page layout
54 %
55 %\oddsidemargin=0.5cm
56 %\evensidemargin=-0.5cm
57 %\textwidth=16cm
58 %\textheight=24.2cm
59 %\topmargin=-1.cm
60 \geometry{textheight=24.2cm,textwidth=16cm}
61
62
63 %\setcaptionmargin{2cm} 
64 %\renewcommand{\chaptername}{Capitolo}
65 %\renewcommand{\contentsname}{Indice}
66 %\renewcommand{\bibname}{Bibliografia}
67 \pagestyle{headings}
68
69 \frenchspacing
70
71 %\includeonly{macro,pref,intro,fdl}
72
73 \title{\Huge \textbf{\textsl{G}a\textsl{P}i\textsl{L}}\\
74 \huge Guida alla Programmazione in Linux} 
75
76 \author{Simone Piccardi}
77
78 \makeindex
79
80 % Solo prima parte, scommentare 
81 %\includeonly{macro,preambolo,pref,intro,process,prochand,fileintro,filedir,
82 %  fileunix,filestd,system,system,signal,session,fileadv,ipc,errors,
83 %  ringraziamenti,fdl}
84
85 % Solo seconda parte e appendici, scommentare
86 %\includeonly{macro,preambolo,network,socket,tcpsock,sockctrl,othersock,
87 %  sockadv,netlayer,trasplayer,errors,ringraziamenti,fdl}
88
89 \begin{document}
90
91 \frontmatter
92
93 \maketitle
94
95 \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}
96 \cleardoublepage}}
97
98 \begin{quote}
99   
100   Copyright \copyright\ 2000-2007 Simone Piccardi.  Permission is granted to
101   copy, distribute and/or modify this document under the terms of the GNU Free
102   Documentation License, Version 1.1 or any later version published by the
103   Free Software Foundation; with the Invariant Sections being ``Un preambolo''
104   in ``Prefazione'',
105   with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the
106   license is included in the section entitled ``GNU Free Documentation
107   License''.
108
109 \end{quote}
110 \clearemptydoublepage
111
112 %\ifx\hcode\undefined\else
113 \tableofcontents
114 %\fi
115
116 \clearemptydoublepage
117 \include{macro}
118 \include{preambolo}
119 \include{pref}
120 \clearemptydoublepage
121 \mainmatter
122
123 \lstset{language=C++} 
124
125 \lstset{basicstyle=\small,
126   numbers=left,
127   numberstyle=\tiny,
128   stepnumber=1,
129   numbersep=2pt, 
130   frame=TB,
131   framesep=5pt,
132 %  xleftmargin=0.3cm,
133   basicstyle=\ttfamily,
134   keywordstyle=\color{blue}\ttfamily,
135   ndkeywordstyle=\color{yellow}\ttfamily,
136 %  rdkeywordstyle=\ttfamily,
137   identifierstyle=\ttfamily,
138   commentstyle=\color{red}\ttfamily,
139   stringstyle=\color{green}\ttfamily,
140 %  texcsststyle=\ttfamily,
141   directivestyle=\color{magenta}\ttfamily
142
143
144 % distance from margins for boxedminipage
145 %\fboxsep=6pt
146
147 \part{Programmazione di sistema}
148 \label{part:progr-di-sist}
149 \include{intro}
150 \include{process}
151 \include{prochand}
152 \include{fileintro}
153 \include{filedir}
154 \include{fileunix}
155 \include{filestd}
156 \include{system}
157 \include{signal}
158 \include{session}
159 \include{fileadv}
160 \include{ipc}
161 \include{thread}
162
163 % Commentare sotto se si genera la prima parte
164 \part{Programmazione di rete}
165 \label{part:progr-di-rete}
166
167 \include{network}
168 \include{socket}
169 \include{tcpsock}
170 \include{sockctrl}
171 \include{othersock}
172 \include{sockadv}
173 \appendix
174
175 \part{Appendici}
176 \label{part:appendici}
177 \include{netlayer}
178 \include{trasplayer}
179 \include{errors}
180 \include{build}
181 \include{ringraziamenti}
182 \include{fdl}
183
184 % at the end put the bibliography
185 \backmatter
186
187 %\bibliographystyle{phaip}
188 %\bibliography{biblio}
189 \printindex
190
191 \bibliographystyle{ieeetr}
192 \bibliography{biblio}
193
194 \end{document}