1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
\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}
|