-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlatex_template.tplx
118 lines (83 loc) · 2.94 KB
/
latex_template.tplx
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
((* extends 'article.tplx' *))
((* block docclass *))
\documentclass[a4paper,11pt]{article}
((* endblock docclass *))
((* block header *))
((( super() )))
\usepackage{amssymb}% for numbers/numbers
\usepackage{amsmath} % NSOB. For SymPy chapter (LaTeX-output section)
\usepackage{sectsty}
\allsectionsfont{\sffamily}
\setlength{\textheight}{24cm}
\setlength{\textwidth}{16cm}
% my format of pages
\setlength{\textheight}{24cm}
\setlength{\textwidth}{17cm}
%%Double sided printing:
%\setlength{\evensidemargin}{-0.54cm}
%\setlength{\oddsidemargin}{0.46cm}
\setlength{\oddsidemargin}{0.0cm}
\setlength{\evensidemargin}{0.0cm}
\setlength{\topmargin}{-0.3cm}
%\setlength{\parindent}{0cm}
%\usepackage[polish]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{listings}
\usepackage{color}
\lstdefinestyle{defaultstyle}{}
\lstset{language=Python}
\lstset{basicstyle=\ttfamily}
\lstset{showstringspaces=fales}
\lstset{keywordstyle=\color{blue}}
\lstset{frame=single}
\lstset{backgroundcolor=\color{white},emph={EMPTY},emphstyle=\color{white}}
\definecolor{lightgrey}{cmyk}{0.05,0.05,0.05,0}
\lstset{backgroundcolor=\color{lightgrey}}
\newcommand{\py}[1]{\texttt{\color{blue}#1}}
\newcommand{\myhtmlniceskip}{\vspace{1pt}}
\newcommand{\furtherinfosep}{\medskip}
\newcommand{\htmllink}[2]{\href{#2}{#1}}
%Example:
% \href{http://nmag.soton.ac.uk}{nmag}
% \htmllink{nmag}{http://nmag.soton.ac.uk}
%Eiter use html
%\usepackage{html}
%
% or redefine commands
%\newcommand{\htmladdnormallink}[2]{#1}
\usepackage{hyperref}
\renewcommand{\labelitemii}{\ensuremath{\triangleright}} % open triangle replaces default dash
\usepackage{graphicx}
((* endblock header *))
((* block predoc *))
\title{
\textbf{\sffamily \huge Authoring }\\[0.5cm]
\sffamily(with SageMath and Python notebooks )}
\author{James Bond}
\date{ \sffamily \today \\[3cm]
\sffamily Download Juptyer Notebook files, pdf and html files of this book from\\
\sffamily \href{https://github.com/OpenDreamKit/authoring\_cookie\_cutter}{https://github.com/OpenDreamKit/authoring\_cookie\_cutter}
} % end of \date
\maketitle
\newpage
\tableofcontents
\newpage
((* endblock predoc *))
((*- if draw_cell is not defined -*)) % Required to allow overriding.
((* macro draw_cell(text, cell, prompt, prompt_color, extra_space) -*))
((*- if prompt == 'In' -*))
((*- set style = "breakable,before skip=0.4cm, after skip=0.4cm, size=fbox, boxrule=1pt, pad at break*=1mm,colback=cellbackground, colframe=cellborder"-*))
((*- else -*))((*- set style = "breakable, before skip=0.4cm, after skip=0.4cm, size=fbox, boxrule=.5pt, pad at break*=1mm, opacityfill=0"-*))((*- endif -*))
\begin{tcolorbox}[((( style )))]
(((- draw_prompt(cell, prompt, prompt_color, extra_space) )))
\begin{Verbatim}[commandchars=\\\{\}]
((( text )))
\end{Verbatim}
\end{tcolorbox}
((*- endmacro *))
((*- endif -*))
((* block markdowncell scoped *))
\setlength{\parindent}{0cm}
\setlength{\parskip}{3mm}
((( super() )))
((* endblock markdowncell *))