Advertisement
tobast

my_listings.sty

Dec 14th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 2.35 KB | None | 0 0
  1. \usepackage{listings}
  2. \usepackage{color}
  3. \definecolor{color_comment}{HTML}{2D6F19}
  4. \definecolor{color_linenum}{HTML}{9E9E9E}
  5. \definecolor{color_strings}{HTML}{D300F3}
  6.  
  7.  
  8. \lstset{ %
  9. %   backgroundcolor=\color{white},   % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
  10.     basicstyle=\footnotesize,        % the size of the fonts that are used for the code
  11.     breakatwhitespace=false,         % sets if automatic breaks should only happen at whitespace
  12.     breaklines=true,                 % sets automatic line breaking
  13.     captionpos=b,                    % sets the caption-position to bottom
  14.     commentstyle=\color{color_comment},    % comment style
  15. %   deletekeywords={...},            % if you want to delete keywords from the given language
  16. %   escapeinside={\%*}{*)},          % if you want to add LaTeX within your code
  17.     extendedchars=true,              % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
  18.     frame=none,                         % adds a frame around the code
  19.     keepspaces=true,                 % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
  20.     keywordstyle=\color{blue},       % keyword style
  21.     morekeywords={*,...},            % if you want to add more keywords to the set
  22.     numbers=left,                    % where to put the line-numbers; possible values are (none, left, right)
  23.     numbersep=5pt,                   % how far the line-numbers are from the code
  24.     numberstyle=\tiny\color{color_linenum}, % the style that is used for the line-numbers
  25.     rulecolor=\color{black},         % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
  26.     showspaces=false,                % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
  27.     showstringspaces=false,          % underline spaces within strings only
  28.     showtabs=false,                  % show tabs within strings adding particular underscores
  29.     stepnumber=1,                    % the step between two line-numbers. If it's 1, each line will be numbered
  30.     stringstyle=\color{color_strings},  % string literal style
  31.     tabsize=2,                       % sets default tabsize to 2 spaces
  32.     title=\lstname                   % show the filename of files included with \lstinputlisting; also try caption instead of title
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement