Inserito il package listings ... e adesso ho la syntax highlight dei
[gapil.git] / main.tex
index 3cd309e44fdd61f4f5648062e2287f3ace8df5e9..da2fd9759030cb7b36008c5abd59453223a9f300 100644 (file)
--- a/main.tex
+++ b/main.tex
@@ -9,17 +9,18 @@
 \usepackage{amsmath}
 \usepackage{amsfonts}
 \usepackage[hang,bf,footnotesize,it]{caption2}
+\usepackage{listings}
+\lstloadlanguages{C++}
+\usepackage{color}
 %
 % Setting page layout
 %
-
 \oddsidemargin=0.5cm
 \evensidemargin=-0.5cm
 \textwidth=16cm
 \textheight=24.2cm
 \topmargin=-1.cm
 %\setcaptionmargin{2cm} 
 %\renewcommand{\chaptername}{Capitolo}
 %\renewcommand{\contentsname}{Indice}
 %\renewcommand{\bibname}{Bibliografia}
 
 %\includeonly{macro,pref,intro,fdl}
 
-
 \title{Guida alla Programmazione in Linux.}
 
-\author{Simone Piccardi,
-  si spera anche qualcun'altro}
+\author{Simone Piccardi}
 
 
 \begin{document}
 
-
-
 \pagenumbering{roman}
  
 \maketitle
 
 \pagenumbering{arabic}
 
+
+\lstset{language=C++} 
+
+\lstset{basicstyle=\small,
+  labelstyle=\tiny,
+  labelstep=1,
+  labelsep=2pt,
+  frame=TB,
+  frametextsep=5pt,
+  basicstyle=\ttfamily,
+  keywordstyle=\color{blue}\ttfamily,
+  ndkeywordstyle=\color{yellow}\ttfamily,
+%  rdkeywordstyle=\ttfamily,
+  identifierstyle=\ttfamily,
+  commentstyle=\color{red}\ttfamily,
+  stringstyle=\color{green}\ttfamily,
+%  texcsststyle=\ttfamily,
+  directivestyle=\color{magenta}\ttfamily
+}
+
 \include{intro}
 \include{files}
-\include{network}
 \include{process}
 \include{option}
 \include{signal}
 \include{ipc}
+\include{network}
+\include{socket}
 \include{fdl}
  
 % at the end put the bibliography