Show More
@@ -1,128 +1,136 b'' | |||
|
1 | 1 | ((============================================================================ |
|
2 | 2 | NBConvert Sphinx-Latex Template |
|
3 | 3 | |
|
4 | 4 | Purpose: Allow export of PDF friendly Latex inspired by Sphinx. Most of the |
|
5 | 5 | template is derived directly from Sphinx source. |
|
6 | 6 | |
|
7 | 7 | Inheritance: null>display_priority>latex_base |
|
8 | 8 | |
|
9 | 9 | ==========================================================================)) |
|
10 | 10 | |
|
11 | 11 | ((*- extends 'latex_base.tplx' -*)) |
|
12 | 12 | |
|
13 | 13 | % Header, overrides base |
|
14 | 14 | ((* block header *)) |
|
15 | 15 | |
|
16 | 16 | % Make sure that the sphinx doc style knows who it inherits from. |
|
17 | 17 | \def\sphinxdocclass{(((parentdocumentclass)))} |
|
18 | 18 | |
|
19 | 19 | % Declare the document class |
|
20 | 20 | \documentclass[letterpaper,10pt,english]{sphinx(((documentclass)))} |
|
21 | 21 | |
|
22 | 22 | % Imports |
|
23 | 23 | \usepackage[utf8]{inputenc} |
|
24 | 24 | \DeclareUnicodeCharacter{00A0}{\\nobreakspace} |
|
25 | 25 | \usepackage[T1]{fontenc} |
|
26 | 26 | \usepackage{babel} |
|
27 | 27 | \usepackage{times} |
|
28 | 28 | \usepackage{import} |
|
29 | 29 | \usepackage[Bjarne]{fncychap} |
|
30 | 30 | \usepackage{longtable} |
|
31 | 31 | \usepackage{sphinx} |
|
32 | 32 | \usepackage{multirow} |
|
33 | 33 | |
|
34 | 34 | % Document level variables |
|
35 | 35 | \title{((( nb.metadata.name )))} |
|
36 | 36 | \date{\today} |
|
37 | 37 | \release{} |
|
38 | 38 | \author{Unknown Author} |
|
39 | 39 | \newcommand{\sphinxlogo}{} |
|
40 | 40 | \renewcommand{\releasename}{Release} |
|
41 | 41 | \makeindex |
|
42 | 42 | |
|
43 | 43 | |
|
44 | 44 | ((* block sphinxheader *))((* endblock sphinxheader *)) |
|
45 | 45 | |
|
46 | 46 | ((* endblock header *)) |
|
47 | 47 | |
|
48 | 48 | % Body |
|
49 | 49 | ((* block bodyBegin *)) |
|
50 | 50 | |
|
51 | 51 | % Start of the document |
|
52 | 52 | \begin{document} |
|
53 | 53 | \maketitle |
|
54 | 54 | \tableofcontents |
|
55 | 55 | ((* endblock bodyBegin *)) |
|
56 | 56 | ((* block bodyEnd *)) |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | \renewcommand{\indexname}{Index} |
|
60 | 60 | \printindex |
|
61 | 61 | \end{document} |
|
62 | 62 | ((* endblock bodyEnd *)) |
|
63 | 63 | |
|
64 | 64 | % Footer |
|
65 | 65 | ((* block footer *)) |
|
66 | 66 | ((* endblock footer *)) |
|
67 | 67 | |
|
68 |
((*- block |
|
|
69 | ((( cell.source))) | |
|
70 |
((*- if cell. |
|
|
68 | ((*- block headingcell-*)) | |
|
69 | ||
|
70 | ((*- if cell.level == 1 -*)) | |
|
71 | \part | |
|
72 | ((*- elif cell.level == 2 -*)) | |
|
73 | \chapter | |
|
74 | ((*- elif cell.level == 3 -*)) | |
|
75 | \section | |
|
76 | ((*- elif cell.level == 4 -*)) | |
|
77 | \subsection | |
|
78 | ((*- elif cell.level == 5 -*)) | |
|
79 | \subsubsection | |
|
80 | ((*- elif cell.level == 6 -*)) | |
|
81 | \paragraph | |
|
82 | ((*- endif -*)){((( cell.source )))} | |
|
83 | ((*- endblock headingcell -*)) | |
|
71 | 84 | |
|
72 | 85 |
|
|
73 | 86 |
|
|
74 | 87 |
|
|
75 | 88 |
|
|
76 | 89 |
|
|
77 | 90 |
|
|
78 | 91 |
|
|
79 | 92 |
|
|
80 | 93 |
|
|
81 | 94 |
|
|
82 | 95 |
|
|
83 | 96 |
|
|
84 | 97 |
|
|
85 | 98 |
|
|
86 | 99 |
|
|
87 | 100 |
|
|
88 | 101 |
|
|
89 | 102 |
|
|
90 | 103 |
|
|
91 | 104 |
|
|
92 | 105 |
|
|
93 | 106 |
|
|
94 | 107 |
|
|
95 | 108 |
|
|
96 | 109 |
|
|
97 | 110 |
|
|
98 | 111 |
|
|
99 | 112 |
|
|
100 | 113 |
|
|
101 | 114 |
|
|
102 | 115 |
|
|
103 | 116 |
|
|
104 | 117 |
|
|
105 | 118 |
|
|
106 | 119 |
|
|
107 | 120 |
|
|
108 | 121 |
|
|
109 | 122 |
|
|
110 | 123 |
|
|
111 | ((*- elif cell.type in ['markdown'] -*)) | |
|
112 | 124 | |
|
113 | 125 |
|
|
126 | %TODO: Get this working! | |
|
114 | 127 |
|
|
115 | ((*- elif cell.type in ['heading'] -*)) | |
|
116 | 128 | |
|
117 | ((*- block headingcell scoped-*)) | |
|
118 | ((*- endblock headingcell -*)) | |
|
119 | ((*- elif cell.type in ['raw'] -*)) | |
|
120 | 129 | |
|
121 | 130 |
|
|
131 | ||
|
122 | 132 |
|
|
123 | ((*- else -*)) | |
|
124 | 133 | |
|
125 | 134 |
|
|
135 | ||
|
126 | 136 |
|
|
127 | ((*- endif -*)) | |
|
128 | ((*- endblock any_cell -*)) |
General Comments 0
You need to be logged in to leave comments.
Login now