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