\documentclass[a4paper,10pt]{book}

%\usepackage{latexsym, amssymb}
\usepackage{latexsym}
\usepackage{graphicx}
%\usepackage{longtable}
\usepackage{supertabular}
%\usepackage{tabularx}
%\usepackage{tabulary}
\usepackage{xspace}
\usepackage{pdfpages}
%\usepackage[rounded]{syntax}
\usepackage{hyperref} 
\usepackage{listings}
\usepackage{color} 

\usepackage[cc]{titlepic}
\usepackage{sectsty}
% \usepackage{times}
\usepackage[T1]{fontenc}
\usepackage[urw-garamond]{mathdesign}
\usepackage{fncychap}
\usepackage{fancyhdr}

\usepackage{rail}
\railoptions{-t -h}

\fancyhead{} % clear all header fields
\fancyheadoffset[LE,RO]{\marginparsep+\marginparwidth}
\fancyhead[RO,LE]{\thepage}
\fancyhead[LO]{\rightmark}
\fancyhead[RE]{\leftmark}
\renewcommand{\headrulewidth}{0.1pt}

\fancyfoot{}


\hypersetup{%
            colorlinks = true, %true, false
            linkcolor = black,
            citecolor = blue,
            urlcolor = blue,
}
\urlstyle{sf} %rm
\newcommand{\myurl}[1]{\textcolor{blue}{\underbar{\url{#1}}}}


%%%%%%%%%%%%%%%%%%%command imported from lac paper
\newcommand{\code}[1]	{\lstinline'#1'}
\newcommand{\OSTab}[1]	{\multicolumn{3}{|l|}{\hspace{14mm}\emph{#1}}}
\newcommand{\htab}		{\hspace*{3mm}}

%%\newcommand{\faust}		{\textsc{Faust}\xspace}
%\newcommand{\astree}	{\textsc{Astree}\xspace}
\newcommand{\grame}		{\textsc{Grame}\xspace}
\newcommand{\cierec}	{\textsc{Cierec}\xspace}
%\newcommand{\ircam}		{\textsc{Ircam}\xspace}
\newcommand{\ccrma}		{\textsc{Ccrma}\xspace}
\newcommand{\cnmat}		{\textsc{Cnmat}\xspace}
\newcommand{\create}	{\textsc{Create}\xspace}
\newcommand{\mines}		{\textsc{Mines} ParisTech\xspace}
%\newcommand{\svg}		{\textsc{Svg}\xspace}
\newcommand{\pdf}		{\textsc{Pdf}\xspace}
%%\newcommand{\latex}		{\LaTeX\xspace}
\newcommand{\ie}		{i.e.\ }
%%\newcommand{\myurl}[1]	{\textcolor{blue}{\underbar{\url{#1}}}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%% MY COLORS
\definecolor{yoheader}{rgb}{0.71,0.01,0.0}

%%%% margin par
\definecolor{margincolor}{rgb}{0.52,0.02,0.02} % grey red.
\definecolor{yobg}{rgb}{0.9,0.9,1}
\definecolor{yotxt}{rgb}{0.01,0.01,0.52}
\definecolor{mylstcmt}{rgb}{0.01,0.52,0.01} % a dark green.
%\definecolor{mylstdoc}{rgb}{0.60,0.60,0.60} % a medium grey.
\definecolor{mylstdoc}{rgb}{0.80,0.30,0.80} % a medium pink.
%\definecolor{mylsteqn}{rgb}{0.80,0.80,0.30} % a medium pink.
\definecolor{mylstkey}{rgb}{0.52,0.01,0.01} % a dark red.
%%\newcommand{\farg}[1]{\textrm{\textit{#1}}}

\setlength{\marginparwidth}{1.2in}
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\color{margincolor}\footnotesize #1]%
{\raggedright\color{margincolor}\footnotesize #1}}



% \relax

\begin{document} 
\ChRuleWidth{1pt}
% \ChNumVar{\raggedleft\fontsize{80}{82}\sffamily\bfseries\color{yoheader}}
\ChNumVar{\raggedleft\Huge\color{yoheader}}
%\ChTitleVar{\raggedleft\fontsize{60}{62}\sffamily\it\color{yoheader}}
\ChTitleVar{\raggedleft\sffamily\fontsize{30}{32}\bf\color{yoheader}}

%\chapterfont{\sffamily\color{yoheader}}
%\sectionfont{\sffamily\color{yoheader}}
%\subsectionfont{\sffamily\color{yoheader}}
%\subsubsectionfont{\sffamily\color{yoheader}}

\chapterfont{\color{yoheader}}
\sectionfont{\color{yoheader}}
\subsectionfont{\color{yoheader}}
\subsubsectionfont{\color{yoheader}}


% parameters for listings
\lstset{
  tabsize=4,
  showspaces=false,
  showstringspaces=false,
  language=C++, 
  basicstyle=\ttfamily\color{yotxt},
  numbers=none,
  stepnumber=2,
  commentstyle=\slshape\color{mylstcmt},
  breaklines=true, 
  emph={component, declare, environment, import, library, process},
  emph={[2]ffunction, fconstant, fvariable},
  emph={[3]button, checkbox, vslider, hslider, nentry, vgroup, hgroup, tgroup, vbargraph, hbargraph, attach},
  emphstyle=\color{mylstkey},
%  morecomment=[s][\color{mylsteqn}]{<equation>}{</equation>},
  morecomment=[s][\color{mylstdoc}]{<mdoc>}{</mdoc>},
  %% frame=single,
  backgroundcolor=\color{yobg},
  captionpos=b
}

\lstloadlanguages{C++,[LaTeX]TeX}

% \titlepic{
%   \includegraphics[width=15cm]{images/bandeau-faust}
% }
\title{\Huge\color{yoheader}FAUST Quick Reference\\\Large(version 0.9.65)}
\author{\textsc{Grame}\\Centre National de Cr\'eation Musicale}
\date{January 2014} 


\railalias{recur}{$\sim$}
\railalias{lbrace}{\{}
\railalias{rbrace}{\}}
\railalias{dollar}{\$}
\railalias{mod}{\%}
\railalias{arobase}{@}
\railalias{ampersand}{\&}
\railalias{hat}{$\land$}
\railalias{kot}{'}
\railalias{pipe}{$|$}
\railalias{fdelay}{}
\railalias{backslash}{\char"5C}
\railterm{recur,lbrace,rbrace,dollar,mod,kot,arobase,ampersand,backslash,fdelay, pipe, hat}

\newcommand{\farg}[1]{\textrm{\textit{#1}}}
\newcommand{\ldbrack}{[\![ \,}
\newcommand{\rdbrack}{\, ]\!] }
\newcommand{\rdbrackC}{\rdbrack_{\mathrm{C}}\,}
\newcommand{\dbrack}[1]{\ldbrack #1 \rdbrack}
\newcommand{\semantic}[1]{\ldbrack #1 \rdbrack}
\newcommand{\dbrackC}[1]{\ldbrack #1 \rdbrackC}

\newcommand{\faust}{\textsc{Faust}\xspace}
\newcommand{\latex}{\LaTeX\xspace}
\newcommand{\ircam}{\textsc{Ircam}\xspace}
\newcommand{\astree}{\textsc{Astree}\xspace}
\newcommand{\svg}{\textsc{Svg}\xspace}
 

\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}

\maketitle

\tableofcontents




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                            		CHAPTERS                                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input{chapters/introduction}
\input{chapters/installation}
\input{chapters/syntax}
\input{chapters/compiler}
\input{chapters/architectures}
\input{chapters/osc}
\input{chapters/http}
\input{chapters/codegeneration} 
\input{chapters/mathdoc} 
\input{chapters/acknowledgments} 


\end{document}
