##// END OF EJS Templates
Localized code into jinja macros.
Jonathan Frederic -
Show More
@@ -191,82 +191,79 b' Note: For best display, use latex syntax highlighting. =))'
191
191
192 %==============================================================================
192 %==============================================================================
193 % Input
193 % Input
194 %
195 % Purpose: TODO
196 %==============================================================================
194 %==============================================================================
197 ((* block input *))
195 ((* block input *))
196
197 ((= Global variable used to determine whether or not a header bar has been
198 applied to the group of output blocks already. We still need to set
199 it to true to make sure that the block bar gets rendered.=))
200 ((*- set needs_header = true -*))
201
198 ((* set text_begining = cell.input | wrap(wrap_size) | get_lines(end=min_header_lines) | highlight *))
202 ((* set text_begining = cell.input | wrap(wrap_size) | get_lines(end=min_header_lines) | highlight *))
199 ((* set text_remainer = cell.input | wrap(wrap_size) | get_lines(start=min_header_lines) | highlight *))
203 ((* set text_remainer = cell.input | wrap(wrap_size) | get_lines(start=min_header_lines) | highlight *))
200 ((( inputBlock(text_begining, text_remainer) )))
204 ((( inputBlock(text_begining, text_remainer) )))
201 ((* endblock input *))
205 ((* endblock input *))
202
206
203 %==============================================================================
207 %==============================================================================
204 % pyerr
208 % Output_Group
205 %
209 %
206 % Purpose: TODO
210 % Purpose: Make sure that only one header bar only attaches to the output
211 % once. By keeping track of when an input group is started
207 %==============================================================================
212 %==============================================================================
208 ((* block pyerr *))
213 ((*- block output_group -*))
209 ((* set text_begining = super() | wrap(wrap_size) | get_lines(end=min_header_lines) *))
210 ((* set text_remainer = super() | wrap(wrap_size) | get_lines(start=min_header_lines) *))
211 ((( inputBlock(customVerbatim(text_begining), customVerbatim(text_remainer)) )))
212 ((* endblock pyerr *))
213
214
214 %==============================================================================
215 ((= Global variable used to determine whether or not a header bar has been
215 % display_data
216 applied to the group of output blocks already. =))
216 %
217 ((*- set needs_header = true -*))
217 % Purpose: TODO
218
218 %==============================================================================
219 ((( super() )))
219 ((*- block display_data -*))
220 ((* endblock *))
220 ((( inputBlock(super(), "") )))
221 ((*- endblock display_data -*))
222
221
223 %==============================================================================
222 %==============================================================================
224 % stream
223 % Output types
225 %
226 % Purpose: TODO
227 %==============================================================================
224 %==============================================================================
225 ((* block pyout *))
226 ((* block data_priority scoped -*))
227 ((( inputBlock(super(),"") )))
228 ((*- endblock *))
229 ((* endblock pyout *))
230
228 ((* block stream *))
231 ((* block stream *))
229 ((* set text_begining = output.text | wrap(wrap_size) | get_lines(end=min_header_lines) *))
232 ((* set text_begining = output.text | wrap(wrap_size) | get_lines(end=min_header_lines) *))
230 ((* set text_remainer = output.text | wrap(wrap_size) | get_lines(start=min_header_lines) *))
233 ((* set text_remainer = output.text | wrap(wrap_size) | get_lines(start=min_header_lines) *))
231 ((( inputBlock(customVerbatim(text_begining), customVerbatim(text_remainer)) )))
234 ((( inputBlock(customVerbatim(text_begining), customVerbatim(text_remainer)) )))
232 ((* endblock stream *))
235 ((* endblock stream *))
233
236
234 %==============================================================================
237 ((*- block display_data -*))
235 % pyout
238 ((( inputBlock(super(), "") )))
236 %
239 ((*- endblock display_data -*))
237 % Purpose: TODO
238 %==============================================================================
239 ((* block pyout *))
240 ((* block data_priority scoped *))((( super() )))((* endblock *))
241 ((* endblock pyout *))
242
240
243 %==============================================================================
241 ((* block pyerr *))
244 % traceback_line
242 ((* set text_begining = super() | wrap(wrap_size) | get_lines(end=min_header_lines) *))
245 %
243 ((* set text_remainer = super() | wrap(wrap_size) | get_lines(start=min_header_lines) *))
246 % Purpose: TODO
244 ((( inputBlock(customVerbatim(text_begining), customVerbatim(text_remainer)) )))
247 %==============================================================================
245 ((* endblock pyerr *))
248 ((* block traceback_line *))
249 ((( line | wrap(wrap_size) |indent| rm_ansi )))((* endblock traceback_line *))
250 ((= .... =))
251
246
252 %==============================================================================
247 %==============================================================================
253 % data_text
248 % Additional formating
254 %
255 % Purpose: TODO
256 %==============================================================================
249 %==============================================================================
257 ((* block data_text *))
250 ((* block data_text *))
258 ((( customVerbatim(output.text | wrap(wrap_size)) )))
251 ((( customVerbatim(output.text | wrap(wrap_size)) )))
259 ((* endblock *))
252 ((* endblock *))
260
253
254 ((* block traceback_line *))
255 ((( line | wrap(wrap_size) |indent| rm_ansi )))
256 ((* endblock traceback_line *))
257
261 %==============================================================================
258 %==============================================================================
262 % Supported image formats
259 % Supported image formats
263 %==============================================================================
260 %==============================================================================
264 ((*- block data_png -*))
261 ((*- block data_png -*))
265 ((( insertGraphics(output.key_png) )))
262 ((( insertGraphics(output.key_png) )))
266 ((*- endblock -*))
263 ((*- endblock -*))
267
264
268 ((*- block data_svg -*))
265 ((*- block data_svg -*))
269 ((( insertGraphics(output.key_svg) )))
266 ((( insertGraphics(output.key_svg) )))
270 ((*- endblock -*))
267 ((*- endblock -*))
271
268
272 %==============================================================================
269 %==============================================================================
@@ -281,13 +278,19 b' Note: For best display, use latex syntax highlighting. =))'
281 ((*- endmacro *))
278 ((*- endmacro *))
282
279
283 ((* macro nbconvertBlock(blockTitle, text_begining, text_remainer) -*))
280 ((* macro nbconvertBlock(blockTitle, text_begining, text_remainer) -*))
284 \vspace{10pt}
281 ((*- if needs_header -*))
285 \begin{minipage}{\textwidth}
282 \vspace{10pt}
286 {\scriptsize (((blockTitle)))}\\*
283 \begin{minipage}{\textwidth}
287 \rule[10pt]{\linewidth}{0.5pt}
284 {\scriptsize (((blockTitle)))}\\*
288 \vspace{-25pt}
285 \rule[10pt]{\linewidth}{0.5pt}
286 \vspace{-25pt}
287 ((( text_begining )))
288 \end{minipage}((( text_remainer )))
289 ((*- else -*))
289 ((( text_begining )))
290 ((( text_begining )))
290 \end{minipage}((( text_remainer )))
291 ((( text_remainer )))
292 ((*- endif -*))
293 ((*- set needs_header = false -*))
291 ((*- endmacro *))
294 ((*- endmacro *))
292
295
293 ((* macro customVerbatim(text) -*))
296 ((* macro customVerbatim(text) -*))
General Comments 0
You need to be logged in to leave comments. Login now