Show More
@@ -26,7 +26,11 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
26 | 26 | % important that this limit is set so characters do not run off the |
|
27 | 27 | % edges of latex pages (since latex does not always seem smart enough |
|
28 | 28 | % to prevent this in some cases.) This is only applied to textual output |
|
29 | ((*- set wrap_size = 85 -*)) | |
|
29 | ((* if resources.sphinx.outputstyle == 'simple' *)) | |
|
30 | ((*- set wrap_size = 85 -*)) | |
|
31 | ((* elif resources.sphinx.outputstyle == 'notebook' *)) | |
|
32 | ((*- set wrap_size = 70 -*)) | |
|
33 | ((* endif *)) | |
|
30 | 34 | |
|
31 | 35 | %============================================================================== |
|
32 | 36 | % Header |
@@ -86,8 +90,8 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
86 | 90 | \definecolor{nbframe-border}{rgb}{0.8,0.8,0.8} |
|
87 | 91 | \definecolor{nbframe-bg}{rgb}{0.95,0.95,0.95} |
|
88 | 92 | |
|
89 |
\newenvironment{ColorVerbatim} |
|
|
90 |
{ |
|
|
93 | \newenvironment{ColorVerbatim} | |
|
94 | {\begin{mdframed}[backgroundcolor=nbframe-bg, userdefinedwidth=1\linewidth, leftmargin=0.08\linewidth, linecolor=nbframe-border, linewidth=1pt, usetwoside=false]} | |
|
91 | 95 | {\end{mdframed}} |
|
92 | 96 | |
|
93 | 97 | \renewenvironment{Verbatim}[1][\unskip] |
@@ -223,7 +227,9 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
223 | 227 | ((( cell.input | highlight ))) |
|
224 | 228 | |
|
225 | 229 | ((* elif resources.sphinx.outputstyle == 'notebook' *)) |
|
226 |
\ |
|
|
230 | \textbf{In {[}((( cell.prompt_number ))){]}:}\\* | |
|
231 | \vspace{-2.4\baselineskip} | |
|
232 | \begin{ColorVerbatim} | |
|
227 | 233 | ((( cell.input | highlight ))) |
|
228 | 234 | \end{ColorVerbatim} |
|
229 | 235 | ((* endif *)) |
@@ -260,10 +266,15 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
260 | 266 | ((* endfor *)) |
|
261 | 267 | ((* elif resources.sphinx.outputstyle == 'notebook' *)) |
|
262 | 268 | |
|
263 | % Add remainer of the document contents below. | |
|
264 | ((* for output in cell.outputs *)) | |
|
265 | ((( render_output(output) ))) | |
|
266 | ((* endfor *)) | |
|
269 | %Skip one line down. | |
|
270 | \vspace{1\baselineskip} | |
|
271 | ||
|
272 | % Add document contents. | |
|
273 | \begin{ColorVerbatim} | |
|
274 | ((* for output in cell.outputs *)) | |
|
275 | ((( render_output(output) ))) | |
|
276 | ((* endfor *)) | |
|
277 | \end{ColorVerbatim} | |
|
267 | 278 | ((* endif *)) |
|
268 | 279 | ((* endblock *)) |
|
269 | 280 | |
@@ -330,11 +341,15 b' Note: For best display, use latex syntax highlighting. =))' | |||
|
330 | 341 | % Purpose: This macro creates a verbatim style block that fits the existing |
|
331 | 342 | % sphinx style more readily than standard verbatim blocks. |
|
332 | 343 | ((* macro custom_verbatim(text) -*)) |
|
333 | ||
|
344 | ((* if resources.sphinx.outputstyle == 'simple' *)) | |
|
334 | 345 | \begin{lstlisting} |
|
335 | 346 | ((( text | wrap(wrap_size) ))) |
|
336 | \end{lstlisting} | |
|
337 | ||
|
347 | \end{lstlisting} | |
|
348 | ((* elif resources.sphinx.outputstyle == 'notebook' *)) | |
|
349 | \begin{alltt} | |
|
350 | ((( text | wrap(wrap_size) ))) | |
|
351 | \end{alltt} | |
|
352 | ((* endif *)) | |
|
338 | 353 | ((*- endmacro *)) |
|
339 | 354 | |
|
340 | 355 | % Name: insert_graphics |
General Comments 0
You need to be logged in to leave comments.
Login now