Last active
March 14, 2024 16:35
-
-
Save FelipeCortez/10729134 to your computer and use it in GitHub Desktop.
LaTeX pretty listings
This file contains hidden or 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
Used this in an emacs org-mode file and it worked out of the box! Thanks very much!