##// END OF EJS Templates
s/write_prompt/draw_prompt
Jonathan Frederic -
Show More
@@ -1,61 +1,61 b''
1 ((= Simple input/output style =))
1 ((= Simple input/output style =))
2
2
3 ((*- extends 'latex_base.tplx' -*))
3 ((*- extends 'latex_base.tplx' -*))
4
4
5
5
6 % Custom packages
6 % Custom packages
7 ((* block packages *))
7 ((* block packages *))
8 ((( super() )))
8 ((( super() )))
9 \usepackage{needspace} % Make prompts follow contents
9 \usepackage{needspace} % Make prompts follow contents
10 ((* endblock packages *))
10 ((* endblock packages *))
11
11
12 % Custom definitions
12 % Custom definitions
13 ((* block definitions *))
13 ((* block definitions *))
14 ((( super() )))
14 ((( super() )))
15
15
16 \newlength{\promptspace}
16 \newlength{\promptspace}
17 \setlength{\promptspace}{4\baselineskip} % Space needed to start a new
17 \setlength{\promptspace}{4\baselineskip} % Space needed to start a new
18 % input/output
18 % input/output
19 ((* endblock definitions *))
19 ((* endblock definitions *))
20 %===============================================================================
20 %===============================================================================
21 % Input
21 % Input
22 %===============================================================================
22 %===============================================================================
23
23
24 ((*- block in_prompt scoped -*))
24 ((*- block in_prompt scoped -*))
25 ((( write_prompt('Input') )))
25 ((( draw_prompt('Input') )))
26 ((*- endblock in_prompt -*))
26 ((*- endblock in_prompt -*))
27
27
28 ((*- block input_group scoped -*))
28 ((*- block input_group scoped -*))
29 (((- super() )))
29 (((- super() )))
30 \vspace{-2em}
30 \vspace{-2em}
31 ((* endblock input_group -*))
31 ((* endblock input_group -*))
32
32
33
33
34 %===============================================================================
34 %===============================================================================
35 % Output
35 % Output
36 %===============================================================================
36 %===============================================================================
37
37
38 ((*- block output_prompt scoped -*))
38 ((*- block output_prompt scoped -*))
39 ((( write_prompt('Output') )))
39 ((( draw_prompt('Output') )))
40 ((*- endblock output_prompt -*))
40 ((*- endblock output_prompt -*))
41
41
42 ((*- block output_group scoped -*))
42 ((*- block output_group scoped -*))
43 (((- super() )))
43 (((- super() )))
44 \vspace{-2em}
44 \vspace{-2em}
45 ((* endblock output_group -*))
45 ((* endblock output_group -*))
46
46
47 %==============================================================================
47 %==============================================================================
48 % Support Macros
48 % Support Macros
49 %==============================================================================
49 %==============================================================================
50
50
51 % Name: write_prompt
51 % Name: draw_prompt
52 % Purpose: Renders an output/input prompt for notebook style pdfs
52 % Purpose: Renders an output/input prompt for notebook style pdfs
53 ((* macro write_prompt(prompt) *))
53 ((* macro draw_prompt(prompt) *))
54 % Add a horizantal break, along with break title.
54 % Add a horizantal break, along with break title.
55 \needspace{\promptspace}
55 \needspace{\promptspace}
56 \br\br
56 \br\br
57 {\scriptsize ((( prompt )))}
57 {\scriptsize ((( prompt )))}
58 \br
58 \br
59 \rule[10pt]{\linewidth}{0.5pt}
59 \rule[10pt]{\linewidth}{0.5pt}
60 \vspace{-2.5em}
60 \vspace{-2.5em}
61 ((* endmacro *))
61 ((* endmacro *))
General Comments 0
You need to be logged in to leave comments. Login now