-
-
Save katrinafyi/a5ccfc9ee609c16a68dcfb1ca58e1aa9 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 | |
\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\small, | |
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