Deyan Ginev added section_Code_Listings_We_will__.tex  almost 9 years ago

Commit id: 408be4a1dbdc0cc1460d40d2e3553612fa937702

deletions | additions      

         

\section{Code Listings}  We will be illustrating all of our examples with code listings in this tutorial, so it makes sense to first show how to use them.  An example setup that you should add to your Header file is:  \begin{lstlisting}  \usepackage{listings}  \lstset{ %  backgroundcolor=\color{white}, % choose the background color  basicstyle=\footnotesize, % size of fonts used for the code  breaklines=true, % automatic line breaking only at whitespace  captionpos=b, % sets the caption-position to bottom  commentstyle=\color{gray}, % comment style  keywordstyle=\color{blue}, % keyword style  stringstyle=\color{black}, % string literal style  language=[LaTeX]TeX, % Set your language (you can change the language for each code-block optionally)  frame=lrtb, %  xleftmargin=\fboxsep, %  xrightmargin=-\fboxsep, %  }  \end{lstlisting}