modified listings config

This commit is contained in:
gabe 2022-02-13 19:35:29 -06:00
parent f88f0f63cd
commit b377566b39

View file

@ -1,4 +1,6 @@
\documentclass[12pt]{article} \documentclass[12pt]{article}
%colours
\usepackage[dvipsnames]{xcolour}
%to set margins %to set margins
\usepackage[margin=2cm]{geometry} \usepackage[margin=2cm]{geometry}
%for math typing %for math typing
@ -8,6 +10,29 @@
%for algorithm typing %for algorithm typing
\usepackage[noEnd=false]{algpseudocodex} \usepackage[noEnd=false]{algpseudocodex}
%set some settings for listings package
\lstset{
backgroundcolor=\color{white},
basicstyle=\footnotesize\ttfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
commentstyle=\color{green},
frame=single,
keepspaces=true,
keywordstyle=\color{blue},
numbers=left,
numbersep=5pt,
numberstyle=\tiny\color{gray},
rulecolor=\color{black},
showspaces=false,
showstringspaces=true,
showtabs=true,
stepnumber=1,
stringstyle=\color{BurntOrange},
tabsize=2,
}
%turn off section below a specific depth %turn off section below a specific depth
% \setcounter{secnumdepth}{0} % \setcounter{secnumdepth}{0}