##// END OF EJS Templates
Redo of fixing templates structure.
damianavila -
Show More
@@ -1,15 +1,15 b''
1 {%- extends 'display_priority.tpl' -%}
1 {%- extends 'display_priority.tpl' -%}
2
2
3
3
4
5 {% block codecell %}
4 {% block codecell %}
6 <div class="cell border-box-sizing code_cell vbox">
5 <div class="cell border-box-sizing code_cell vbox">
7 {{ super() }}</div>
6 {{ super() }}
7 </div>
8 {%- endblock codecell %}
8 {%- endblock codecell %}
9
9
10 {% block input_group -%}
10 {% block input_group -%}
11 <div class="input hbox">
11 <div class="input hbox">
12 {{super()}}
12 {{ super() }}
13 </div>
13 </div>
14 {% endblock input_group %}
14 {% endblock input_group %}
15
15
@@ -22,7 +22,9 b''
22 {% endblock output_group %}
22 {% endblock output_group %}
23
23
24 {% block in_prompt -%}
24 {% block in_prompt -%}
25 <div class="prompt input_prompt">In&nbsp;[{{cell.prompt_number}}]:</div>
25 <div class="prompt input_prompt">
26 In&nbsp;[{{ cell.prompt_number }}]:
27 </div>
26 {%- endblock in_prompt %}
28 {%- endblock in_prompt %}
27
29
28 {#
30 {#
@@ -34,32 +36,32 b''
34
36
35 {% block input %}
37 {% block input %}
36 <div class="input_area box-flex1">
38 <div class="input_area box-flex1">
37 {{cell.input | highlight2html }}
39 {{ cell.input | highlight2html }}
38 </div>
40 </div>
39 {%- endblock input %}
41 {%- endblock input %}
40
42
41 {% block output %}
43 {% block output %}
42 <div class="hbox output_area">
44 <div class="hbox output_area">
43 {%- if output.output_type == 'pyout' -%}
45 {%- if output.output_type == 'pyout' -%}
44 <div class="prompt output_prompt">
46 <div class="prompt output_prompt">
45 Out[{{cell.prompt_number}}]:
47 Out[{{ cell.prompt_number }}]:
46 {%- else -%}
48 {%- else -%}
47 <div class="prompt">
49 <div class="prompt">
48 {%- endif -%}
50 {%- endif -%}
49 </div>
51 </div>
50 {{ super() }}
52 {{ super() }}
51 </div>
53 </div>
52 {% endblock output %}
54 {% endblock output %}
53
55
54 {% block markdowncell scoped %}
56 {% block markdowncell scoped %}
55 <div class="text_cell_render border-box-sizing rendered_html">
57 <div class="text_cell_render border-box-sizing rendered_html">
56 {{ cell.source | strip_math_space | markdown2html | strip_files_prefix}}
58 {{ cell.source | strip_math_space | markdown2html | strip_files_prefix }}
57 </div>
59 </div>
58 {%- endblock markdowncell %}
60 {%- endblock markdowncell %}
59
61
60 {% block headingcell scoped %}
62 {% block headingcell scoped %}
61 <div class="text_cell_render border-box-sizing rendered_html">
63 <div class="text_cell_render border-box-sizing rendered_html">
62 {{("#" * cell.level + cell.source) | replace('\n', ' ') | strip_math_space | markdown2html | strip_files_prefix | add_anchor }}
64 {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | strip_math_space | markdown2html | strip_files_prefix | add_anchor }}
63 </div>
65 </div>
64 {% endblock headingcell %}
66 {% endblock headingcell %}
65
67
@@ -68,71 +70,73 b' Out[{{cell.prompt_number}}]:'
68 {% endblock rawcell %}
70 {% endblock rawcell %}
69
71
70 {% block unknowncell scoped %}
72 {% block unknowncell scoped %}
71 unknown type {{cell.type}}
73 unknown type {{ cell.type }}
72 {% endblock unknowncell %}
74 {% endblock unknowncell %}
73
75
74
75 {% block pyout -%}
76 {% block pyout -%}
76 <div class="box-flex1 output_subarea output_pyout">
77 <div class="box-flex1 output_subarea output_pyout">
77 {% block data_priority scoped %}{{ super()}}{% endblock %}
78 {% block data_priority scoped %}
79 {{ super() }}
80 {% endblock %}
78 </div>
81 </div>
79 {%- endblock pyout %}
82 {%- endblock pyout %}
80
83
81 {% block stream_stdout -%}
84 {% block stream_stdout -%}
82 <div class="box-flex1 output_subarea output_stream output_stdout">
85 <div class="box-flex1 output_subarea output_stream output_stdout">
83 <pre>{{output.text |ansi2html}}</pre>
86 <pre>
87 {{ output.text | ansi2html }}
88 </pre>
84 </div>
89 </div>
85 {%- endblock stream_stdout %}
90 {%- endblock stream_stdout %}
86
91
87 {% block stream_stderr -%}
92 {% block stream_stderr -%}
88 <div class="box-flex1 output_subarea output_stream output_stderr">
93 <div class="box-flex1 output_subarea output_stream output_stderr">
89 <pre>{{output.text |ansi2html}}</pre>
94 <pre>
95 {{ output.text | ansi2html }}
96 </pre>
90 </div>
97 </div>
91 {%- endblock stream_stderr %}
98 {%- endblock stream_stderr %}
92
99
93 {% block data_svg -%}
100 {% block data_svg -%}
94 {{output.svg}}
101 {{ output.svg }}
95 {%- endblock data_svg %}
102 {%- endblock data_svg %}
96
103
97
98 {% block data_html -%}
104 {% block data_html -%}
99 <div class="output_html rendered_html">
105 <div class="output_html rendered_html">
100 {{output.html}}
106 {{ output.html }}
101 </div>
107 </div>
102 {%- endblock data_html %}
108 {%- endblock data_html %}
103
109
104 {% block data_png %}
110 {% block data_png %}
105 <img src="data:image/png;base64,{{output.png}}">
111 <img src="data:image/png;base64,{{ output.png }}">
106 {%- endblock data_png %}
112 {%- endblock data_png %}
107
113
108
109 {% block data_jpg %}
114 {% block data_jpg %}
110 <img src="data:image/jpeg;base64,{{output.jpeg}}">
115 <img src="data:image/jpeg;base64,{{ output.jpeg }}">
111 {%- endblock data_jpg %}
116 {%- endblock data_jpg %}
112
117
113
114 {% block data_latex %}
118 {% block data_latex %}
115 {{output.latex}}
119 {{ output.latex }}
116 {%- endblock data_latex %}
120 {%- endblock data_latex %}
117
121
118 {% block pyerr -%}
122 {% block pyerr -%}
119 <div class="box-flex1 output_subarea output_pyerr">
123 <div class="box-flex1 output_subarea output_pyerr">
120 <pre>{{super()}}</pre>
124 <pre>{{ super() }}</pre>
121 </div>
125 </div>
122 {%- endblock pyerr %}
126 {%- endblock pyerr %}
123
127
124 {%- block traceback_line %}
128 {%- block traceback_line %}
125 {{line| ansi2html}}
129 {{ line | ansi2html }}
126 {%- endblock traceback_line %}
130 {%- endblock traceback_line %}
127
131
128
129 {%- block data_text %}
132 {%- block data_text %}
130 <pre>{{output.text | ansi2html}}</pre>
133 <pre>
134 {{ output.text | ansi2html }}
135 </pre>
131 {%- endblock -%}
136 {%- endblock -%}
132
137
133
134 {%- block display_data scoped -%}
138 {%- block display_data scoped -%}
135 <div class="box-flex1 output_subarea output_display_data">
139 <div class="box-flex1 output_subarea output_display_data">
136 {{super()}}
140 {{ super() }}
137 </div>
141 </div>
138 {%- endblock display_data -%}
142 {%- endblock display_data -%} No newline at end of file
@@ -1,14 +1,16 b''
1 {%- extends 'html_basic.tpl' -%}
1 {%- extends 'html_basic.tpl' -%}
2
2
3 {%- block header -%}<!DOCTYPE html>
3
4 {%- block header -%}
5 <!DOCTYPE html>
4 <html>
6 <html>
5 <head>
7 <head>
6 <meta charset="UTF-8">
8 <meta charset="UTF-8">
7 <title>[{{nb.metadata.name}}]</title>
9 <title>[{{nb.metadata.name}}]</title>
8 {% for css in resources.inlining.css -%}
10 {% for css in resources.inlining.css -%}
9 <style type="text/css">
11 <style type="text/css">
10 {{css}}
12 {{ css }}
11 </style>
13 </style>
12 {% endfor %}
14 {% endfor %}
13
15
14 <style type="text/css">
16 <style type="text/css">
@@ -32,9 +34,7 b' pre {'
32 <!-- Custom stylesheet, it must be in the same directory as the html file -->
34 <!-- Custom stylesheet, it must be in the same directory as the html file -->
33 <link rel="stylesheet" href="custom.css">
35 <link rel="stylesheet" href="custom.css">
34
36
35 <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript">
37 <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script>
36
37 </script>
38 <script type="text/javascript">
38 <script type="text/javascript">
39 init_mathjax = function() {
39 init_mathjax = function() {
40 if (window.MathJax) {
40 if (window.MathJax) {
@@ -57,12 +57,12 b' init_mathjax();'
57 </head>
57 </head>
58 {%- endblock header -%}
58 {%- endblock header -%}
59
59
60
61 {% block body %}
60 {% block body %}
62 <body>{{ super() }}
61 <body>
62 {{ super() }}
63 </body>
63 </body>
64 {%- endblock body %}
64 {%- endblock body %}
65
65
66
67 {% block footer %}
66 {% block footer %}
68 </html>{% endblock footer %}
67 </html>
68 {% endblock footer %} No newline at end of file
@@ -10,6 +10,10 b''
10
10
11 ((*- extends 'sphinx.tplx' -*))
11 ((*- extends 'sphinx.tplx' -*))
12
12
13
14
15
16
13 ((* set parentdocumentclass = 'article' *))
17 ((* set parentdocumentclass = 'article' *))
14 ((* set documentclass = 'howto' *))
18 ((* set documentclass = 'howto' *))
15
19
@@ -1,12 +1,17 b''
1 ((*- extends 'display_priority.tplx' -*))
1 ((*- extends 'display_priority.tplx' -*))
2
2
3
3 \nonstopmode
4 \nonstopmode
4
5
5 ((* block in_prompt *))((* endblock in_prompt *))
6 ((* block in_prompt *))
7 ((* endblock in_prompt *))
6
8
7 ((* block output_prompt *))((* endblock output_prompt *))
9 ((* block output_prompt *))
10 ((* endblock output_prompt *))
8
11
9 ((* block codecell *))\begin{codecell}((( super() )))
12 ((* block codecell *))
13 \begin{codecell}
14 ((( super() )))
10 \end{codecell}
15 \end{codecell}
11 ((* endblock *))
16 ((* endblock *))
12
17
@@ -18,59 +23,62 b''
18 \end{codeinput}
23 \end{codeinput}
19 ((* endblock input *))
24 ((* endblock input *))
20
25
21
22 ((= Those Two are for error displaying
26 ((= Those Two are for error displaying
23 even if the first one seem to do nothing,
27 even if the first one seem to do nothing,
24 it introduces a new line
28 it introduces a new line
25
26 =))
29 =))
30
27 ((* block pyerr *))
31 ((* block pyerr *))
28 \begin{traceback}
32 \begin{traceback}
29 \begin{verbatim}((( super() )))
33 \begin{verbatim}
34 ((( super() )))
30 \end{verbatim}
35 \end{verbatim}
31 \end{traceback}
36 \end{traceback}
32 ((* endblock pyerr *))
37 ((* endblock pyerr *))
33
38
34 ((* block traceback_line *))
39 ((* block traceback_line *))
35 ((( line |indent| strip_ansi )))((* endblock traceback_line *))
40 ((( line | indent | strip_ansi )))
41 ((* endblock traceback_line *))
36 ((= .... =))
42 ((= .... =))
37
43
38
39 ((*- block output_group -*))
44 ((*- block output_group -*))
40 \begin{codeoutput}
45 \begin{codeoutput}
41 ((( super() )))
46 ((( super() )))
42 \end{codeoutput}((* endblock *))
47 \end{codeoutput}
48 ((* endblock *))
43
49
44 ((*- block data_png -*))
50 ((*- block data_png -*))
45 \begin{center}
51 \begin{center}
46 \includegraphics[max size={0.7\textwidth}{0.9\textheight}]{(((output.png_filename)))}
52 \includegraphics[max size={0.7\textwidth}{0.9\textheight}]{((( output.png_filename )))}
47 \par
53 \par
48 \end{center}
54 \end{center}
49 ((*- endblock -*))
55 ((*- endblock -*))
50
56
51 ((*- block data_jpg -*))
57 ((*- block data_jpg -*))
52 \begin{center}
58 \begin{center}
53 \includegraphics[max size={0.7\textwidth}{0.9\textheight}]{(((output.jpeg_filename)))}
59 \includegraphics[max size={0.7\textwidth}{0.9\textheight}]{((( output.jpeg_filename )))}
54 \par
60 \par
55 \end{center}
61 \end{center}
56 ((*- endblock -*))
62 ((*- endblock -*))
57
63
58 ((*- block data_svg -*))
64 ((*- block data_svg -*))
59 \begin{center}
65 \begin{center}
60 \includegraphics[width=0.7\textwidth]{(((output.svg_filename)))}
66 \includegraphics[width=0.7\textwidth]{((( output.svg_filename )))}
61 \par
67 \par
62 \end{center}
68 \end{center}
63 ((*- endblock -*))
69 ((*- endblock -*))
64
70
65 ((*- block data_pdf -*))
71 ((*- block data_pdf -*))
66 \begin{center}
72 \begin{center}
67 \includegraphics[width=0.7\textwidth]{(((output.pdf_filename)))}
73 \includegraphics[width=0.7\textwidth]{((( output.pdf_filename )))}
68 \par
74 \par
69 \end{center}
75 \end{center}
70 ((*- endblock -*))
76 ((*- endblock -*))
71
77
72 ((* block pyout *))
78 ((* block pyout *))
73 ((* block data_priority scoped *))((( super() )))((* endblock *))
79 ((* block data_priority scoped *))
80 ((( super() )))
81 ((* endblock *))
74 ((* endblock pyout *))
82 ((* endblock pyout *))
75
83
76 ((* block data_text *))
84 ((* block data_text *))
@@ -81,22 +89,25 b' it introduces a new line'
81
89
82 ((* block data_latex -*))
90 ((* block data_latex -*))
83 ((*- if output.latex.startswith('$'): -*)) \begin{equation*}
91 ((*- if output.latex.startswith('$'): -*)) \begin{equation*}
84 ((( output.latex | strip_dollars)))
92 ((( output.latex | strip_dollars )))
85 \end{equation*}
93 \end{equation*}
86 ((*- else -*)) ((( output.latex ))) ((*- endif *))
94 ((*- else -*))
95 ((( output.latex )))
96 ((*- endif *))
87 ((* endblock *))
97 ((* endblock *))
88
98
89 ((* block stream *))
99 ((* block stream *))
90 \begin{Verbatim}[commandchars=\\\{\}]
100 \begin{Verbatim}[commandchars=\\\{\}]
91 ((( output.text | ansi2latex)))
101 ((( output.text | ansi2latex )))
92 \end{Verbatim}
102 \end{Verbatim}
93 ((* endblock stream *))
103 ((* endblock stream *))
94
104
95 ((* block markdowncell scoped *))((( cell.source | markdown2latex )))
105 ((* block markdowncell scoped *))
106 ((( cell.source | markdown2latex )))
96 ((* endblock markdowncell *))
107 ((* endblock markdowncell *))
97
108
98 ((* block headingcell scoped -*))
109 ((* block headingcell scoped -*))
99 ((( ('#' * cell.level + cell.source) | replace('\n', ' ') | markdown2latex )))
110 ((( ('#' * cell.level + cell.source) | replace('\n', ' ') | markdown2latex )))
100 ((* endblock headingcell *))
111 ((* endblock headingcell *))
101
112
102 ((* block rawcell scoped *))
113 ((* block rawcell scoped *))
@@ -104,11 +115,9 b' it introduces a new line'
104 ((* endblock rawcell *))
115 ((* endblock rawcell *))
105
116
106 ((* block unknowncell scoped *))
117 ((* block unknowncell scoped *))
107 unknown type (((cell.type)))
118 unknown type ((( cell.type )))
108 ((* endblock unknowncell *))
119 ((* endblock unknowncell *))
109
120
110
111
112 ((* block body *))
121 ((* block body *))
113
122
114 ((* block bodyBegin *))
123 ((* block bodyBegin *))
@@ -10,6 +10,10 b''
10
10
11 ((*- extends 'sphinx.tplx' -*))
11 ((*- extends 'sphinx.tplx' -*))
12
12
13
14
15
16
13 ((* set parentdocumentclass = 'report' *))
17 ((* set parentdocumentclass = 'report' *))
14 ((* set documentclass = 'manual' *))
18 ((* set documentclass = 'manual' *))
15
19
@@ -9,6 +9,7 b' Note: For best display, use latex syntax highlighting. =))'
9
9
10 ((*- extends 'display_priority.tplx' -*))
10 ((*- extends 'display_priority.tplx' -*))
11
11
12
12 \nonstopmode
13 \nonstopmode
13
14
14 %==============================================================================
15 %==============================================================================
@@ -181,7 +182,9 b' Note: For best display, use latex syntax highlighting. =))'
181 \tableofcontents
182 \tableofcontents
182 ((* endblock toc *))
183 ((* endblock toc *))
183
184
184 ((* endblock bodyBegin *))((( super() )))((* block bodyEnd *))
185 ((* endblock bodyBegin *))
186 ((( super() )))
187 ((* block bodyEnd *))
185
188
186 \renewcommand{\indexname}{Index}
189 \renewcommand{\indexname}{Index}
187 \printindex
190 \printindex
@@ -222,7 +225,8 b' Note: For best display, use latex syntax highlighting. =))'
222 ((= It's important to make sure that underscores (which tend to be common
225 ((= It's important to make sure that underscores (which tend to be common
223 in IPYNB file titles) do not make their way into latex. Sometimes this
226 in IPYNB file titles) do not make their way into latex. Sometimes this
224 causes latex to barf. =))
227 causes latex to barf. =))
225 ((*- endif -*)){((( cell.source | markdown2latex )))}
228 ((*- endif -*))
229 {((( cell.source | markdown2latex )))}
226 ((*- endblock headingcell *))
230 ((*- endblock headingcell *))
227
231
228 %==============================================================================
232 %==============================================================================
@@ -232,7 +236,7 b' Note: For best display, use latex syntax highlighting. =))'
232 % called since we know we want latex output.
236 % called since we know we want latex output.
233 %==============================================================================
237 %==============================================================================
234 ((*- block markdowncell scoped-*))
238 ((*- block markdowncell scoped-*))
235 ((( cell.source | markdown2latex )))
239 ((( cell.source | markdown2latex )))
236 ((*- endblock markdowncell -*))
240 ((*- endblock markdowncell -*))
237
241
238 %==============================================================================
242 %==============================================================================
@@ -242,7 +246,7 b' Note: For best display, use latex syntax highlighting. =))'
242 % will not get touched by the templating system.
246 % will not get touched by the templating system.
243 %==============================================================================
247 %==============================================================================
244 ((*- block rawcell *))
248 ((*- block rawcell *))
245 ((( cell.source | wrap_text(wrap_size) )))
249 ((( cell.source | wrap_text(wrap_size) )))
246 ((* endblock rawcell -*))
250 ((* endblock rawcell -*))
247
251
248 %==============================================================================
252 %==============================================================================
@@ -253,9 +257,8 b' Note: For best display, use latex syntax highlighting. =))'
253 % can't flow off of the page.
257 % can't flow off of the page.
254 %==============================================================================
258 %==============================================================================
255 ((* block unknowncell scoped*))
259 ((* block unknowncell scoped*))
256
260 % Unsupported cell type, no formatting
257 % Unsupported cell type, no formatting
261 ((( cell.source | wrap_text | escape_latex )))
258 ((( cell.source | wrap_text | escape_latex )))
259 ((* endblock unknowncell *))
262 ((* endblock unknowncell *))
260
263
261 %==============================================================================
264 %==============================================================================
@@ -338,34 +341,40 b' Note: For best display, use latex syntax highlighting. =))'
338 % Additional formating
341 % Additional formating
339 %==============================================================================
342 %==============================================================================
340 ((* block data_text *))
343 ((* block data_text *))
341 ((( custom_verbatim(output.text) | ansi2latex)))
344 ((( custom_verbatim(output.text) | ansi2latex )))
342 ((* endblock *))
345 ((* endblock *))
343
346
344 ((* block traceback_line *))
347 ((* block traceback_line *))
345 ((( conditionally_center_output(line | indent| strip_ansi) )))
348 ((( conditionally_center_output( line | indent| strip_ansi ) )))
346 ((* endblock traceback_line *))
349 ((* endblock traceback_line *))
347
350
348 %==============================================================================
351 %==============================================================================
349 % Supported image formats
352 % Supported image formats
350 %==============================================================================
353 %==============================================================================
351 ((*- block data_png -*))
354 ((*- block data_png -*))
352 ((( conditionally_center_output(insert_graphics(output.png_filename)) )))
355 ((( conditionally_center_output(insert_graphics(output.png_filename)) )))
353 ((*- endblock -*))
356 ((*- endblock -*))
354
357
355 ((*- block data_jpg -*))
358 ((*- block data_jpg -*))
356 ((( conditionally_center_output(insert_graphics(output.jpg_filename)) )))
359 ((( conditionally_center_output(insert_graphics(output.jpg_filename)) )))
357 ((*- endblock -*))
360 ((*- endblock -*))
358
361
359 ((*- block data_svg -*))
362 ((*- block data_svg -*))
360 ((( conditionally_center_output(insert_graphics(output.svg_filename)) )))
363 ((( conditionally_center_output(insert_graphics(output.svg_filename)) )))
361 ((*- endblock -*))
364 ((*- endblock -*))
362
365
363 ((*- block data_pdf -*))
366 ((*- block data_pdf -*))
364 ((( conditionally_center_output(insert_graphics(output.pdf_filename)) )))
367 ((( conditionally_center_output(insert_graphics(output.pdf_filename)) )))
365 ((*- endblock -*))
368 ((*- endblock -*))
366
369
367 ((*- block data_latex *))
370 ((*- block data_latex *))
368 ((* if resources.sphinx.centeroutput *))\begin{center}((* endif -*))((( output.latex | strip_math_space )))((*- if resources.sphinx.centeroutput *))\end{center} ((* endif -*))
371 ((* if resources.sphinx.centeroutput *))
372 \begin{center}
373 ((* endif -*))
374 ((( output.latex | strip_math_space )))
375 ((*- if resources.sphinx.centeroutput *))
376 \end{center}
377 ((* endif -*))
369 ((*- endblock -*))
378 ((*- endblock -*))
370
379
371 %==============================================================================
380 %==============================================================================
@@ -439,14 +448,19 b' Note: For best display, use latex syntax highlighting. =))'
439 % Name: conditionally_center_output
448 % Name: conditionally_center_output
440 % Purpose: This macro centers the output if the output centering is enabled.
449 % Purpose: This macro centers the output if the output centering is enabled.
441 ((* macro conditionally_center_output(text) -*))
450 ((* macro conditionally_center_output(text) -*))
442 ((* if resources.sphinx.centeroutput *)){\centering ((* endif *))((( text )))((* if resources.sphinx.centeroutput *))}((* endif *))
451 ((* if resources.sphinx.centeroutput *))
452 {\centering
453 ((* endif *))
454 ((( text )))
455 ((* if resources.sphinx.centeroutput *))}
456 ((* endif *))
443 ((*- endmacro *))
457 ((*- endmacro *))
444
458
445 % Name: insert_graphics
459 % Name: insert_graphics
446 % Purpose: This macro will insert an image in the latex document given a path.
460 % Purpose: This macro will insert an image in the latex document given a path.
447 ((* macro insert_graphics(path) -*))
461 ((* macro insert_graphics(path) -*))
448 \begin{center}
462 \begin{center}
449 \includegraphics[max size={\textwidth}{\textheight}]{(((path)))}
463 \includegraphics[max size={\textwidth}{\textheight}]{((( path )))}
450 \par
464 \par
451 \end{center}
465 \end{center}
452 ((*- endmacro *))
466 ((*- endmacro *)) No newline at end of file
@@ -1,13 +1,19 b''
1 {% extends 'display_priority.tpl' %}
1 {% extends 'display_priority.tpl' %}
2
3
2 {% block in_prompt %}
4 {% block in_prompt %}
3 In[{{cell.prompt_number if cell.prompt_number else ' '}}]:{% endblock in_prompt %}
5 In[{{ cell.prompt_number if cell.prompt_number else ' ' }}]:
6 {% endblock in_prompt %}
4
7
5 {% block output_prompt %}{% if cell.haspyout %}Out[{{cell.prompt_number}}]:
8 {% block output_prompt %}
6 {%- endif %}{%- endblock output_prompt %}
9 {% if cell.haspyout %}
10 Out[{{ cell.prompt_number }}]:
11 {%- endif %}
12 {%- endblock output_prompt %}
7
13
8 {% block input %}
14 {% block input %}
9 ```
15 ```
10 {{ cell.input}}
16 {{ cell.input }}
11 ```
17 ```
12 {% endblock input %}
18 {% endblock input %}
13
19
@@ -16,58 +22,53 b" In[{{cell.prompt_number if cell.prompt_number else ' '}}]:{% endblock in_prompt "
16 {% endblock pyerr %}
22 {% endblock pyerr %}
17
23
18 {% block traceback_line %}
24 {% block traceback_line %}
19 {{ line |indent| strip_ansi }}{% endblock traceback_line %}
25 {{ line | indent | strip_ansi }}
26 {% endblock traceback_line %}
20
27
21 {% block pyout %}
28 {% block pyout %}
22 {% block data_priority scoped %}{{ super()}}{% endblock %}
29 {% block data_priority scoped %}
30 {{ super() }}
31 {% endblock %}
23 {% endblock pyout %}
32 {% endblock pyout %}
24
33
25 {% block stream %}
34 {% block stream %}
26 {{ output.text| indent }}
35 {{ output.text | indent }}
27 {% endblock stream %}
36 {% endblock stream %}
28
37
29
30
31
32 {% block data_svg %}
38 {% block data_svg %}
33 [!image]({{output.svg_filename}})
39 [!image]({{ output.svg_filename }})
34 {% endblock data_svg %}
40 {% endblock data_svg %}
35
41
36 {% block data_png %}
42 {% block data_png %}
37 [!image]({{output.png_filename}})
43 [!image]({{ output.png_filename }})
38 {% endblock data_png %}
44 {% endblock data_png %}
39
45
40 {% block data_jpg %}
46 {% block data_jpg %}
41 [!image]({{output.jpg_filename}})
47 [!image]({{ output.jpg_filename }})
42 {% endblock data_jpg %}
48 {% endblock data_jpg %}
43
49
44
45
46 {% block data_latex %}
50 {% block data_latex %}
47 $$
51 $$
48 {{output.latex}}
52 {{ output.latex }}
49 $$
53 $$
50 {% endblock data_latex %}
54 {% endblock data_latex %}
51
55
52 {% block data_text scoped %}
56 {% block data_text scoped %}
53
57 {{ output.text | indent }}
54 {{output.text | indent}}
55
56 {% endblock data_text %}
58 {% endblock data_text %}
57
59
58 {% block markdowncell scoped %}
60 {% block markdowncell scoped %}
59 {{ cell.source | wrap_text(80)}}
61 {{ cell.source | wrap_text(80) }}
60 {% endblock markdowncell %}
62 {% endblock markdowncell %}
61
63
62 {% block headingcell scoped %}
64 {% block headingcell scoped %}
63
64 {{ '#' * cell.level }} {{ cell.source | replace('\n', ' ') }}
65 {{ '#' * cell.level }} {{ cell.source | replace('\n', ' ') }}
65
66 {% endblock headingcell %}
66 {% endblock headingcell %}
67
67
68 {% block rawcell scoped %}{{ cell.source }}
68 {% block rawcell scoped %}
69 {{ cell.source }}
69 {% endblock rawcell %}
70 {% endblock rawcell %}
70
71
71 {% block unknowncell scoped %}
72 {% block unknowncell scoped %}
72 unknown type {{cell.type}}
73 unknown type {{ cell.type }}
73 {% endblock unknowncell %}
74 {% endblock unknowncell %} No newline at end of file
@@ -1,40 +1,39 b''
1 {%- extends 'null.tpl' -%}
1 {%- extends 'null.tpl' -%}
2
2
3
3 {% block in_prompt %}
4 {% block in_prompt %}
4 # In[{{cell.prompt_number if cell.prompt_number else ' '}}]:
5 # In[{{ cell.prompt_number if cell.prompt_number else ' ' }}]:
5 {% endblock in_prompt %}
6 {% endblock in_prompt %}
6
7
7 {% block output_prompt %}
8 {% block output_prompt %}
8 # Out[{{cell.prompt_number}}]:{% endblock output_prompt %}
9 # Out[{{ cell.prompt_number }}]:
10 {% endblock output_prompt %}
9
11
10 {% block input %}{{ cell.input | ipython2python }}
12 {% block input %}
13 {{ cell.input | ipython2python }}
11 {% endblock input %}
14 {% endblock input %}
12
15
13
14 {# Those Two are for error displaying
16 {# Those Two are for error displaying
15 even if the first one seem to do nothing,
17 even if the first one seem to do nothing,
16 it introduces a new line
18 it introduces a new line
17
18 #}
19 #}
19 {% block pyerr %}{{ super() }}
20 {% block pyerr %}
21 {{ super() }}
20 {% endblock pyerr %}
22 {% endblock pyerr %}
21
23
22 {% block traceback_line %}
24 {% block traceback_line %}
23 {{ line |indent| strip_ansi }}{% endblock traceback_line %}
25 {{ line | indent | strip_ansi }}
26 {% endblock traceback_line %}
24 {# .... #}
27 {# .... #}
25
28
26
27 {% block pyout %}
29 {% block pyout %}
28 {{ output.text| indent | comment_lines }}
30 {{ output.text | indent | comment_lines }}
29 {% endblock pyout %}
31 {% endblock pyout %}
30
32
31 {% block stream %}
33 {% block stream %}
32 {{ output.text| indent | comment_lines }}
34 {{ output.text | indent | comment_lines }}
33 {% endblock stream %}
35 {% endblock stream %}
34
36
35
36
37
38 {% block display_data scoped %}
37 {% block display_data scoped %}
39 # image file:
38 # image file:
40 {% endblock display_data %}
39 {% endblock display_data %}
@@ -52,5 +51,5 b' it introduces a new line'
52 {% endblock rawcell %}
51 {% endblock rawcell %}
53
52
54 {% block unknowncell scoped %}
53 {% block unknowncell scoped %}
55 unknown type {{cell.type}}
54 unknown type {{ cell.type }}
56 {% endblock unknowncell %}
55 {% endblock unknowncell %} No newline at end of file
@@ -1,7 +1,6 b''
1 {%- extends 'reveal_internals/reveal_cells.tpl' -%}
1 {%- extends 'reveal_internals/reveal_cells.tpl' -%}
2
2
3
3
4
5 {%- block any_cell scoped -%}
4 {%- block any_cell scoped -%}
6 {%- if cell.metadata.align_type in ['Left'] -%}
5 {%- if cell.metadata.align_type in ['Left'] -%}
7 {{ super() }}
6 {{ super() }}
@@ -1,7 +1,5 b''
1 {%- extends 'html_basic.tpl' -%}
1 {%- extends 'html_basic.tpl' -%}
2
2
3
4
5 {%- block any_cell scoped -%}
3 {%- block any_cell scoped -%}
6 {%- if cell.metadata.slide_type in ['-', 'slide', 'subslide'] -%}
4 {%- if cell.metadata.slide_type in ['-', 'slide', 'subslide'] -%}
7 {{ super() }}
5 {{ super() }}
@@ -1,14 +1,13 b''
1 {%- extends 'reveal_internals/subslides.tpl' -%}
1 {%- extends 'reveal_internals/subslides.tpl' -%}
2
2
3
3
4
5 {%- block any_cell scoped -%}
4 {%- block any_cell scoped -%}
6 {%- if cell.metadata.slide_type in ['slide'] -%}
5 {%- if cell.metadata.slide_type in ['slide'] -%}
7 <section>
6 <section>
8 <section>
7 <section>
9 {%- endif -%}
8 {%- endif -%}
10
9
11 {{ super() }}
10 {{ super() }}
12
11
13 {%- if cell.metadata.slide_helper in ['slide_end'] -%}
12 {%- if cell.metadata.slide_helper in ['slide_end'] -%}
14 </section>
13 </section>
@@ -1,13 +1,12 b''
1 {%- extends 'reveal_internals/align_reveal_cells.tpl' -%}
1 {%- extends 'reveal_internals/align_reveal_cells.tpl' -%}
2
2
3
3
4
5 {%- block any_cell scoped -%}
4 {%- block any_cell scoped -%}
6 {%- if cell.metadata.slide_type in ['subslide'] -%}
5 {%- if cell.metadata.slide_type in ['subslide'] -%}
7 <section>
6 <section>
8 {%- endif -%}
7 {%- endif -%}
9
8
10 {{ super() }}
9 {{ super() }}
11
10
12 {%- if cell.metadata.slide_helper in ['subslide_end'] -%}
11 {%- if cell.metadata.slide_helper in ['subslide_end'] -%}
13 </section>
12 </section>
@@ -1,75 +1,76 b''
1 {%- extends 'display_priority.tpl' -%}
1 {%- extends 'display_priority.tpl' -%}
2 {% block in_prompt -%}
3 In[{{cell.prompt_number if cell.prompt_number else ' '}}]:
4
2
5 .. code:: python
6
3
4 {% block in_prompt -%}
5 In[{{ cell.prompt_number if cell.prompt_number else ' ' }}]:
6 .. code:: python
7 {% endblock in_prompt %}
7 {% endblock in_prompt %}
8
8
9 {% block output_prompt %}{% if cell.haspyout -%}
9 {% block output_prompt %}
10 Out[{{cell.prompt_number}}]:{% endif %}{% endblock output_prompt %}
10 {% if cell.haspyout -%}
11
11 Out[{{ cell.prompt_number }}]:
12 {% block input %}{{ cell.input | indent}}
12 {% endif %}
13 {% endblock output_prompt %}
13
14
15 {% block input %}
16 {{ cell.input | indent}}
14 {% endblock input %}
17 {% endblock input %}
15
18
16 {% block pyerr %}::
19 {% block pyerr %}
20 ::
17 {{ super() }}
21 {{ super() }}
18 {% endblock pyerr %}
22 {% endblock pyerr %}
19
23
20 {% block traceback_line %}
24 {% block traceback_line %}
21 {{ line |indent| strip_ansi }}{% endblock traceback_line %}
25 {{ line | indent | strip_ansi }}
26 {% endblock traceback_line %}
22
27
23 {% block pyout %}
28 {% block pyout %}
24 {% block data_priority scoped %}{{ super()}}{% endblock %}
29 {% block data_priority scoped %}
30 {{ super() }}
31 {% endblock %}
25 {% endblock pyout %}
32 {% endblock pyout %}
26
33
27 {% block stream %}
34 {% block stream %}
28 .. parsed-literal::
35 .. parsed-literal::
29
36
30 {{ output.text| indent }}
37 {{ output.text | indent }}
31 {% endblock stream %}
38 {% endblock stream %}
32
39
33
40 {% block data_svg %}
34
41 .. image:: {{ output.svg_filename }}
35
36 {% block data_svg %}.. image:: {{output.svg_filename}}
37
38 {% endblock data_svg %}
42 {% endblock data_svg %}
39
43
40 {% block data_png %}.. image:: {{output.png_filename}}
44 {% block data_png %}
41
45 .. image:: {{ output.png_filename }}
42 {% endblock data_png %}
46 {% endblock data_png %}
43
47
44 {% block data_jpg %}..jpg image:: {{output.jpg_filename}}
48 {% block data_jpg %}
45
49 ..jpg image:: {{ output.jpg_filename }}
46 {% endblock data_jpg %}
50 {% endblock data_jpg %}
47
51
48
52 {% block data_latex %}
49
53 .. math::
50 {% block data_latex %}.. math::
54 {{ output.latex | indent }}
51
52 {{output.latex| indent}}
53
54 {% endblock data_latex %}
55 {% endblock data_latex %}
55
56
56 {% block data_text scoped %}.. parsed-literal::
57 {% block data_text scoped %}
57
58 .. parsed-literal::
58 {{output.text | indent}}
59 {{ output.text | indent }}
59
60 {% endblock data_text %}
60 {% endblock data_text %}
61
61
62 {% block markdowncell scoped %}{{ cell.source | markdown2rst }}
62 {% block markdowncell scoped %}
63 {{ cell.source | markdown2rst }}
63 {% endblock markdowncell %}
64 {% endblock markdowncell %}
64
65
65 {% block headingcell scoped %}
66 {% block headingcell scoped %}
66 {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2rst }}
67 {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2rst }}
67
68 {% endblock headingcell %}
68 {% endblock headingcell %}
69
69
70 {% block rawcell scoped %}{{ cell.source }}
70 {% block rawcell scoped %}
71 {{ cell.source }}
71 {% endblock rawcell %}
72 {% endblock rawcell %}
72
73
73 {% block unknowncell scoped %}
74 {% block unknowncell scoped %}
74 unknown type {{cell.type}}
75 unknown type {{cell.type}}
75 {% endblock unknowncell %}
76 {% endblock unknowncell %} No newline at end of file
@@ -3,4 +3,4 b''
3 This contain skeleton template that you probably don't want
3 This contain skeleton template that you probably don't want
4 to inherit directly.
4 to inherit directly.
5
5
6 do not moify the content of the 'tex' folder which is generated by running 'make' in this folder.
6 do not modify the content of the 'tex' folder which is generated by running 'make' in this folder.
@@ -29,9 +29,9 b' document.write( \'<link rel="stylesheet" href="{{resources.reveal.url_prefix}}/cs'
29 <![endif]-->
29 <![endif]-->
30
30
31 {% for css in resources.inlining.css -%}
31 {% for css in resources.inlining.css -%}
32 <style type="text/css">
32 <style type="text/css">
33 {{css}}
33 {{ css }}
34 </style>
34 </style>
35 {% endfor %}
35 {% endfor %}
36
36
37 <style type="text/css">
37 <style type="text/css">
@@ -95,11 +95,11 b' text-align: inherit;'
95
95
96 {% block body %}
96 {% block body %}
97 <body>
97 <body>
98 <div class="reveal"><div class="slides">
98 <div class="reveal">
99
99 <div class="slides">
100 {{ super() }}
100 {{ super() }}
101
101 </div>
102 </div></div>
102 </div>
103
103
104 <!--
104 <!--
105 Uncomment the following block and the addthis_widget.js (see below inside dependencies)
105 Uncomment the following block and the addthis_widget.js (see below inside dependencies)
General Comments 0
You need to be logged in to leave comments. Login now