-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbook.tex
82 lines (66 loc) · 1.8 KB
/
book.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
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
\documentclass[11pt,a4paper,titlepage]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[finnish]{babel}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{tabularx}
\usepackage[toc]{glossaries}
\usepackage{tcolorbox}
\tcbuselibrary{minted}
\tcbuselibrary{xparse}
\title{Python-kurssin oppikirja (nimi työn alla)}
\author{Mikko Tampio}
\DeclareTCBListing{python}{ O{} }{
colback=red!5!white,
colframe=red!75!black,
listing only,
listing engine=minted,
minted language=python,
left=5mm,
minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=3mm}}
\DeclareTCBListing[auto counter,number within=chapter]{example}{ s O{} m }{
colback=red!5!white,
colframe=red!75!black,
listing only,
fonttitle=\bfseries,
title=Esimerkki~\thetcbcounter: #3,
listing engine=minted,
minted language=python,
left=5mm,
minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=3mm}}
\DeclareTCBListing{bash}{ O{} }{
colback=blue!5!white,
colframe=blue!75!black,
listing only,
listing engine=minted,
minted language=text,
left=5mm,
minted options={fontsize=\small,breaklines,autogobble,numbersep=3mm}}
\DeclareTCBListing{output}{ O{} }{
colback=red!5!white,
colframe=red!75!black,
listing only,
listing engine=minted,
left=5mm,
minted options={fontsize=\small,breaklines,autogobble,numbersep=3mm}}
\def\code#1{\texttt{#1}}
\graphicspath{{images/}}
\makeglossaries
\include{glossary}
\begin{document}
\maketitle
\tableofcontents
\include{chapters/chapter1}
\include{chapters/chapter2}
\include{chapters/chapter3}
\include{chapters/chapter4}
\include{chapters/chapter5}
\include{chapters/chapter6}
\include{chapters/chapter7}
\include{chapters/chapter8}
\include{chapters/chapter9}
\include{chapters/chapter10}
\printglossaries
\end{document}