Skip to content

Instantly share code, notes, and snippets.

@luckylittle
Last active July 29, 2023 06:12
Show Gist options
  • Save luckylittle/32a90c2024c4183bf01ebc752cbaae51 to your computer and use it in GitHub Desktop.
Save luckylittle/32a90c2024c4183bf01ebc752cbaae51 to your computer and use it in GitHub Desktop.
LaTeX Code Listings example
% Contents of listings-setup.tex
% Example: pandoc -f markdown_github --listings -H listings-setup.tex -V geometry:margin=0.3in RH342.md -o RH342.pdf
\usepackage{xcolor}
\lstset{
basicstyle=\ttfamily,
keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries,
stringstyle=\color[rgb]{0.31,0.60,0.02},
commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape,
backgroundcolor=\color[RGB]{248,248,248},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
escapeinside={\%*}{*)},
linewidth=\textwidth,
basewidth=0.5em,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment