Si prosegue con le modifiche per l'inclusione degli esempi di codice.
[gapil.git] / gapil.tex
1 %% gapil.tex
2 %%
3 %% Copyright (C) 2000-2002 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 "Prefazione",
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]{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
34 \usepackage{cite}
35 \usepackage{amsmath}
36 \usepackage{amsfonts}
37 \usepackage[hang,bf,footnotesize,it]{caption2}
38 \usepackage{listings}
39 \lstloadlanguages{C++}
40 \usepackage{color} 
41 \usepackage{mdwlist}              % scommentare per la stampa (PS e PDF)
42 \usepackage{boxedminipage}        % scommentare per la stampa (PS e PDF)
43 \usepackage{multirow}
44 %\usepackage{footnote} 
45 %\usepackage{mdwtab} 
46
47 \def\tild{\char'176}
48
49
50 %
51 % Setting page layout
52 %
53 \oddsidemargin=0.5cm
54 \evensidemargin=-0.5cm
55 \textwidth=16cm
56 \textheight=24.2cm
57 \topmargin=-1.cm
58 %\setcaptionmargin{2cm} 
59 %\renewcommand{\chaptername}{Capitolo}
60 %\renewcommand{\contentsname}{Indice}
61 %\renewcommand{\bibname}{Bibliografia}
62 \pagestyle{headings}
63
64 %\includeonly{macro,pref,intro,fdl}
65
66 \title{\Huge \textbf{\textsl{G}a\textsl{P}i\textsl{L}}\\
67 \huge Guida alla Programmazione in Linux} 
68
69 \author{Simone Piccardi}
70
71 \makeindex
72
73 \begin{document}
74
75 \frontmatter
76
77 \maketitle
78
79 \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}
80 \cleardoublepage}}
81
82 \begin{quote}
83   
84   Copyright \copyright\ 2000-2002 Simone Piccardi.  Permission is granted to
85   copy, distribute and/or modify this document under the terms of the GNU Free
86   Documentation License, Version 1.1 or any later version published by the
87   Free Software Foundation; with the Invariant Sections being ``Prefazione'',
88   with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the
89   license is included in the section entitled ``GNU Free Documentation
90   License''.
91
92 \end{quote}
93 \clearemptydoublepage
94
95 \ifx\hcode\undefined\else
96 \tableofcontents
97 \fi
98
99 \clearemptydoublepage
100 \include{macro}
101 \include{pref}
102 \clearemptydoublepage
103 \mainmatter
104
105 \lstset{language=C++} 
106
107 \lstset{basicstyle=\small,
108   numbers=left,
109   numberstyle=\tiny,
110   stepnumber=1,
111   numbersep=2pt, 
112   frame=TB,
113   framesep=5pt,
114 %  xleftmargin=0.3cm,
115   basicstyle=\ttfamily,
116   keywordstyle=\color{blue}\ttfamily,
117   ndkeywordstyle=\color{yellow}\ttfamily,
118 %  rdkeywordstyle=\ttfamily,
119   identifierstyle=\ttfamily,
120   commentstyle=\color{red}\ttfamily,
121   stringstyle=\color{green}\ttfamily,
122 %  texcsststyle=\ttfamily,
123   directivestyle=\color{magenta}\ttfamily
124
125
126 % distance from margins for boxedminipage
127 %\fboxsep=6pt
128
129
130 \include{intro}
131 \include{process}
132 \include{prochand}
133 \include{fileintro}
134 \include{filedir}
135 \include{fileunix}
136 \include{filestd}
137 \include{system}
138 \include{signal}
139 \include{session}
140 \include{fileadv}
141 \include{ipc}
142 \include{network}
143 \include{socket}
144 \include{elemtcp}
145 \include{simpltcp}
146 \appendix
147 \include{ipprot}
148 \include{tcpprot}
149 \include{errors}
150 \include{ringraziamenti}
151 \include{fdl}
152
153 % at the end put the bibliography
154 \backmatter
155
156 %\bibliographystyle{phaip}
157 %\bibliography{biblio}
158 \printindex
159
160 \bibliographystyle{ieeetr}
161 \bibliography{biblio}
162
163 \end{document}