Show More
@@ -91,6 +91,7 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
91 | 91 | ((* if resources.sphinx.outputstyle == 'notebook' *)) |
|
92 | 92 | \definecolor{nbframe-border}{rgb}{0.8,0.8,0.8} |
|
93 | 93 | \definecolor{nbframe-bg}{rgb}{0.95,0.95,0.95} |
|
94 | \definecolor{nbframe-prompt}{rgb}{0.05,0.05,0.3} | |
|
94 | 95 | |
|
95 | 96 | \newenvironment{ColorVerbatim} |
|
96 | 97 |
{\begin{mdframed}[backgroundcolor=nbframe-bg, |
@@ -132,7 +133,10 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
132 | 133 | % Start of the document |
|
133 | 134 | \begin{document} |
|
134 | 135 | \maketitle |
|
136 | ||
|
137 | ((* block toc *)) | |
|
135 | 138 | \tableofcontents |
|
139 | ((* endblock toc *)) | |
|
136 | 140 | |
|
137 | 141 | ((* endblock bodyBegin *))((( super() )))((* block bodyEnd *)) |
|
138 | 142 | |
@@ -215,10 +219,12 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
215 | 219 | % Input |
|
216 | 220 | %============================================================================== |
|
217 | 221 | ((* block input *)) |
|
218 | ((* if resources.sphinx.outputstyle == 'simple' *)) | |
|
222 | ||
|
219 | 223 |
|
|
220 | 224 |
|
|
221 | 225 | |
|
226 | ((* if resources.sphinx.outputstyle == 'simple' *)) | |
|
227 | ||
|
222 | 228 | % Add a horizantal break, along with break title. |
|
223 | 229 | \vspace{10pt} |
|
224 | 230 | {\scriptsize Input}\\* |
@@ -229,9 +235,11 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
229 | 235 | ((( cell.input | highlight ))) |
|
230 | 236 | |
|
231 | 237 | ((* elif resources.sphinx.outputstyle == 'notebook' *)) |
|
232 | \textbf{In {[}((( cell.prompt_number ))){]}:}\\* | |
|
233 | \vspace{-2.4\baselineskip} | |
|
238 | \vspace{5pt} | |
|
239 | {\color{nbframe-prompt}\textbf{In {[}((( cell.prompt_number ))){]}:}}\\* | |
|
240 | \vspace{-2.6\baselineskip} | |
|
234 | 241 | \begin{ColorVerbatim} |
|
242 | \vspace{-0.5\baselineskip} | |
|
235 | 243 | ((( cell.input | highlight ))) |
|
236 | 244 | \end{ColorVerbatim} |
|
237 | 245 | ((* endif *)) |
@@ -244,6 +252,7 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
244 | 252 | % once. By keeping track of when an input group is started |
|
245 | 253 | %============================================================================== |
|
246 | 254 | ((* block output_group *)) |
|
255 | ((* if cell.outputs.__len__() > 0 *)) | |
|
247 | 256 | ((* if resources.sphinx.outputstyle == 'simple' *)) |
|
248 | 257 | |
|
249 | 258 | % If the first block is an image, minipage the image. Else |
@@ -278,6 +287,7 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
278 | 287 | ((* endfor *)) |
|
279 | 288 | \end{ColorVerbatim} |
|
280 | 289 | ((* endif *)) |
|
290 | ((* endif *)) | |
|
281 | 291 | ((* endblock *)) |
|
282 | 292 | |
|
283 | 293 | %============================================================================== |
@@ -302,6 +312,10 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
302 | 312 | ((( insert_graphics(output.key_svg) ))) |
|
303 | 313 | ((*- endblock -*)) |
|
304 | 314 | |
|
315 | ((*- block data_latex *)) | |
|
316 | ((( output.latex ))) | |
|
317 | ((* endblock -*)) | |
|
318 | ||
|
305 | 319 | %============================================================================== |
|
306 | 320 | % Support Macros |
|
307 | 321 | %============================================================================== |
@@ -309,22 +323,14 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
309 | 323 | % Name: render_output |
|
310 | 324 | % Purpose: Renders an output block appropriately. |
|
311 | 325 | ((* macro render_output(output) -*)) |
|
312 |
((*- if output.output_type == 'py |
|
|
313 |
((*- block py |
|
|
326 | ((*- if output.output_type == 'pyerr' -*)) | |
|
327 | ((*- block pyerr scoped *)) | |
|
314 | 328 | ((( custom_verbatim(super()) ))) |
|
315 |
((* |
|
|
316 | ((*- elif output.output_type == 'stream' -*)) | |
|
317 | ((*- block stream scoped -*)) | |
|
318 | ((( custom_verbatim(output.text) ))) | |
|
319 | ((*- endblock stream -*)) | |
|
320 | ((*- elif output.output_type == 'display_data' -*)) | |
|
329 | ((* endblock pyerr -*)) | |
|
330 | ((*- else -*)) | |
|
321 | 331 | ((*- block display_data scoped -*)) |
|
322 | 332 | ((( super() ))) |
|
323 | 333 | ((*- endblock display_data -*)) |
|
324 | ((*- elif output.output_type == 'pyerr' -*)) | |
|
325 | ((*- block pyerr scoped -*)) | |
|
326 | ((( custom_verbatim(super()) ))) | |
|
327 | ((*- endblock pyerr -*)) | |
|
328 | 334 | ((*- endif -*)) |
|
329 | 335 | ((*- endmacro *)) |
|
330 | 336 |
General Comments 0
You need to be logged in to leave comments.
Login now