-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook.tplx
More file actions
91 lines (67 loc) · 2.83 KB
/
book.tplx
File metadata and controls
91 lines (67 loc) · 2.83 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
% Default to the notebook output style
((* if not cell_style is defined *))
((* set cell_style = 'style_ipython.tplx' *))
((* endif *))
% Inherit from the specified cell style.
((* extends cell_style *))
%===============================================================================
% Latex Book
%===============================================================================
((* block predoc *))
((( super() )))
((* block tableofcontents *))\tableofcontents((* endblock tableofcontents *))
((* endblock predoc *))
((* block docclass *))
\documentclass[10pt, reprint, floatfix, groupaddress, prb, twoside]{book}
\usepackage[francais]{babel} % Pour la langue française
% Force floating figures to be [H]
\usepackage{float}
\floatplacement{figure}{H}
\usepackage[svgnames]{xcolor} % Required for colour specification
\definecolor{pythonblue}{rgb}{0.21,0.45,0.65}
\definecolor{pythonyellow}{rgb}{1.,0.77,0.18}
((* endblock docclass *))
((* block markdowncell scoped *))
((( cell.source | citation2latex | strip_files_prefix | convert_pandoc('markdown', 'json',extra_args=[]) | resolve_references | convert_pandoc('json','latex', extra_args=["--top-level-division=chapter"]) )))
((* endblock markdowncell *))
((* block maketitle *))
\begin{titlepage}
\vspace*{\baselineskip}
\centering
{\Large Matthieu Boileau \& Vincent Legoll}
\vspace*{0.167\textheight}
\raggedleft
\textbf{\fontsize{30}{36}\selectfont Apprendre}\\[\baselineskip]
\textbf{\textcolor{pythonblue}{\fontsize{50}{60}\selectfont Python}}\\[\baselineskip]
\textcolor{pythonyellow}{\fontsize{30}{36}\selectfont \textit{pour les sciences}}
\vspace*{0.1\textheight}
\centering
\includegraphics{fig/head_of_python_molurus_frame}
\vfill
{\large CNRS - Université de Strasbourg}
\end{titlepage}
((* endblock maketitle *))
((* block bibliography *))
\bibliographystyle{unsrt}
\bibliography{riemann}
((* endblock bibliography *))
((*- block any_cell -*))
((*- if not 'hide' in cell['metadata'].get('tags', {}) -*))
((( super() )))
((*- endif -*))
((*- endblock any_cell -*))
((* block input scoped *))
((( add_my_prompt(cell.source | highlight_code(strip_verbatim=True), cell, 'In ', 'incolor') )))
((* endblock input *))
% Purpose: Renders an output/input prompt
((* macro add_my_prompt(text, cell, prompt, prompt_color) -*))
((*- if cell.execution_count is defined -*))
((*- set execution_count = "" ~ (cell.execution_count | replace(None, " ")) -*))
((*- else -*))
((*- set execution_count = " " -*))
((*- endif -*))
((*- set indention = " " * (execution_count | length + 7) -*))
\begin{Verbatim}[fontsize=\small,commandchars=\\\{\}]
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) )))
\end{Verbatim}
((*- endmacro *))