Show More
@@ -1,80 +1,86 b'' | |||||
1 | {%- extends 'display_priority.tpl' -%} |
|
1 | {%- extends 'display_priority.tpl' -%} | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | {% block in_prompt %} |
|
4 | {% block in_prompt %} | |
5 | {% endblock in_prompt %} |
|
5 | {% endblock in_prompt %} | |
6 |
|
6 | |||
7 | {% block output_prompt %} |
|
7 | {% block output_prompt %} | |
8 | {% endblock output_prompt %} |
|
8 | {% endblock output_prompt %} | |
9 |
|
9 | |||
10 | {% block input %} |
|
10 | {% block input %} | |
11 | {%- if cell.source.strip() -%} |
|
11 | {%- if cell.source.strip() -%} | |
12 | .. code:: python |
|
12 | .. code:: python | |
13 |
|
13 | |||
14 | {{ cell.source | indent}} |
|
14 | {{ cell.source | indent}} | |
15 |
{% |
|
15 | {% endif -%} | |
16 | {% endblock input %} |
|
16 | {% endblock input %} | |
17 |
|
17 | |||
18 | {% block error %} |
|
18 | {% block error %} | |
19 | :: |
|
19 | :: | |
20 |
|
20 | |||
21 | {{ super() }} |
|
21 | {{ super() }} | |
22 | {% endblock error %} |
|
22 | {% endblock error %} | |
23 |
|
23 | |||
24 | {% block traceback_line %} |
|
24 | {% block traceback_line %} | |
25 | {{ line | indent | strip_ansi }} |
|
25 | {{ line | indent | strip_ansi }} | |
26 | {% endblock traceback_line %} |
|
26 | {% endblock traceback_line %} | |
27 |
|
27 | |||
28 | {% block execute_result %} |
|
28 | {% block execute_result %} | |
29 | {% block data_priority scoped %} |
|
29 | {% block data_priority scoped %} | |
30 | {{ super() }} |
|
30 | {{ super() }} | |
31 | {% endblock %} |
|
31 | {% endblock %} | |
32 | {% endblock execute_result %} |
|
32 | {% endblock execute_result %} | |
33 |
|
33 | |||
34 | {% block stream %} |
|
34 | {% block stream %} | |
35 | .. parsed-literal:: |
|
35 | .. parsed-literal:: | |
36 |
|
36 | |||
37 | {{ output.text | indent }} |
|
37 | {{ output.text | indent }} | |
38 | {% endblock stream %} |
|
38 | {% endblock stream %} | |
39 |
|
39 | |||
40 | {% block data_svg %} |
|
40 | {% block data_svg %} | |
41 | .. image:: {{ output.metadata.filenames['image/svg+xml'] | urlencode }} |
|
41 | .. image:: {{ output.metadata.filenames['image/svg+xml'] | urlencode }} | |
42 | {% endblock data_svg %} |
|
42 | {% endblock data_svg %} | |
43 |
|
43 | |||
44 | {% block data_png %} |
|
44 | {% block data_png %} | |
45 | .. image:: {{ output.metadata.filenames['image/png'] | urlencode }} |
|
45 | .. image:: {{ output.metadata.filenames['image/png'] | urlencode }} | |
46 | {% endblock data_png %} |
|
46 | {% endblock data_png %} | |
47 |
|
47 | |||
48 | {% block data_jpg %} |
|
48 | {% block data_jpg %} | |
49 | .. image:: {{ output.metadata.filenames['image/jpeg'] | urlencode }} |
|
49 | .. image:: {{ output.metadata.filenames['image/jpeg'] | urlencode }} | |
50 | {% endblock data_jpg %} |
|
50 | {% endblock data_jpg %} | |
51 |
|
51 | |||
52 | {% block data_latex %} |
|
52 | {% block data_latex %} | |
53 | .. math:: |
|
53 | .. math:: | |
54 |
|
54 | |||
55 | {{ output.data['text/latex'] | strip_dollars | indent }} |
|
55 | {{ output.data['text/latex'] | strip_dollars | indent }} | |
56 | {% endblock data_latex %} |
|
56 | {% endblock data_latex %} | |
57 |
|
57 | |||
58 | {% block data_text scoped %} |
|
58 | {% block data_text scoped %} | |
59 | .. parsed-literal:: |
|
59 | .. parsed-literal:: | |
60 |
|
60 | |||
61 | {{ output.data['text/plain'] | indent }} |
|
61 | {{ output.data['text/plain'] | indent }} | |
62 | {% endblock data_text %} |
|
62 | {% endblock data_text %} | |
63 |
|
63 | |||
64 | {% block data_html scoped %} |
|
64 | {% block data_html scoped %} | |
65 | .. raw:: html |
|
65 | .. raw:: html | |
66 |
|
66 | |||
67 | {{ output.data['text/html'] | indent }} |
|
67 | {{ output.data['text/html'] | indent }} | |
68 | {% endblock data_html %} |
|
68 | {% endblock data_html %} | |
69 |
|
69 | |||
70 | {% block markdowncell scoped %} |
|
70 | {% block markdowncell scoped %} | |
71 | {{ cell.source | markdown2rst }} |
|
71 | {{ cell.source | markdown2rst }} | |
72 | {% endblock markdowncell %} |
|
72 | {% endblock markdowncell %} | |
73 |
|
73 | |||
|
74 | {%- block rawcell scoped -%} | |||
|
75 | {%- if cell.metadata.get('raw_mimetype', '').lower() in resources.get('raw_mimetypes', ['']) %} | |||
|
76 | {{cell.source}} | |||
|
77 | {% endif -%} | |||
|
78 | {%- endblock rawcell -%} | |||
|
79 | ||||
74 | {% block headingcell scoped %} |
|
80 | {% block headingcell scoped %} | |
75 | {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2rst }} |
|
81 | {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2rst }} | |
76 | {% endblock headingcell %} |
|
82 | {% endblock headingcell %} | |
77 |
|
83 | |||
78 | {% block unknowncell scoped %} |
|
84 | {% block unknowncell scoped %} | |
79 | unknown type {{cell.type}} |
|
85 | unknown type {{cell.type}} | |
80 | {% endblock unknowncell %} |
|
86 | {% endblock unknowncell %} |
General Comments 0
You need to be logged in to leave comments.
Login now