-
-
Save MuellerSeb/921b0c16292a8679d0d1f38298b96d2c to your computer and use it in GitHub Desktop.
LaTeX pretty listings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{listings} | |
\usepackage{lstautogobble} % Fix relative indenting | |
\usepackage{color} % Code coloring | |
\usepackage{zi4} % Nice font | |
\definecolor{bluekeywords}{rgb}{0.13, 0.13, 1} | |
\definecolor{greencomments}{rgb}{0, 0.5, 0} | |
\definecolor{redstrings}{rgb}{0.9, 0, 0} | |
\definecolor{graynumbers}{rgb}{0.5, 0.5, 0.5} | |
\usepackage{listings} | |
\lstset{ | |
autogobble, | |
columns=fullflexible, | |
showspaces=false, | |
showtabs=false, | |
breaklines=true, | |
showstringspaces=false, | |
breakatwhitespace=true, | |
escapeinside={(*@}{@*)}, | |
commentstyle=\color{greencomments}, | |
keywordstyle=\color{bluekeywords}, | |
stringstyle=\color{redstrings}, | |
numberstyle=\color{graynumbers}, | |
basicstyle=\ttfamily\footnotesize, | |
frame=l, | |
framesep=12pt, | |
xleftmargin=12pt, | |
tabsize=4, | |
captionpos=b | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment