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