##// END OF EJS Templates
Added a nice comment to explain the line splitting.
Jonathan Frederic -
Show More
@@ -12,6 +12,16 b''
12
12
13 ((*- set wrap_size = 87 -*))
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 ((* block header *))
25 ((* block header *))
16
26
17 % Header, overrides base
27 % Header, overrides base
@@ -130,8 +140,8 b' not get touched by the templating system. =))'
130 {\scriptsize Input}\\*
140 {\scriptsize Input}\\*
131 \rule[10pt]{\linewidth}{0.5pt}
141 \rule[10pt]{\linewidth}{0.5pt}
132 \vspace{-25pt}
142 \vspace{-25pt}
133 ((( cell.input | wrap(wrap_size) | get_lines(end=3) | highlight )))
143 ((( cell.input | wrap(wrap_size) | get_lines(end=min_header_lines) | highlight )))
134 \end{minipage}((( cell.input | wrap(wrap_size) | get_lines(start=3) | highlight )))
144 \end{minipage}((( cell.input | wrap(wrap_size) | get_lines(start=min_header_lines) | highlight )))
135 ((* endblock input *))
145 ((* endblock input *))
136
146
137 ((* block pyerr *))
147 ((* block pyerr *))
@@ -141,10 +151,10 b' not get touched by the templating system. =))'
141 \rule[10pt]{\linewidth}{0.5pt}
151 \rule[10pt]{\linewidth}{0.5pt}
142 \vspace{-25pt}
152 \vspace{-25pt}
143 \begin{lstlisting}
153 \begin{lstlisting}
144 ((( super() | wrap(wrap_size) | get_lines(end=3) )))
154 ((( super() | wrap(wrap_size) | get_lines(end=min_header_lines) )))
145 \end{lstlisting}
155 \end{lstlisting}
146 \end{minipage} \begin{lstlisting}
156 \end{minipage} \begin{lstlisting}
147 ((( super() | wrap(wrap_size) | get_lines(start=3) )))
157 ((( super() | wrap(wrap_size) | get_lines(start=min_header_lines) )))
148 \end{lstlisting}
158 \end{lstlisting}
149 ((* endblock pyerr *))
159 ((* endblock pyerr *))
150
160
@@ -165,10 +175,10 b' not get touched by the templating system. =))'
165 \rule[10pt]{\linewidth}{0.5pt}
175 \rule[10pt]{\linewidth}{0.5pt}
166 \vspace{-25pt}
176 \vspace{-25pt}
167 \begin{lstlisting}
177 \begin{lstlisting}
168 ((( output.text | wrap(wrap_size) | get_lines(end=3) )))
178 ((( output.text | wrap(wrap_size) | get_lines(end=min_header_lines) )))
169 \end{lstlisting}
179 \end{lstlisting}
170 \end{minipage} \begin{lstlisting}
180 \end{minipage} \begin{lstlisting}
171 ((( output.text | wrap(wrap_size) | get_lines(start=3) )))
181 ((( output.text | wrap(wrap_size) | get_lines(start=min_header_lines) )))
172 \end{lstlisting}
182 \end{lstlisting}
173 ((* endblock stream *))
183 ((* endblock stream *))
174
184
General Comments 0
You need to be logged in to leave comments. Login now