Skip to content

Instantly share code, notes, and snippets.

@marcjubero
Last active March 1, 2016 21:11
Show Gist options
  • Save marcjubero/0c70e31bd5aa9f2423d4 to your computer and use it in GitHub Desktop.
Save marcjubero/0c70e31bd5aa9f2423d4 to your computer and use it in GitHub Desktop.
Latex listing
\usepackage{listings}
%New colors defined below
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\definecolor{gray}{rgb}{0.53,0.53,0.53}
%Code listing style named "mystyle"
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment