Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \usepackage{listings} % for source code inclusion
- \usepackage{xcolor} % color texts
- \definecolor{codebg}{rgb}{0.95,0.95,0.95} % light grey for code background
- \definecolor{codecomment}{rgb}{0,0.5,0} % comments in green
- \definecolor{codestring}{rgb}{0.5,0,0} % red strings
- % Listings setup -----------------
- \lstset{language=C, % programming language
- morekeywords={}, % additionnal keywords
- basicstyle=\small\ttfamily, % style of the code
- keywordstyle=\color{blue}\bfseries, % style of the keywords
- stringstyle=\color{codestring}, % style of the strings
- commentstyle=\color{codecomment}, % style of the comments
- showspaces=false, % do not underline spaces in code
- showstringspaces=false, % do not underline spaces in strings
- showtabs=false, % do not underline tabs
- numbers = left, % where are the line-numbers
- numberstyle=\footnotesize, % style of the line-numbers
- backgroundcolor=\color{codebg}, % background-color
- stepnumber=1, % the step between two line-numbers.
- extendedchars=true, % allows extended characters
- columns=flexible, % sets the columns to non-fixed width
- tabsize=2, % sets the tabulation width
- frame=trBL, % adds a frame around the code with double line on the bottom
- frameround=tttt, % rounds the frame
- breaklines=true, % line breaks automatically
- breakautoindent=true, % keep indentation level withh line breaks
- captionpos=b, % the caption is at the bottom
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement