Show More
@@ -1,142 +1,148 b'' | |||||
1 | {%- extends 'display_priority.tpl' -%} |
|
1 | {%- extends 'display_priority.tpl' -%} | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | {% block codecell %} |
|
4 | {% block codecell %} | |
5 | <div class="cell border-box-sizing code_cell vbox"> |
|
5 | <div class="cell border-box-sizing code_cell vbox"> | |
6 | {{ super() }} |
|
6 | {{ super() }} | |
7 | </div> |
|
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 | |||
16 | {% block output_group %} |
|
16 | {% block output_group %} | |
17 | <div class="vbox output_wrapper"> |
|
17 | <div class="vbox output_wrapper"> | |
18 | <div class="output vbox"> |
|
18 | <div class="output vbox"> | |
19 | {{ super() }} |
|
19 | {{ super() }} | |
20 | </div> |
|
20 | </div> | |
21 | </div> |
|
21 | </div> | |
22 | {% endblock output_group %} |
|
22 | {% endblock output_group %} | |
23 |
|
23 | |||
24 | {% block in_prompt -%} |
|
24 | {% block in_prompt -%} | |
25 | <div class="prompt input_prompt"> |
|
25 | <div class="prompt input_prompt"> | |
26 | In [{{ cell.prompt_number }}]: |
|
26 | In [{{ cell.prompt_number }}]: | |
27 | </div> |
|
27 | </div> | |
28 | {%- endblock in_prompt %} |
|
28 | {%- endblock in_prompt %} | |
29 |
|
29 | |||
30 | {# |
|
30 | {# | |
31 | output_prompt doesn't do anything in HTML, |
|
31 | output_prompt doesn't do anything in HTML, | |
32 | because there is a prompt div in each output area (see output block) |
|
32 | because there is a prompt div in each output area (see output block) | |
33 | #} |
|
33 | #} | |
34 | {% block output_prompt %} |
|
34 | {% block output_prompt %} | |
35 | {% endblock output_prompt %} |
|
35 | {% endblock output_prompt %} | |
36 |
|
36 | |||
37 | {% block input %} |
|
37 | {% block input %} | |
38 | <div class="input_area box-flex1"> |
|
38 | <div class="input_area box-flex1"> | |
39 | {{ cell.input | highlight2html }} |
|
39 | {{ cell.input | highlight2html }} | |
40 | </div> |
|
40 | </div> | |
41 | {%- endblock input %} |
|
41 | {%- endblock input %} | |
42 |
|
42 | |||
43 | {% block output %} |
|
43 | {% block output %} | |
44 | <div class="hbox output_area"> |
|
44 | <div class="hbox output_area"> | |
45 | {%- if output.output_type == 'pyout' -%} |
|
45 | {%- if output.output_type == 'pyout' -%} | |
46 | <div class="prompt output_prompt"> |
|
46 | <div class="prompt output_prompt"> | |
47 | Out[{{ cell.prompt_number }}]: |
|
47 | Out[{{ cell.prompt_number }}]: | |
48 | {%- else -%} |
|
48 | {%- else -%} | |
49 | <div class="prompt"> |
|
49 | <div class="prompt"> | |
50 | {%- endif -%} |
|
50 | {%- endif -%} | |
51 | </div> |
|
51 | </div> | |
52 | {{ super() }} |
|
52 | {{ super() }} | |
53 | </div> |
|
53 | </div> | |
54 | {% endblock output %} |
|
54 | {% endblock output %} | |
55 |
|
55 | |||
56 | {% block markdowncell scoped %} |
|
56 | {% block markdowncell scoped %} | |
57 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
57 | <div class="text_cell_render border-box-sizing rendered_html"> | |
58 | {{ cell.source | strip_math_space | markdown2html | strip_files_prefix }} |
|
58 | {{ cell.source | strip_math_space | markdown2html | strip_files_prefix }} | |
59 | </div> |
|
59 | </div> | |
60 | {%- endblock markdowncell %} |
|
60 | {%- endblock markdowncell %} | |
61 |
|
61 | |||
62 | {% block headingcell scoped %} |
|
62 | {% block headingcell scoped %} | |
63 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
63 | <div class="text_cell_render border-box-sizing rendered_html"> | |
64 | {{ ("#" * 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 }} | |
65 | </div> |
|
65 | </div> | |
66 | {% endblock headingcell %} |
|
66 | {% endblock headingcell %} | |
67 |
|
67 | |||
68 | {% block rawcell scoped %} |
|
68 | {% block rawcell scoped %} | |
69 | {{ cell.source }} |
|
69 | {{ cell.source }} | |
70 | {% endblock rawcell %} |
|
70 | {% endblock rawcell %} | |
71 |
|
71 | |||
72 | {% block unknowncell scoped %} |
|
72 | {% block unknowncell scoped %} | |
73 | unknown type {{ cell.type }} |
|
73 | unknown type {{ cell.type }} | |
74 | {% endblock unknowncell %} |
|
74 | {% endblock unknowncell %} | |
75 |
|
75 | |||
76 | {% block pyout -%} |
|
76 | {% block pyout -%} | |
77 | <div class="box-flex1 output_subarea output_pyout"> |
|
77 | <div class="box-flex1 output_subarea output_pyout"> | |
78 | {% block data_priority scoped %} |
|
78 | {% block data_priority scoped %} | |
79 | {{ super() }} |
|
79 | {{ super() }} | |
80 | {% endblock %} |
|
80 | {% endblock %} | |
81 | </div> |
|
81 | </div> | |
82 | {%- endblock pyout %} |
|
82 | {%- endblock pyout %} | |
83 |
|
83 | |||
84 | {% block stream_stdout -%} |
|
84 | {% block stream_stdout -%} | |
85 | <div class="box-flex1 output_subarea output_stream output_stdout"> |
|
85 | <div class="box-flex1 output_subarea output_stream output_stdout"> | |
86 | <pre> |
|
86 | <pre> | |
87 | {{ output.text | ansi2html }} |
|
87 | {{ output.text | ansi2html }} | |
88 | </pre> |
|
88 | </pre> | |
89 | </div> |
|
89 | </div> | |
90 | {%- endblock stream_stdout %} |
|
90 | {%- endblock stream_stdout %} | |
91 |
|
91 | |||
92 | {% block stream_stderr -%} |
|
92 | {% block stream_stderr -%} | |
93 | <div class="box-flex1 output_subarea output_stream output_stderr"> |
|
93 | <div class="box-flex1 output_subarea output_stream output_stderr"> | |
94 | <pre> |
|
94 | <pre> | |
95 | {{ output.text | ansi2html }} |
|
95 | {{ output.text | ansi2html }} | |
96 | </pre> |
|
96 | </pre> | |
97 | </div> |
|
97 | </div> | |
98 | {%- endblock stream_stderr %} |
|
98 | {%- endblock stream_stderr %} | |
99 |
|
99 | |||
100 | {% block data_svg -%} |
|
100 | {% block data_svg -%} | |
101 | {{ output.svg }} |
|
101 | {{ output.svg }} | |
102 | {%- endblock data_svg %} |
|
102 | {%- endblock data_svg %} | |
103 |
|
103 | |||
104 | {% block data_html -%} |
|
104 | {% block data_html -%} | |
105 | <div class="output_html rendered_html"> |
|
105 | <div class="output_html rendered_html"> | |
106 | {{ output.html }} |
|
106 | {{ output.html }} | |
107 | </div> |
|
107 | </div> | |
108 | {%- endblock data_html %} |
|
108 | {%- endblock data_html %} | |
109 |
|
109 | |||
110 | {% block data_png %} |
|
110 | {% block data_png %} | |
111 | <img src="data:image/png;base64,{{ output.png }}"> |
|
111 | <img src="data:image/png;base64,{{ output.png }}"> | |
112 | {%- endblock data_png %} |
|
112 | {%- endblock data_png %} | |
113 |
|
113 | |||
114 | {% block data_jpg %} |
|
114 | {% block data_jpg %} | |
115 | <img src="data:image/jpeg;base64,{{ output.jpeg }}"> |
|
115 | <img src="data:image/jpeg;base64,{{ output.jpeg }}"> | |
116 | {%- endblock data_jpg %} |
|
116 | {%- endblock data_jpg %} | |
117 |
|
117 | |||
118 | {% block data_latex %} |
|
118 | {% block data_latex %} | |
119 | {{ output.latex }} |
|
119 | {{ output.latex }} | |
120 | {%- endblock data_latex %} |
|
120 | {%- endblock data_latex %} | |
121 |
|
121 | |||
122 | {% block pyerr -%} |
|
122 | {% block pyerr -%} | |
123 | <div class="box-flex1 output_subarea output_pyerr"> |
|
123 | <div class="box-flex1 output_subarea output_pyerr"> | |
124 | <pre>{{ super() }}</pre> |
|
124 | <pre>{{ super() }}</pre> | |
125 | </div> |
|
125 | </div> | |
126 | {%- endblock pyerr %} |
|
126 | {%- endblock pyerr %} | |
127 |
|
127 | |||
128 | {%- block traceback_line %} |
|
128 | {%- block traceback_line %} | |
129 | {{ line | ansi2html }} |
|
129 | {{ line | ansi2html }} | |
130 | {%- endblock traceback_line %} |
|
130 | {%- endblock traceback_line %} | |
131 |
|
131 | |||
132 | {%- block data_text %} |
|
132 | {%- block data_text %} | |
133 | <pre> |
|
133 | <pre> | |
134 | {{ output.text | ansi2html }} |
|
134 | {{ output.text | ansi2html }} | |
135 | </pre> |
|
135 | </pre> | |
136 | {%- endblock -%} |
|
136 | {%- endblock -%} | |
137 |
|
137 | |||
|
138 | {%- block data_javascript %} | |||
|
139 | <script type="text/javascript"> | |||
|
140 | {{ output.javascript }} | |||
|
141 | </script> | |||
|
142 | {%- endblock -%} | |||
|
143 | ||||
138 | {%- block display_data scoped -%} |
|
144 | {%- block display_data scoped -%} | |
139 | <div class="box-flex1 output_subarea output_display_data"> |
|
145 | <div class="box-flex1 output_subarea output_display_data"> | |
140 | {{ super() }} |
|
146 | {{ super() }} | |
141 | </div> |
|
147 | </div> | |
142 | {%- endblock display_data -%} No newline at end of file |
|
148 | {%- endblock display_data -%} |
@@ -1,39 +1,42 b'' | |||||
1 | ((= autogenerated file do not edit =)) |
|
1 | ((= autogenerated file do not edit =)) | |
2 | ((*- extends 'null.tplx' -*)) |
|
2 | ((*- extends 'null.tplx' -*)) | |
3 |
|
3 | |||
4 | ((=display data priority=)) |
|
4 | ((=display data priority=)) | |
5 |
|
5 | |||
6 |
|
6 | |||
7 | ((*- block data_priority scoped -*)) |
|
7 | ((*- block data_priority scoped -*)) | |
8 | ((*- for type in output | filter_data_type -*)) |
|
8 | ((*- for type in output | filter_data_type -*)) | |
9 | ((*- if type in ['pdf']*)) |
|
9 | ((*- if type in ['pdf']*)) | |
10 | ((*- block data_pdf -*)) |
|
10 | ((*- block data_pdf -*)) | |
11 | ((*- endblock -*)) |
|
11 | ((*- endblock -*)) | |
12 | ((*- endif -*)) |
|
12 | ((*- endif -*)) | |
13 | ((*- if type in ['svg']*)) |
|
13 | ((*- if type in ['svg']*)) | |
14 | ((*- block data_svg -*)) |
|
14 | ((*- block data_svg -*)) | |
15 | ((*- endblock -*)) |
|
15 | ((*- endblock -*)) | |
16 | ((*- endif -*)) |
|
16 | ((*- endif -*)) | |
17 | ((*- if type in ['png']*)) |
|
17 | ((*- if type in ['png']*)) | |
18 | ((*- block data_png -*)) |
|
18 | ((*- block data_png -*)) | |
19 | ((*- endblock -*)) |
|
19 | ((*- endblock -*)) | |
20 | ((*- endif -*)) |
|
20 | ((*- endif -*)) | |
21 | ((*- if type in ['html']*)) |
|
21 | ((*- if type in ['html']*)) | |
22 | ((*- block data_html -*)) |
|
22 | ((*- block data_html -*)) | |
23 | ((*- endblock -*)) |
|
23 | ((*- endblock -*)) | |
24 | ((*- endif -*)) |
|
24 | ((*- endif -*)) | |
25 | ((*- if type in ['jpeg']*)) |
|
25 | ((*- if type in ['jpeg']*)) | |
26 | ((*- block data_jpg -*)) |
|
26 | ((*- block data_jpg -*)) | |
27 | ((*- endblock -*)) |
|
27 | ((*- endblock -*)) | |
28 | ((*- endif -*)) |
|
28 | ((*- endif -*)) | |
29 | ((*- if type in ['text']*)) |
|
29 | ((*- if type in ['text']*)) | |
30 | ((*- block data_text -*)) |
|
30 | ((*- block data_text -*)) | |
31 | ((*- endblock -*)) |
|
31 | ((*- endblock -*)) | |
32 | ((*- endif -*)) |
|
32 | ((*- endif -*)) | |
33 |
|
||||
34 | ((*- if type in ['latex']*)) |
|
33 | ((*- if type in ['latex']*)) | |
35 | ((*- block data_latex -*)) |
|
34 | ((*- block data_latex -*)) | |
36 | ((*- endblock -*)) |
|
35 | ((*- endblock -*)) | |
37 | ((*- endif -*)) |
|
36 | ((*- endif -*)) | |
|
37 | ((*- if type in ['javascript']*)) | |||
|
38 | ((*- block data_javascript -*)) | |||
|
39 | ((*- endblock -*)) | |||
|
40 | ((*- endif -*)) | |||
38 | ((*- endfor -*)) |
|
41 | ((*- endfor -*)) | |
39 | ((*- endblock data_priority -*)) |
|
42 | ((*- endblock data_priority -*)) |
@@ -1,23 +1,23 b'' | |||||
1 |
|
1 | |||
2 |
|
2 | |||
3 | all: tex/null.tplx tex/display_priority.tplx |
|
3 | all: ../latex/skeleton/null.tplx ../latex/skeleton/display_priority.tplx | |
4 |
|
4 | |||
5 | # convert jinja syntax to tex |
|
5 | # convert jinja syntax to tex | |
6 | # cf http://flask.pocoo.org/snippets/55/ |
|
6 | # cf http://flask.pocoo.org/snippets/55/ | |
7 | tex/%.tplx: %.tpl |
|
7 | ../latex/skeleton/%.tplx: %.tpl | |
8 | @echo 'generating tex equivalent of $^: $@' |
|
8 | @echo 'generating tex equivalent of $^: $@' | |
9 | @echo '((= autogenerated file do not edit =))' > $@ |
|
9 | @echo '((= autogenerated file do not edit =))' > $@ | |
10 | @sed \ |
|
10 | @sed \ | |
11 | -e 's/{%/((*/g' \ |
|
11 | -e 's/{%/((*/g' \ | |
12 | -e 's/%}/*))/g' \ |
|
12 | -e 's/%}/*))/g' \ | |
13 | -e 's/{{/(((/g' \ |
|
13 | -e 's/{{/(((/g' \ | |
14 | -e 's/}}/)))/g' \ |
|
14 | -e 's/}}/)))/g' \ | |
15 | -e 's/{#/((=/g' \ |
|
15 | -e 's/{#/((=/g' \ | |
16 | -e 's/#}/=))/g' \ |
|
16 | -e 's/#}/=))/g' \ | |
17 | -e "s/tpl'/tplx'/g" \ |
|
17 | -e "s/tpl'/tplx'/g" \ | |
18 | $^ >> $@ |
|
18 | $^ >> $@ | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | clean: |
|
21 | clean: | |
22 | @echo "cleaning generated tplx files..." |
|
22 | @echo "cleaning generated tplx files..." | |
23 | @rm tex/* |
|
23 | @rm ../latex/skeleton/* |
@@ -1,38 +1,41 b'' | |||||
1 | {%- extends 'null.tpl' -%} |
|
1 | {%- extends 'null.tpl' -%} | |
2 |
|
2 | |||
3 | {#display data priority#} |
|
3 | {#display data priority#} | |
4 |
|
4 | |||
5 |
|
5 | |||
6 | {%- block data_priority scoped -%} |
|
6 | {%- block data_priority scoped -%} | |
7 | {%- for type in output | filter_data_type -%} |
|
7 | {%- for type in output | filter_data_type -%} | |
8 | {%- if type in ['pdf']%} |
|
8 | {%- if type in ['pdf']%} | |
9 | {%- block data_pdf -%} |
|
9 | {%- block data_pdf -%} | |
10 | {%- endblock -%} |
|
10 | {%- endblock -%} | |
11 | {%- endif -%} |
|
11 | {%- endif -%} | |
12 | {%- if type in ['svg']%} |
|
12 | {%- if type in ['svg']%} | |
13 | {%- block data_svg -%} |
|
13 | {%- block data_svg -%} | |
14 | {%- endblock -%} |
|
14 | {%- endblock -%} | |
15 | {%- endif -%} |
|
15 | {%- endif -%} | |
16 | {%- if type in ['png']%} |
|
16 | {%- if type in ['png']%} | |
17 | {%- block data_png -%} |
|
17 | {%- block data_png -%} | |
18 | {%- endblock -%} |
|
18 | {%- endblock -%} | |
19 | {%- endif -%} |
|
19 | {%- endif -%} | |
20 | {%- if type in ['html']%} |
|
20 | {%- if type in ['html']%} | |
21 | {%- block data_html -%} |
|
21 | {%- block data_html -%} | |
22 | {%- endblock -%} |
|
22 | {%- endblock -%} | |
23 | {%- endif -%} |
|
23 | {%- endif -%} | |
24 | {%- if type in ['jpeg']%} |
|
24 | {%- if type in ['jpeg']%} | |
25 | {%- block data_jpg -%} |
|
25 | {%- block data_jpg -%} | |
26 | {%- endblock -%} |
|
26 | {%- endblock -%} | |
27 | {%- endif -%} |
|
27 | {%- endif -%} | |
28 | {%- if type in ['text']%} |
|
28 | {%- if type in ['text']%} | |
29 | {%- block data_text -%} |
|
29 | {%- block data_text -%} | |
30 | {%- endblock -%} |
|
30 | {%- endblock -%} | |
31 | {%- endif -%} |
|
31 | {%- endif -%} | |
32 |
|
||||
33 | {%- if type in ['latex']%} |
|
32 | {%- if type in ['latex']%} | |
34 | {%- block data_latex -%} |
|
33 | {%- block data_latex -%} | |
35 | {%- endblock -%} |
|
34 | {%- endblock -%} | |
36 | {%- endif -%} |
|
35 | {%- endif -%} | |
|
36 | {%- if type in ['javascript']%} | |||
|
37 | {%- block data_javascript -%} | |||
|
38 | {%- endblock -%} | |||
|
39 | {%- endif -%} | |||
37 | {%- endfor -%} |
|
40 | {%- endfor -%} | |
38 | {%- endblock data_priority -%} |
|
41 | {%- endblock data_priority -%} |
General Comments 0
You need to be logged in to leave comments.
Login now