Show More
@@ -12,6 +12,16 b'' | |||
|
12 | 12 | |
|
13 | 13 | ((*- set wrap_size = 87 -*)) |
|
14 | 14 | |
|
15 | % In order to make sure that the input/output header follows the code it | |
|
16 | % preceeds, we have to use a minipage environment. This causes problems | |
|
17 | % for large blocks of input and output. If there is a large input/output | |
|
18 | % block, we don't want to minipage the whole thing since it will break | |
|
19 | % the line wrapping. The solution is to split the input/output line by | |
|
20 | % line before we minipage which allows us to minipage the first X lines | |
|
21 | % preceeding the input/output bar. That way, a select amount of lines | |
|
22 | % force the input/output bar to follow it around. | |
|
23 | ((*- set min_header_lines = 3 -*)) | |
|
24 | ||
|
15 | 25 | ((* block header *)) |
|
16 | 26 | |
|
17 | 27 | % Header, overrides base |
@@ -130,8 +140,8 b' not get touched by the templating system. =))' | |||
|
130 | 140 | {\scriptsize Input}\\* |
|
131 | 141 | \rule[10pt]{\linewidth}{0.5pt} |
|
132 | 142 | \vspace{-25pt} |
|
133 |
((( cell.input | wrap(wrap_size) | get_lines(end= |
|
|
134 |
\end{minipage}((( cell.input | wrap(wrap_size) | get_lines(start= |
|
|
143 | ((( cell.input | wrap(wrap_size) | get_lines(end=min_header_lines) | highlight ))) | |
|
144 | \end{minipage}((( cell.input | wrap(wrap_size) | get_lines(start=min_header_lines) | highlight ))) | |
|
135 | 145 | ((* endblock input *)) |
|
136 | 146 | |
|
137 | 147 | ((* block pyerr *)) |
@@ -141,10 +151,10 b' not get touched by the templating system. =))' | |||
|
141 | 151 | \rule[10pt]{\linewidth}{0.5pt} |
|
142 | 152 | \vspace{-25pt} |
|
143 | 153 | \begin{lstlisting} |
|
144 |
((( super() | wrap(wrap_size) | get_lines(end= |
|
|
154 | ((( super() | wrap(wrap_size) | get_lines(end=min_header_lines) ))) | |
|
145 | 155 | \end{lstlisting} |
|
146 | 156 | \end{minipage} \begin{lstlisting} |
|
147 |
((( super() | wrap(wrap_size) | get_lines(start= |
|
|
157 | ((( super() | wrap(wrap_size) | get_lines(start=min_header_lines) ))) | |
|
148 | 158 | \end{lstlisting} |
|
149 | 159 | ((* endblock pyerr *)) |
|
150 | 160 | |
@@ -165,10 +175,10 b' not get touched by the templating system. =))' | |||
|
165 | 175 | \rule[10pt]{\linewidth}{0.5pt} |
|
166 | 176 | \vspace{-25pt} |
|
167 | 177 | \begin{lstlisting} |
|
168 |
((( output.text | wrap(wrap_size) | get_lines(end= |
|
|
178 | ((( output.text | wrap(wrap_size) | get_lines(end=min_header_lines) ))) | |
|
169 | 179 | \end{lstlisting} |
|
170 | 180 | \end{minipage} \begin{lstlisting} |
|
171 |
((( output.text | wrap(wrap_size) | get_lines(start= |
|
|
181 | ((( output.text | wrap(wrap_size) | get_lines(start=min_header_lines) ))) | |
|
172 | 182 | \end{lstlisting} |
|
173 | 183 | ((* endblock stream *)) |
|
174 | 184 |
General Comments 0
You need to be logged in to leave comments.
Login now