\hypersetup{colorlinks=true,filecolor=magenta}

\parindent=0pt

\lstset{gobble=2}

\def\bgcolour#1{\lstset{backgroundcolor=\color{#1}}}

\def\pythonstyle{\lstset{%
language=python,
gobble=2,
basicstyle={\small\tt},basewidth={0.50em},
numbers=none,numberstyle=\tiny,numbersep=10pt,
aboveskip=0pt,belowskip=0pt,
frame=none,framesep=0pt,framerule=0pt,
}}

\def\latexstyle{\lstset{%
language={[LaTeX]TeX},
gobble=2,
basicstyle={\small\tt},basewidth={0.50em},
numbers=none,numberstyle=\tiny,numbersep=10pt,
aboveskip=0pt,belowskip=0pt,
backgroundcolor=\color{white},
frame=none,framesep=0pt,framerule=0pt,
texcsstyle=*\bfseries\color{blue},
stringstyle=\color{green},
commentstyle=\color{blue}\slshape,
}}

\lstnewenvironment{latex}{\begingroup\latexstyle}{\endgroup}
