\documentclass[11pt,a4paper,twoside,openright]{book} % Standard packages \usepackage{amsmath, amsthm, amssymb, graphicx, xcolor, listings, dsfont} \usepackage[utf8]{inputenc} %\usepackage{courier} % PDF link % \usepackage[pagebackref]{hyperref} % \hypersetup{ % bookmarks=true, % show bookmarks bar? % unicode=false, % non-Latin characters in Acrobat's bookmarks % pdftoolbar=true, % show Acrobat's toolbar? % pdfmenubar=true, % show Acrobat's menu? % pdffitwindow=true, % page fit to window when opened % pdftitle={Registration}, % title % pdfauthor={Vincent Garcia}, % author % pdfsubject={}, % subject of the document % pdfnewwindow=false, % links in new window % pdfkeywords={}, % list of keywords % colorlinks=true, % false: boxed links; true: colored links % linkcolor=red, % color of internal links % citecolor=green, % color of links to bibliography % filecolor=magenta, % color of file links % urlcolor=cyan % color of external links % } % Paths to figures \graphicspath{{./figures/}} % Colors \definecolor{codelightgray}{rgb}{0.5,0.5,0.5} \definecolor{keywords}{RGB}{128,128,0} \definecolor{comments}{RGB}{0,128,0} % Listings %\lstset{ %language=C++, %frame=lines, %basicstyle=\footnotesize\ttfamily\color{codelightgray}, %xleftmargin=0.15cm, %xrightmargin=0.15cm, %keywordstyle=\color{keywords}, %commentstyle=\color{comments}\emph, %captionstyle=\color{comments}\small %} %listings parameters \definecolor{light-gray}{gray}{0.95} \lstset{ % language=C++, % choose the language of the code basicstyle=\small, % the size of the fonts that are used for the code %numbers=left, % where to put the line-numbers %numberstyle=\tiny, % the size of the fonts that are used for the line-numbers %stepnumber=2, % the step between two line-numbers. If it's 1 each line %% will be numbered %numbersep=5pt, % how far the line-numbers are from the code backgroundcolor=\color{light-gray}, % choose the background color. You must add \usepackage{color} showspaces=false, % show spaces adding particular underscores showstringspaces=false, % underline spaces within strings showtabs=false, % show tabs within strings adding particular underscores frame=single, % adds a frame around the code tabsize=2, % sets default tabsize to 2 spaces captionpos=t, % sets the caption-position to bottom breaklines=true, % sets automatic line breaking breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace title=\lstname, % show the filename of files included with \lstinputlisting; % also try caption instead of title escapeinside={\%*}{*)}, % if you want to add a comment within your code morekeywords={*,slots,signals,connect,SIGNAL,SLOT}, % if you want to add more keywords to the set keywordstyle=\color{keywords}, commentstyle=\color{comments}\emph%,captionstyle=\color{comments}\small } % \lstset{ % % language=C++, % basicstyle=\footnotesize, % the size of the fonts that are used for the code % backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color} % showspaces=false, % show spaces adding particular underscores % showstringspaces=false, % underline spaces within strings % showtabs=false, % show tabs within strings adding particular underscores % frame=single, % adds a frame around the code % tabsize=2, % sets default tabsize to 2 spaces % captionpos=b, % sets the caption-position to bottom % breaklines=true, % sets automatic line breaking % breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace % title=\lstname, % show the filename of files included with \lstinputlisting; % % also try caption instead of title % escapeinside={\%*}{*)}, % if you want to add a comment within your code % morekeywords={*,...} % if you want to add more keywords to the set % }