##// END OF EJS Templates
handle unicode output
Matthias BUSSONNIER -
Show More
@@ -1,9 +1,10 b''
1 # coding: utf-8
1 # coding: utf-8
2 import sys
2 import sys
3 import io
3 from converters.template import *
4 from converters.template import *
4 C = ConverterTemplate(tplfile=sys.argv[1])
5 C = ConverterTemplate(tplfile=sys.argv[1])
5 C.read('tests/ipynbref/IntroNumPy.orig.ipynb')
6 C.read('tests/ipynbref/IntroNumPy.orig.ipynb')
6
7
7 S = C.convert()
8 S = C.convert()
8 with open('temp.txt','w') as f:
9 with io.open('temp.txt','w') as f:
9 f.write(S)
10 f.write(S)
@@ -1,787 +1,787 b''
1 {%- extends 'basichtml.tpl' -%}
1 {%- extends 'basichtml.tpl' -%}
2
2
3 {%- block header -%}
3 {%- block header -%}
4 <html>
4 <html>
5 <head>
5 <head>
6 <style type="text/css">
6 <style type="text/css">
7 /**
7 /**
8 * HTML5 Boilerplate
8 * HTML5 ✰ Boilerplate
9 *
9 *
10 * style.css contains a reset, font normalization and some base styles.
10 * style.css contains a reset, font normalization and some base styles.
11 *
11 *
12 * Credit is left where credit is due.
12 * Credit is left where credit is due.
13 * Much inspiration was taken from these projects:
13 * Much inspiration was taken from these projects:
14 * - yui.yahooapis.com/2.8.1/build/base/base.css
14 * - yui.yahooapis.com/2.8.1/build/base/base.css
15 * - camendesign.com/design/
15 * - camendesign.com/design/
16 * - praegnanz.de/weblog/htmlcssjs-kickstart
16 * - praegnanz.de/weblog/htmlcssjs-kickstart
17 */
17 */
18
18
19
19
20 /**
20 /**
21 * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
21 * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
22 * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
22 * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
23 * html5doctor.com/html-5-reset-stylesheet/
23 * html5doctor.com/html-5-reset-stylesheet/
24 */
24 */
25
25
26 html, body, div, span, object, iframe,
26 html, body, div, span, object, iframe,
27 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
27 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
28 abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
28 abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
29 small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
29 small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
30 fieldset, form, label, legend,
30 fieldset, form, label, legend,
31 table, caption, tbody, tfoot, thead, tr, th, td,
31 table, caption, tbody, tfoot, thead, tr, th, td,
32 article, aside, canvas, details, figcaption, figure,
32 article, aside, canvas, details, figcaption, figure,
33 footer, header, hgroup, menu, nav, section, summary,
33 footer, header, hgroup, menu, nav, section, summary,
34 time, mark, audio, video {
34 time, mark, audio, video {
35 margin: 0;
35 margin: 0;
36 padding: 0;
36 padding: 0;
37 border: 0;
37 border: 0;
38 font-size: 100%;
38 font-size: 100%;
39 font: inherit;
39 font: inherit;
40 vertical-align: baseline;
40 vertical-align: baseline;
41 }
41 }
42
42
43 sup { vertical-align: super; }
43 sup { vertical-align: super; }
44 sub { vertical-align: sub; }
44 sub { vertical-align: sub; }
45
45
46 article, aside, details, figcaption, figure,
46 article, aside, details, figcaption, figure,
47 footer, header, hgroup, menu, nav, section {
47 footer, header, hgroup, menu, nav, section {
48 display: block;
48 display: block;
49 }
49 }
50
50
51 blockquote, q { quotes: none; }
51 blockquote, q { quotes: none; }
52
52
53 blockquote:before, blockquote:after,
53 blockquote:before, blockquote:after,
54 q:before, q:after { content: ""; content: none; }
54 q:before, q:after { content: ""; content: none; }
55
55
56 ins { background-color: #ff9; color: #000; text-decoration: none; }
56 ins { background-color: #ff9; color: #000; text-decoration: none; }
57
57
58 mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
58 mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
59
59
60 del { text-decoration: line-through; }
60 del { text-decoration: line-through; }
61
61
62 abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
62 abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
63
63
64 table { border-collapse: collapse; border-spacing: 0; }
64 table { border-collapse: collapse; border-spacing: 0; }
65
65
66 hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
66 hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
67
67
68 input, select { vertical-align: middle; }
68 input, select { vertical-align: middle; }
69
69
70
70
71 /**
71 /**
72 * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/
72 * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/
73 */
73 */
74
74
75 body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
75 body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
76 select, input, textarea, button { font:99% sans-serif; }
76 select, input, textarea, button { font:99% sans-serif; }
77
77
78 /* Normalize monospace sizing:
78 /* Normalize monospace sizing:
79 en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
79 en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
80 pre, code, kbd, samp { font-family: monospace, sans-serif; }
80 pre, code, kbd, samp { font-family: monospace, sans-serif; }
81
81
82 em,i { font-style: italic; }
82 em,i { font-style: italic; }
83 b,strong { font-weight: bold; }
83 b,strong { font-weight: bold; }
84
84
85 </style>
85 </style>
86 <style type="text/css">
86 <style type="text/css">
87
87
88 /* Flexible box model classes */
88 /* Flexible box model classes */
89 /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */
89 /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */
90
90
91 .hbox {
91 .hbox {
92 display: -webkit-box;
92 display: -webkit-box;
93 -webkit-box-orient: horizontal;
93 -webkit-box-orient: horizontal;
94 -webkit-box-align: stretch;
94 -webkit-box-align: stretch;
95
95
96 display: -moz-box;
96 display: -moz-box;
97 -moz-box-orient: horizontal;
97 -moz-box-orient: horizontal;
98 -moz-box-align: stretch;
98 -moz-box-align: stretch;
99
99
100 display: box;
100 display: box;
101 box-orient: horizontal;
101 box-orient: horizontal;
102 box-align: stretch;
102 box-align: stretch;
103 }
103 }
104
104
105 .hbox > * {
105 .hbox > * {
106 -webkit-box-flex: 0;
106 -webkit-box-flex: 0;
107 -moz-box-flex: 0;
107 -moz-box-flex: 0;
108 box-flex: 0;
108 box-flex: 0;
109 }
109 }
110
110
111 .vbox {
111 .vbox {
112 display: -webkit-box;
112 display: -webkit-box;
113 -webkit-box-orient: vertical;
113 -webkit-box-orient: vertical;
114 -webkit-box-align: stretch;
114 -webkit-box-align: stretch;
115
115
116 display: -moz-box;
116 display: -moz-box;
117 -moz-box-orient: vertical;
117 -moz-box-orient: vertical;
118 -moz-box-align: stretch;
118 -moz-box-align: stretch;
119
119
120 display: box;
120 display: box;
121 box-orient: vertical;
121 box-orient: vertical;
122 box-align: stretch;
122 box-align: stretch;
123 }
123 }
124
124
125 .vbox > * {
125 .vbox > * {
126 -webkit-box-flex: 0;
126 -webkit-box-flex: 0;
127 -moz-box-flex: 0;
127 -moz-box-flex: 0;
128 box-flex: 0;
128 box-flex: 0;
129 }
129 }
130
130
131 .reverse {
131 .reverse {
132 -webkit-box-direction: reverse;
132 -webkit-box-direction: reverse;
133 -moz-box-direction: reverse;
133 -moz-box-direction: reverse;
134 box-direction: reverse;
134 box-direction: reverse;
135 }
135 }
136
136
137 .box-flex0 {
137 .box-flex0 {
138 -webkit-box-flex: 0;
138 -webkit-box-flex: 0;
139 -moz-box-flex: 0;
139 -moz-box-flex: 0;
140 box-flex: 0;
140 box-flex: 0;
141 }
141 }
142
142
143 .box-flex1, .box-flex {
143 .box-flex1, .box-flex {
144 -webkit-box-flex: 1;
144 -webkit-box-flex: 1;
145 -moz-box-flex: 1;
145 -moz-box-flex: 1;
146 box-flex: 1;
146 box-flex: 1;
147 }
147 }
148
148
149 .box-flex2 {
149 .box-flex2 {
150 -webkit-box-flex: 2;
150 -webkit-box-flex: 2;
151 -moz-box-flex: 2;
151 -moz-box-flex: 2;
152 box-flex: 2;
152 box-flex: 2;
153 }
153 }
154
154
155 .box-group1 {
155 .box-group1 {
156 -webkit-box-flex-group: 1;
156 -webkit-box-flex-group: 1;
157 -moz-box-flex-group: 1;
157 -moz-box-flex-group: 1;
158 box-flex-group: 1;
158 box-flex-group: 1;
159 }
159 }
160
160
161 .box-group2 {
161 .box-group2 {
162 -webkit-box-flex-group: 2;
162 -webkit-box-flex-group: 2;
163 -moz-box-flex-group: 2;
163 -moz-box-flex-group: 2;
164 box-flex-group: 2;
164 box-flex-group: 2;
165 }
165 }
166
166
167 .start {
167 .start {
168 -webkit-box-pack: start;
168 -webkit-box-pack: start;
169 -moz-box-pack: start;
169 -moz-box-pack: start;
170 box-pack: start;
170 box-pack: start;
171 }
171 }
172
172
173 .end {
173 .end {
174 -webkit-box-pack: end;
174 -webkit-box-pack: end;
175 -moz-box-pack: end;
175 -moz-box-pack: end;
176 box-pack: end;
176 box-pack: end;
177 }
177 }
178
178
179 .center {
179 .center {
180 -webkit-box-pack: center;
180 -webkit-box-pack: center;
181 -moz-box-pack: center;
181 -moz-box-pack: center;
182 box-pack: center;
182 box-pack: center;
183 }
183 }
184
184
185 </style>
185 </style>
186 <style type="text/css">
186 <style type="text/css">
187 /**
187 /**
188 * Primary styles
188 * Primary styles
189 *
189 *
190 * Author: IPython Development Team
190 * Author: IPython Development Team
191 */
191 */
192
192
193
193
194 body {
194 body {
195 overflow: hidden;
195 overflow: hidden;
196 }
196 }
197
197
198 blockquote {
198 blockquote {
199 border-left: 4px solid #DDD;
199 border-left: 4px solid #DDD;
200 padding: 0 15px;
200 padding: 0 15px;
201 color: #777;
201 color: #777;
202 }
202 }
203
203
204 span#save_widget {
204 span#save_widget {
205 padding: 5px;
205 padding: 5px;
206 margin: 0px 0px 0px 300px;
206 margin: 0px 0px 0px 300px;
207 display:inline-block;
207 display:inline-block;
208 }
208 }
209
209
210 span#notebook_name {
210 span#notebook_name {
211 height: 1em;
211 height: 1em;
212 line-height: 1em;
212 line-height: 1em;
213 padding: 3px;
213 padding: 3px;
214 border: none;
214 border: none;
215 font-size: 146.5%;
215 font-size: 146.5%;
216 }
216 }
217
217
218 .ui-menubar-item .ui-button .ui-button-text {
218 .ui-menubar-item .ui-button .ui-button-text {
219 padding: 0.4em 1.0em;
219 padding: 0.4em 1.0em;
220 font-size: 100%;
220 font-size: 100%;
221 }
221 }
222
222
223 .ui-menu {
223 .ui-menu {
224 -moz-box-shadow: 0px 6px 10px -1px #adadad;
224 -moz-box-shadow: 0px 6px 10px -1px #adadad;
225 -webkit-box-shadow: 0px 6px 10px -1px #adadad;
225 -webkit-box-shadow: 0px 6px 10px -1px #adadad;
226 box-shadow: 0px 6px 10px -1px #adadad;
226 box-shadow: 0px 6px 10px -1px #adadad;
227 }
227 }
228
228
229 .ui-menu .ui-menu-item a {
229 .ui-menu .ui-menu-item a {
230 border: 1px solid transparent;
230 border: 1px solid transparent;
231 padding: 2px 1.6em;
231 padding: 2px 1.6em;
232 }
232 }
233
233
234 .ui-menu .ui-menu-item a.ui-state-focus {
234 .ui-menu .ui-menu-item a.ui-state-focus {
235 margin: 0;
235 margin: 0;
236 }
236 }
237
237
238 .ui-menu hr {
238 .ui-menu hr {
239 margin: 0.3em 0;
239 margin: 0.3em 0;
240 }
240 }
241
241
242 #menubar_container {
242 #menubar_container {
243 position: relative;
243 position: relative;
244 }
244 }
245
245
246 #notification_area {
246 #notification_area {
247 position: absolute;
247 position: absolute;
248 right: 0px;
248 right: 0px;
249 top: 0px;
249 top: 0px;
250 height: 25px;
250 height: 25px;
251 padding: 3px 0px;
251 padding: 3px 0px;
252 padding-right: 3px;
252 padding-right: 3px;
253 z-index: 10;
253 z-index: 10;
254 }
254 }
255
255
256 .notification_widget{
256 .notification_widget{
257 float : right;
257 float : right;
258 right: 0px;
258 right: 0px;
259 top: 1px;
259 top: 1px;
260 height: 25px;
260 height: 25px;
261 padding: 3px 6px;
261 padding: 3px 6px;
262 z-index: 10;
262 z-index: 10;
263 }
263 }
264
264
265 .toolbar {
265 .toolbar {
266 padding: 3px 15px;
266 padding: 3px 15px;
267 }
267 }
268
268
269 #cell_type {
269 #cell_type {
270 font-size: 85%;
270 font-size: 85%;
271 }
271 }
272
272
273
273
274 div#main_app {
274 div#main_app {
275 width: 100%;
275 width: 100%;
276 position: relative;
276 position: relative;
277 }
277 }
278
278
279 span#quick_help_area {
279 span#quick_help_area {
280 position: static;
280 position: static;
281 padding: 5px 0px;
281 padding: 5px 0px;
282 margin: 0px 0px 0px 0px;
282 margin: 0px 0px 0px 0px;
283 }
283 }
284
284
285 .help_string {
285 .help_string {
286 float: right;
286 float: right;
287 width: 170px;
287 width: 170px;
288 padding: 0px 5px;
288 padding: 0px 5px;
289 text-align: left;
289 text-align: left;
290 font-size: 85%;
290 font-size: 85%;
291 }
291 }
292
292
293 .help_string_label {
293 .help_string_label {
294 float: right;
294 float: right;
295 font-size: 85%;
295 font-size: 85%;
296 }
296 }
297
297
298 div#notebook_panel {
298 div#notebook_panel {
299 margin: 0px 0px 0px 0px;
299 margin: 0px 0px 0px 0px;
300 padding: 0px;
300 padding: 0px;
301 }
301 }
302
302
303 div#notebook {
303 div#notebook {
304 overflow-y: scroll;
304 overflow-y: scroll;
305 overflow-x: auto;
305 overflow-x: auto;
306 width: 100%;
306 width: 100%;
307 /* This spaces the cell away from the edge of the notebook area */
307 /* This spaces the cell away from the edge of the notebook area */
308 padding: 5px 5px 15px 5px;
308 padding: 5px 5px 15px 5px;
309 margin: 0px;
309 margin: 0px;
310 background-color: white;
310 background-color: white;
311 }
311 }
312
312
313 div#pager_splitter {
313 div#pager_splitter {
314 height: 8px;
314 height: 8px;
315 }
315 }
316
316
317 #pager_container {
317 #pager_container {
318 position : relative;
318 position : relative;
319 }
319 }
320
320
321 div#pager {
321 div#pager {
322 padding: 15px;
322 padding: 15px;
323 overflow: auto;
323 overflow: auto;
324 display: none;
324 display: none;
325 }
325 }
326
326
327 div.ui-widget-content {
327 div.ui-widget-content {
328 border: 1px solid #aaa;
328 border: 1px solid #aaa;
329 outline: none;
329 outline: none;
330 }
330 }
331
331
332 .cell {
332 .cell {
333 border: 1px solid transparent;
333 border: 1px solid transparent;
334 }
334 }
335
335
336 div.cell {
336 div.cell {
337 width: 100%;
337 width: 100%;
338 padding: 5px 5px 5px 0px;
338 padding: 5px 5px 5px 0px;
339 /* This acts as a spacer between cells, that is outside the border */
339 /* This acts as a spacer between cells, that is outside the border */
340 margin: 2px 0px 2px 0px;
340 margin: 2px 0px 2px 0px;
341 }
341 }
342
342
343 div.code_cell {
343 div.code_cell {
344 background-color: white;
344 background-color: white;
345 }
345 }
346
346
347 /* any special styling for code cells that are currently running goes here */
347 /* any special styling for code cells that are currently running goes here */
348 div.code_cell.running {
348 div.code_cell.running {
349 }
349 }
350
350
351 div.prompt {
351 div.prompt {
352 /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
352 /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
353 width: 11ex;
353 width: 11ex;
354 /* This 0.4em is tuned to match the padding on the CodeMirror editor. */
354 /* This 0.4em is tuned to match the padding on the CodeMirror editor. */
355 padding: 0.4em;
355 padding: 0.4em;
356 margin: 0px;
356 margin: 0px;
357 font-family: monospace;
357 font-family: monospace;
358 text-align:right;
358 text-align:right;
359 }
359 }
360
360
361 div.input {
361 div.input {
362 page-break-inside: avoid;
362 page-break-inside: avoid;
363 }
363 }
364
364
365 /* input_area and input_prompt must match in top border and margin for alignment */
365 /* input_area and input_prompt must match in top border and margin for alignment */
366 div.input_area {
366 div.input_area {
367 color: black;
367 color: black;
368 border: 1px solid #ddd;
368 border: 1px solid #ddd;
369 border-radius: 3px;
369 border-radius: 3px;
370 background: #f7f7f7;
370 background: #f7f7f7;
371 }
371 }
372
372
373 div.input_prompt {
373 div.input_prompt {
374 color: navy;
374 color: navy;
375 border-top: 1px solid transparent;
375 border-top: 1px solid transparent;
376 }
376 }
377
377
378 div.output_wrapper {
378 div.output_wrapper {
379 /* This is a spacer between the input and output of each cell */
379 /* This is a spacer between the input and output of each cell */
380 margin-top: 5px;
380 margin-top: 5px;
381 margin-left: 5px;
381 margin-left: 5px;
382 /* FF needs explicit width to stretch */
382 /* FF needs explicit width to stretch */
383 width: 100%;
383 width: 100%;
384 /* this position must be relative to enable descendents to be absolute within it */
384 /* this position must be relative to enable descendents to be absolute within it */
385 position: relative;
385 position: relative;
386 }
386 }
387
387
388 /* class for the output area when it should be height-limited */
388 /* class for the output area when it should be height-limited */
389 div.output_scroll {
389 div.output_scroll {
390 /* ideally, this would be max-height, but FF barfs all over that */
390 /* ideally, this would be max-height, but FF barfs all over that */
391 height: 24em;
391 height: 24em;
392 /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
392 /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
393 width: 100%;
393 width: 100%;
394
394
395 overflow: auto;
395 overflow: auto;
396 border-radius: 3px;
396 border-radius: 3px;
397 box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8);
397 box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8);
398 }
398 }
399
399
400 /* output div while it is collapsed */
400 /* output div while it is collapsed */
401 div.output_collapsed {
401 div.output_collapsed {
402 margin-right: 5px;
402 margin-right: 5px;
403 }
403 }
404
404
405 div.out_prompt_overlay {
405 div.out_prompt_overlay {
406 height: 100%;
406 height: 100%;
407 padding: 0px;
407 padding: 0px;
408 position: absolute;
408 position: absolute;
409 border-radius: 3px;
409 border-radius: 3px;
410 }
410 }
411
411
412 div.out_prompt_overlay:hover {
412 div.out_prompt_overlay:hover {
413 /* use inner shadow to get border that is computed the same on WebKit/FF */
413 /* use inner shadow to get border that is computed the same on WebKit/FF */
414 box-shadow: inset 0 0 1px #000;
414 box-shadow: inset 0 0 1px #000;
415 background: rgba(240, 240, 240, 0.5);
415 background: rgba(240, 240, 240, 0.5);
416 }
416 }
417
417
418 div.output_prompt {
418 div.output_prompt {
419 color: darkred;
419 color: darkred;
420 /* 5px right shift to account for margin in parent container */
420 /* 5px right shift to account for margin in parent container */
421 margin: 0 5px 0 -5px;
421 margin: 0 5px 0 -5px;
422 }
422 }
423
423
424 /* This class is the outer container of all output sections. */
424 /* This class is the outer container of all output sections. */
425 div.output_area {
425 div.output_area {
426 padding: 0px;
426 padding: 0px;
427 page-break-inside: avoid;
427 page-break-inside: avoid;
428 }
428 }
429
429
430 /* This class is for the output subarea inside the output_area and after
430 /* This class is for the output subarea inside the output_area and after
431 the prompt div. */
431 the prompt div. */
432 div.output_subarea {
432 div.output_subarea {
433 padding: 0.44em 0.4em 0.4em 1px;
433 padding: 0.44em 0.4em 0.4em 1px;
434 }
434 }
435
435
436 /* The rest of the output_* classes are for special styling of the different
436 /* The rest of the output_* classes are for special styling of the different
437 output types */
437 output types */
438
438
439 /* all text output has this class: */
439 /* all text output has this class: */
440 div.output_text {
440 div.output_text {
441 text-align: left;
441 text-align: left;
442 color: black;
442 color: black;
443 font-family: monospace;
443 font-family: monospace;
444 }
444 }
445
445
446 /* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */
446 /* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */
447 div.output_stream {
447 div.output_stream {
448 padding-top: 0.0em;
448 padding-top: 0.0em;
449 padding-bottom: 0.0em;
449 padding-bottom: 0.0em;
450 }
450 }
451 div.output_stdout {
451 div.output_stdout {
452 }
452 }
453 div.output_stderr {
453 div.output_stderr {
454 background: #fdd; /* very light red background for stderr */
454 background: #fdd; /* very light red background for stderr */
455 }
455 }
456
456
457 div.output_latex {
457 div.output_latex {
458 text-align: left;
458 text-align: left;
459 color: black;
459 color: black;
460 }
460 }
461
461
462 div.output_html {
462 div.output_html {
463 }
463 }
464
464
465 div.output_png {
465 div.output_png {
466 }
466 }
467
467
468 div.output_jpeg {
468 div.output_jpeg {
469 }
469 }
470
470
471 div.text_cell {
471 div.text_cell {
472 background-color: white;
472 background-color: white;
473 padding: 5px 5px 5px 5px;
473 padding: 5px 5px 5px 5px;
474 }
474 }
475
475
476 div.text_cell_input {
476 div.text_cell_input {
477 color: black;
477 color: black;
478 border: 1px solid #ddd;
478 border: 1px solid #ddd;
479 border-radius: 3px;
479 border-radius: 3px;
480 background: #f7f7f7;
480 background: #f7f7f7;
481 }
481 }
482
482
483 div.text_cell_render {
483 div.text_cell_render {
484 font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
484 font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
485 outline: none;
485 outline: none;
486 resize: none;
486 resize: none;
487 width: inherit;
487 width: inherit;
488 border-style: none;
488 border-style: none;
489 padding: 5px;
489 padding: 5px;
490 color: black;
490 color: black;
491 }
491 }
492
492
493 /* The following gets added to the <head> if it is detected that the user has a
493 /* The following gets added to the <head> if it is detected that the user has a
494 * monospace font with inconsistent normal/bold/italic height. See
494 * monospace font with inconsistent normal/bold/italic height. See
495 * notebookmain.js. Such fonts will have keywords vertically offset with
495 * notebookmain.js. Such fonts will have keywords vertically offset with
496 * respect to the rest of the text. The user should select a better font.
496 * respect to the rest of the text. The user should select a better font.
497 * See: https://github.com/ipython/ipython/issues/1503
497 * See: https://github.com/ipython/ipython/issues/1503
498 *
498 *
499 * .CodeMirror span {
499 * .CodeMirror span {
500 * vertical-align: bottom;
500 * vertical-align: bottom;
501 * }
501 * }
502 */
502 */
503
503
504 .CodeMirror {
504 .CodeMirror {
505 line-height: 1.231; /* Changed from 1em to our global default */
505 line-height: 1.231; /* Changed from 1em to our global default */
506 }
506 }
507
507
508 .CodeMirror-scroll {
508 .CodeMirror-scroll {
509 height: auto; /* Changed to auto to autogrow */
509 height: auto; /* Changed to auto to autogrow */
510 /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
510 /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
511 /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/
511 /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/
512 overflow-y: hidden;
512 overflow-y: hidden;
513 overflow-x: auto; /* Changed from auto to remove scrollbar */
513 overflow-x: auto; /* Changed from auto to remove scrollbar */
514 }
514 }
515
515
516 /* CSS font colors for translated ANSI colors. */
516 /* CSS font colors for translated ANSI colors. */
517
517
518
518
519 .ansiblack {color: black;}
519 .ansiblack {color: black;}
520 .ansired {color: darkred;}
520 .ansired {color: darkred;}
521 .ansigreen {color: darkgreen;}
521 .ansigreen {color: darkgreen;}
522 .ansiyellow {color: brown;}
522 .ansiyellow {color: brown;}
523 .ansiblue {color: darkblue;}
523 .ansiblue {color: darkblue;}
524 .ansipurple {color: darkviolet;}
524 .ansipurple {color: darkviolet;}
525 .ansicyan {color: steelblue;}
525 .ansicyan {color: steelblue;}
526 .ansigrey {color: grey;}
526 .ansigrey {color: grey;}
527 .ansibold {font-weight: bold;}
527 .ansibold {font-weight: bold;}
528
528
529 .completions {
529 .completions {
530 position: absolute;
530 position: absolute;
531 z-index: 10;
531 z-index: 10;
532 overflow: hidden;
532 overflow: hidden;
533 border: 1px solid grey;
533 border: 1px solid grey;
534 }
534 }
535
535
536 .completions select {
536 .completions select {
537 background: white;
537 background: white;
538 outline: none;
538 outline: none;
539 border: none;
539 border: none;
540 padding: 0px;
540 padding: 0px;
541 margin: 0px;
541 margin: 0px;
542 overflow: auto;
542 overflow: auto;
543 font-family: monospace;
543 font-family: monospace;
544 }
544 }
545
545
546 option.context {
546 option.context {
547 background-color: #DEF7FF;
547 background-color: #DEF7FF;
548 }
548 }
549 option.introspection {
549 option.introspection {
550 background-color: #EBF4EB;
550 background-color: #EBF4EB;
551 }
551 }
552
552
553 /*fixed part of the completion*/
553 /*fixed part of the completion*/
554 .completions p b {
554 .completions p b {
555 font-weight:bold;
555 font-weight:bold;
556 }
556 }
557
557
558 .completions p {
558 .completions p {
559 background: #DDF;
559 background: #DDF;
560 /*outline: none;
560 /*outline: none;
561 padding: 0px;*/
561 padding: 0px;*/
562 border-bottom: black solid 1px;
562 border-bottom: black solid 1px;
563 padding: 1px;
563 padding: 1px;
564 font-family: monospace;
564 font-family: monospace;
565 }
565 }
566
566
567 pre.dialog {
567 pre.dialog {
568 background-color: #f7f7f7;
568 background-color: #f7f7f7;
569 border: 1px solid #ddd;
569 border: 1px solid #ddd;
570 border-radius: 3px;
570 border-radius: 3px;
571 padding: 0.4em;
571 padding: 0.4em;
572 padding-left: 2em;
572 padding-left: 2em;
573 }
573 }
574
574
575 p.dialog {
575 p.dialog {
576 padding : 0.2em;
576 padding : 0.2em;
577 }
577 }
578
578
579 .shortcut_key {
579 .shortcut_key {
580 display: inline-block;
580 display: inline-block;
581 width: 15ex;
581 width: 15ex;
582 text-align: right;
582 text-align: right;
583 font-family: monospace;
583 font-family: monospace;
584 }
584 }
585
585
586 .shortcut_descr {
586 .shortcut_descr {
587 }
587 }
588
588
589 /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems
589 /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems
590 to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do.
590 to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do.
591 */
591 */
592 pre, code, kbd, samp { white-space: pre-wrap; }
592 pre, code, kbd, samp { white-space: pre-wrap; }
593
593
594 #fonttest {
594 #fonttest {
595 font-family: monospace;
595 font-family: monospace;
596 }
596 }
597
597
598 .js-error {
598 .js-error {
599 color: darkred;
599 color: darkred;
600 }
600 }
601
601
602 </style>
602 </style>
603 <style type="text/css">
603 <style type="text/css">
604 .rendered_html {color: black;}
604 .rendered_html {color: black;}
605 .rendered_html em {font-style: italic;}
605 .rendered_html em {font-style: italic;}
606 .rendered_html strong {font-weight: bold;}
606 .rendered_html strong {font-weight: bold;}
607 .rendered_html u {text-decoration: underline;}
607 .rendered_html u {text-decoration: underline;}
608 .rendered_html :link { text-decoration: underline }
608 .rendered_html :link { text-decoration: underline }
609 .rendered_html :visited { text-decoration: underline }
609 .rendered_html :visited { text-decoration: underline }
610 .rendered_html h1 {font-size: 197%; margin: .65em 0; font-weight: bold;}
610 .rendered_html h1 {font-size: 197%; margin: .65em 0; font-weight: bold;}
611 .rendered_html h2 {font-size: 153.9%; margin: .75em 0; font-weight: bold;}
611 .rendered_html h2 {font-size: 153.9%; margin: .75em 0; font-weight: bold;}
612 .rendered_html h3 {font-size: 123.1%; margin: .85em 0; font-weight: bold;}
612 .rendered_html h3 {font-size: 123.1%; margin: .85em 0; font-weight: bold;}
613 .rendered_html h4 {font-size: 100% margin: 0.95em 0; font-weight: bold;}
613 .rendered_html h4 {font-size: 100% margin: 0.95em 0; font-weight: bold;}
614 .rendered_html h5 {font-size: 85%; margin: 1.5em 0; font-weight: bold;}
614 .rendered_html h5 {font-size: 85%; margin: 1.5em 0; font-weight: bold;}
615 .rendered_html h6 {font-size: 77%; margin: 1.65em 0; font-weight: bold;}
615 .rendered_html h6 {font-size: 77%; margin: 1.65em 0; font-weight: bold;}
616 .rendered_html ul {list-style:disc; margin: 1em 2em;}
616 .rendered_html ul {list-style:disc; margin: 1em 2em;}
617 .rendered_html ul ul {list-style:square; margin: 0em 2em;}
617 .rendered_html ul ul {list-style:square; margin: 0em 2em;}
618 .rendered_html ul ul ul {list-style:circle; margin-left: 0em 2em;}
618 .rendered_html ul ul ul {list-style:circle; margin-left: 0em 2em;}
619 .rendered_html ol {list-style:upper-roman; margin: 1em 2em;}
619 .rendered_html ol {list-style:upper-roman; margin: 1em 2em;}
620 .rendered_html ol ol {list-style:upper-alpha; margin: 0em 2em;}
620 .rendered_html ol ol {list-style:upper-alpha; margin: 0em 2em;}
621 .rendered_html ol ol ol {list-style:decimal; margin: 0em 2em;}
621 .rendered_html ol ol ol {list-style:decimal; margin: 0em 2em;}
622 .rendered_html ol ol ol ol {list-style:lower-alpha; margin: 0em 2em;}
622 .rendered_html ol ol ol ol {list-style:lower-alpha; margin: 0em 2em;}
623 .rendered_html ol ol ol ol ol {list-style:lower-roman; margin: 0em 2em;}
623 .rendered_html ol ol ol ol ol {list-style:lower-roman; margin: 0em 2em;}
624
624
625 .rendered_html hr {
625 .rendered_html hr {
626 color: black;
626 color: black;
627 background-color: black;
627 background-color: black;
628 }
628 }
629
629
630 .rendered_html pre {
630 .rendered_html pre {
631 margin: 1em 2em;
631 margin: 1em 2em;
632 }
632 }
633
633
634 .rendered_html blockquote {
634 .rendered_html blockquote {
635 margin: 1em 2em;
635 margin: 1em 2em;
636 }
636 }
637
637
638 .rendered_html table {
638 .rendered_html table {
639 border: 1px solid black;
639 border: 1px solid black;
640 border-collapse: collapse;
640 border-collapse: collapse;
641 margin: 1em 2em;
641 margin: 1em 2em;
642 }
642 }
643
643
644 .rendered_html td {
644 .rendered_html td {
645 border: 1px solid black;
645 border: 1px solid black;
646 text-align: left;
646 text-align: left;
647 vertical-align: middle;
647 vertical-align: middle;
648 padding: 4px;
648 padding: 4px;
649 }
649 }
650
650
651 .rendered_html th {
651 .rendered_html th {
652 border: 1px solid black;
652 border: 1px solid black;
653 text-align: left;
653 text-align: left;
654 vertical-align: middle;
654 vertical-align: middle;
655 padding: 4px;
655 padding: 4px;
656 font-weight: bold;
656 font-weight: bold;
657 }
657 }
658
658
659 .rendered_html tr {
659 .rendered_html tr {
660 border: 1px solid black;
660 border: 1px solid black;
661 }
661 }
662
662
663 .rendered_html p + p {
663 .rendered_html p + p {
664 margin-top: 1em;
664 margin-top: 1em;
665 }
665 }
666
666
667
667
668 </style>
668 </style>
669 <style type="text/css">
669 <style type="text/css">
670 /* Overrides of notebook CSS for static HTML export
670 /* Overrides of notebook CSS for static HTML export
671
671
672 */
672 */
673 body {
673 body {
674 overflow: visible;
674 overflow: visible;
675 padding: 8px;
675 padding: 8px;
676 }
676 }
677 .input_area {
677 .input_area {
678 padding: 0.4em;
678 padding: 0.4em;
679 }
679 }
680
680
681 </style>
681 </style>
682 <meta charset="UTF-8">
682 <meta charset="UTF-8">
683 <style type="text/css">
683 <style type="text/css">
684 .highlight .hll { background-color: #ffffcc }
684 .highlight .hll { background-color: #ffffcc }
685 .highlight { background: #f8f8f8; }
685 .highlight { background: #f8f8f8; }
686 .highlight .c { color: #408080; font-style: italic } /* Comment */
686 .highlight .c { color: #408080; font-style: italic } /* Comment */
687 .highlight .err { border: 1px solid #FF0000 } /* Error */
687 .highlight .err { border: 1px solid #FF0000 } /* Error */
688 .highlight .k { color: #008000; font-weight: bold } /* Keyword */
688 .highlight .k { color: #008000; font-weight: bold } /* Keyword */
689 .highlight .o { color: #666666 } /* Operator */
689 .highlight .o { color: #666666 } /* Operator */
690 .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
690 .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
691 .highlight .cp { color: #BC7A00 } /* Comment.Preproc */
691 .highlight .cp { color: #BC7A00 } /* Comment.Preproc */
692 .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
692 .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
693 .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
693 .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
694 .highlight .gd { color: #A00000 } /* Generic.Deleted */
694 .highlight .gd { color: #A00000 } /* Generic.Deleted */
695 .highlight .ge { font-style: italic } /* Generic.Emph */
695 .highlight .ge { font-style: italic } /* Generic.Emph */
696 .highlight .gr { color: #FF0000 } /* Generic.Error */
696 .highlight .gr { color: #FF0000 } /* Generic.Error */
697 .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
697 .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
698 .highlight .gi { color: #00A000 } /* Generic.Inserted */
698 .highlight .gi { color: #00A000 } /* Generic.Inserted */
699 .highlight .go { color: #808080 } /* Generic.Output */
699 .highlight .go { color: #808080 } /* Generic.Output */
700 .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
700 .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
701 .highlight .gs { font-weight: bold } /* Generic.Strong */
701 .highlight .gs { font-weight: bold } /* Generic.Strong */
702 .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
702 .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
703 .highlight .gt { color: #0040D0 } /* Generic.Traceback */
703 .highlight .gt { color: #0040D0 } /* Generic.Traceback */
704 .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
704 .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
705 .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
705 .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
706 .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
706 .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
707 .highlight .kp { color: #008000 } /* Keyword.Pseudo */
707 .highlight .kp { color: #008000 } /* Keyword.Pseudo */
708 .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
708 .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
709 .highlight .kt { color: #B00040 } /* Keyword.Type */
709 .highlight .kt { color: #B00040 } /* Keyword.Type */
710 .highlight .m { color: #666666 } /* Literal.Number */
710 .highlight .m { color: #666666 } /* Literal.Number */
711 .highlight .s { color: #BA2121 } /* Literal.String */
711 .highlight .s { color: #BA2121 } /* Literal.String */
712 .highlight .na { color: #7D9029 } /* Name.Attribute */
712 .highlight .na { color: #7D9029 } /* Name.Attribute */
713 .highlight .nb { color: #008000 } /* Name.Builtin */
713 .highlight .nb { color: #008000 } /* Name.Builtin */
714 .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
714 .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
715 .highlight .no { color: #880000 } /* Name.Constant */
715 .highlight .no { color: #880000 } /* Name.Constant */
716 .highlight .nd { color: #AA22FF } /* Name.Decorator */
716 .highlight .nd { color: #AA22FF } /* Name.Decorator */
717 .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
717 .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
718 .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
718 .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
719 .highlight .nf { color: #0000FF } /* Name.Function */
719 .highlight .nf { color: #0000FF } /* Name.Function */
720 .highlight .nl { color: #A0A000 } /* Name.Label */
720 .highlight .nl { color: #A0A000 } /* Name.Label */
721 .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
721 .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
722 .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
722 .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
723 .highlight .nv { color: #19177C } /* Name.Variable */
723 .highlight .nv { color: #19177C } /* Name.Variable */
724 .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
724 .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
725 .highlight .w { color: #bbbbbb } /* Text.Whitespace */
725 .highlight .w { color: #bbbbbb } /* Text.Whitespace */
726 .highlight .mf { color: #666666 } /* Literal.Number.Float */
726 .highlight .mf { color: #666666 } /* Literal.Number.Float */
727 .highlight .mh { color: #666666 } /* Literal.Number.Hex */
727 .highlight .mh { color: #666666 } /* Literal.Number.Hex */
728 .highlight .mi { color: #666666 } /* Literal.Number.Integer */
728 .highlight .mi { color: #666666 } /* Literal.Number.Integer */
729 .highlight .mo { color: #666666 } /* Literal.Number.Oct */
729 .highlight .mo { color: #666666 } /* Literal.Number.Oct */
730 .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
730 .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
731 .highlight .sc { color: #BA2121 } /* Literal.String.Char */
731 .highlight .sc { color: #BA2121 } /* Literal.String.Char */
732 .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
732 .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
733 .highlight .s2 { color: #BA2121 } /* Literal.String.Double */
733 .highlight .s2 { color: #BA2121 } /* Literal.String.Double */
734 .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
734 .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
735 .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
735 .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
736 .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
736 .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
737 .highlight .sx { color: #008000 } /* Literal.String.Other */
737 .highlight .sx { color: #008000 } /* Literal.String.Other */
738 .highlight .sr { color: #BB6688 } /* Literal.String.Regex */
738 .highlight .sr { color: #BB6688 } /* Literal.String.Regex */
739 .highlight .s1 { color: #BA2121 } /* Literal.String.Single */
739 .highlight .s1 { color: #BA2121 } /* Literal.String.Single */
740 .highlight .ss { color: #19177C } /* Literal.String.Symbol */
740 .highlight .ss { color: #19177C } /* Literal.String.Symbol */
741 .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
741 .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
742 .highlight .vc { color: #19177C } /* Name.Variable.Class */
742 .highlight .vc { color: #19177C } /* Name.Variable.Class */
743 .highlight .vg { color: #19177C } /* Name.Variable.Global */
743 .highlight .vg { color: #19177C } /* Name.Variable.Global */
744 .highlight .vi { color: #19177C } /* Name.Variable.Instance */
744 .highlight .vi { color: #19177C } /* Name.Variable.Instance */
745 .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
745 .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
746 </style>
746 </style>
747 <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript">
747 <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript">
748
748
749 </script>
749 </script>
750 <script type="text/javascript">
750 <script type="text/javascript">
751 init_mathjax = function() {
751 init_mathjax = function() {
752 if (window.MathJax) {
752 if (window.MathJax) {
753 // MathJax loaded
753 // MathJax loaded
754 MathJax.Hub.Config({
754 MathJax.Hub.Config({
755 tex2jax: {
755 tex2jax: {
756 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
756 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
757 displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
757 displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
758 },
758 },
759 displayAlign: 'left', // Change this to 'center' to center equations.
759 displayAlign: 'left', // Change this to 'center' to center equations.
760 "HTML-CSS": {
760 "HTML-CSS": {
761 styles: {'.MathJax_Display': {"margin": 0}}
761 styles: {'.MathJax_Display': {"margin": 0}}
762 }
762 }
763 });
763 });
764 MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
764 MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
765 }
765 }
766 }
766 }
767 init_mathjax();
767 init_mathjax();
768 </script>
768 </script>
769 </head>
769 </head>
770 {%- endblock header -%}
770 {%- endblock header -%}
771
771
772
772
773 {% block body %}
773 {% block body %}
774 <body>{{ super() }}<body/>
774 <body>{{ super() }}<body/>
775
775
776 {% endblock body %}
776 {% endblock body %}
777
777
778
778
779
779
780
780
781
781
782
782
783
783
784
784
785 {% block footer %}
785 {% block footer %}
786 </html>
786 </html>
787 {% endblock footer %}
787 {% endblock footer %}
General Comments 0
You need to be logged in to leave comments. Login now