##// END OF EJS Templates
Unindent
Jonathan Frederic -
Show More
@@ -1,41 +1,41
1 1 ((= Black&white ipython input/output style =))
2 2
3 3 ((*- extends 'latex_base.tplx' -*))
4 4
5 5 %===============================================================================
6 6 % Input
7 7 %===============================================================================
8 8
9 9 ((* block input scoped *))
10 10 ((( add_prompt(cell.input, cell, 'In ') )))
11 11 ((* endblock input *))
12 12
13 13
14 14 %===============================================================================
15 15 % Output
16 16 %===============================================================================
17 17
18 18 ((* block pyout scoped *))
19 19 ((*- for type in output | filter_data_type -*))
20 20 ((*- if type in ['text']*))
21 21 ((( add_prompt(output.text, cell, 'Out') )))
22 22 ((*- else -*))
23 \verb+Out[((( cell.prompt_number )))]:+((( super() )))
23 \verb+Out[((( cell.prompt_number )))]:+((( super() )))
24 24 ((*- endif -*))
25 25 ((*- endfor -*))
26 26 ((* endblock pyout *))
27 27
28 28
29 29 %==============================================================================
30 30 % Support Macros
31 31 %==============================================================================
32 32
33 33 % Name: draw_prompt
34 34 % Purpose: Renders an output/input prompt
35 35 ((* macro add_prompt(text, cell, prompt) -*))
36 36 ((*- set prompt_number = "" ~ cell.prompt_number -*))
37 37 ((*- set prompt_number_replacement = "." * (prompt_number | length + 2) -*))
38 38 \begin{verbatim}
39 39 (((- text | add_prompts(first=prompt ~ '[' ~ prompt_number ~ ']: ', cont=' ' ~ prompt_number_replacement ~ ': ') -)))
40 40 \end{verbatim}
41 41 ((*- endmacro *))
General Comments 0
You need to be logged in to leave comments. Login now