-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIntro_to_Python.tex
56 lines (47 loc) · 1.28 KB
/
Intro_to_Python.tex
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
\title{\vspace{-3cm}Introduction to Python}
\author{
Peter Crowther\\
HH Wills Physics Laboratory, Bristol
}
\date{\today}
\documentclass[12pt, a4paper]{article}
\usepackage{listings}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{color}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
\newcounter{task}
\newenvironment{task}[1][]{\refstepcounter{task}\par\bfseries{Task~\thetask. #1}}{\par}
\newcounter{advancedtask}
\newenvironment{advancedtask}[1][]{\refstepcounter{advancedtask}\par\bfseries{Optional Advanced Task~\theadvancedtask. #1}}{\par}
\begin{document}
\maketitle
\input{chapters/pre_intro}
\input{chapters/intro_to_python}
\newpage
\input{chapters/appendicies}
\end{document}