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