-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-exemplars.tex
More file actions
148 lines (116 loc) · 3.43 KB
/
python-exemplars.tex
File metadata and controls
148 lines (116 loc) · 3.43 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
% !TeX root = python-exemplars.tex
%!TEX program = xelatex
\documentclass{layout/qut-report}
%% Setting up the bibliography
% \usepackage[british]{babel}
% \usepackage{csquotes}
% \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber,doi=false,isbn=false,url=false]{biblatex}
% \DeclareLanguageMapping{british}{british-apa}
% \newcommand\posscite[1]{\citeauthor{#1}'s (\citeyear{#1})}
% %\addbibresource{references/GIBSON_pubs_biblatex-201104.bib}
% \addbibresource{references/bib1.bib}
% \addbibresource{references/bib2.bib}
% \AtEveryBibitem{\clearfield{doi}\clearfield{url}}
% \AtEveryCitekey{\clearfield{doi}\clearfield{url}}
%\usepackage{biblatex}
%\addbibresource{report.bib}
%% Additional packages
\usepackage{todonotes}
\newcommand{\idea}[1]{\todo[inline,backgroundcolor=green!10,bordercolor=gray]{\textbf{AG: }#1}}
\newcommand{\fix}[1]{\todo[inline,backgroundcolor=yellow!95,bordercolor=gray]{\textbf{FIX: }#1}}
\usepackage{pdfpages} % Insert .pdf directly as pages
%\input{minted.tex}
\usepackage[outputdir=./output]{minted} % Display code - use 'listings' offline without shell escape
%\usepackage[none]{hyphenat} % Disables word breaking
\usepackage{xpatch}
\makeatletter
% replace executable python with python3
\xpatchcmd\minted@pygmentize
{python -c}
{python3 -c}
{}{\fail}
\xpatchcmd\minted@autogobble
{python -c}
{python3 -c}
{}{\fail}
\makeatother
\setminted[python]{
python3=true,
autogobble=true,
frame=leftline,
framesep=2mm,
framerule=1mm,
rulecolor=gray!60,
numbersep=1mm,
baselinestretch=1.3,
bgcolor=gray!10,
fontsize=\small,
linenos,
numberblanklines=false,
samepage=true
}
\newminted[pycode]{python}{
python3=true,
autogobble=true,
frame=leftline,
framesep=2mm,
framerule=1mm,
rulecolor=gray!60,
numbersep=1mm,
baselinestretch=1.3,
bgcolor=gray!10,
fontsize=\small,
linenos,
numberblanklines=false,
samepage=true
}
\usepackage{fancyvrb}
\newcommand{\code}[1]{\colorbox{gray!15}{\texttt{\Verb!#1!}}}
%% Additional commands
\renewcommand{\deg}{\si{\degree}\xspace}
%%%%% Begin of document %%%%%
\begin{document}
%% Roman numerals
\frontmatter
%% Defining the main parameters
\title{Python for Data Analytics}
%\subtitle{subtitle} % Two lines recommended
\reportdate{February 2023}
\author{Andrew Gibson}
%\subject{AB1234: Course Name}
%\listoftodos
\coverimage{layout/qut/QUT_Report_Cover-gradient.pdf}
%\makecover
%\input{frontmatter/title}
%\input{frontmatter/preface}
%\input{frontmatter/summary}
\renewcommand{\baselinestretch}{1.3}\normalsize %add a little more space between lines in the TOC
\tableofcontents
\renewcommand{\baselinestretch}{1.0}\normalsize
%% List of abbreviations, symbols, figures and tables
%\input{frontmatter/nomenclature}
%\renewcommand{\baselinestretch}{1.2}\normalsize
%\listoffigures
%\listoftables
\renewcommand{\baselinestretch}{1.0}\normalsize
%% Arabic numerals
\mainmatter
%\input{mainmatter/01_exec_summary}
\input{01_introduction.tex}
\input{02_basics.tex}
\input{03_reading.tex}
\input{04_cleaning.tex}
\input{05_analysing.tex}
\input{06_visualising.tex}
\input{07_sharing.tex}
%% Prevent urls running into margins in bibliography
% \setcounter{biburlnumpenalty}{7000}
% \setcounter{biburllcpenalty}{7000}
% \setcounter{biburlucpenalty}{7000}
%% Bibliography is numeric style
% \printbibliography[title=References]
% \addcontentsline{toc}{chapter}{References}
%% Using letters for chapters
%\appendix
%\input{appendix/appendix-b}
\end{document}