Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. \usepackage{listings} % for source code inclusion
  2. \usepackage{xcolor} % color texts
  3.  
  4. \definecolor{codebg}{rgb}{0.95,0.95,0.95} % light grey for code background
  5. \definecolor{codecomment}{rgb}{0,0.5,0} % comments in green
  6. \definecolor{codestring}{rgb}{0.5,0,0} % red strings
  7.  
  8.  
  9. % Listings setup -----------------
  10. \lstset{language=C, % programming language
  11. morekeywords={}, % additionnal keywords
  12. basicstyle=\small\ttfamily, % style of the code
  13. keywordstyle=\color{blue}\bfseries, % style of the keywords
  14. stringstyle=\color{codestring}, % style of the strings
  15. commentstyle=\color{codecomment}, % style of the comments
  16. showspaces=false, % do not underline spaces in code
  17. showstringspaces=false, % do not underline spaces in strings
  18. showtabs=false, % do not underline tabs
  19. numbers = left, % where are the line-numbers
  20. numberstyle=\footnotesize, % style of the line-numbers
  21. backgroundcolor=\color{codebg}, % background-color
  22. stepnumber=1, % the step between two line-numbers.
  23. extendedchars=true, % allows extended characters
  24. columns=flexible, % sets the columns to non-fixed width
  25. tabsize=2, % sets the tabulation width
  26. frame=trBL, % adds a frame around the code with double line on the bottom
  27. frameround=tttt, % rounds the frame
  28. breaklines=true, % line breaks automatically
  29. breakautoindent=true, % keep indentation level withh line breaks
  30. captionpos=b, % the caption is at the bottom
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement