##// END OF EJS Templates
allow splitting and merging of heading cells...
allow splitting and merging of heading cells I consider it a bug that you couldn't merge with heading cells, and that you couldn't split them, either. (So much so that I thought it was a bug in ipython-vimception when I ran into it). This change removes that limitation, so heading cells are on par with the other cells in terms of the kinds of manipulations one can carry out with them.

File last commit:

r13925:7a8be7be
r17417:811c7332
Show More
style_bw_ipython.tplx
41 lines | 1.3 KiB | text/plain | TextLexer
Jonathan Frederic
Added black and white ipython style
r12711 ((= Black&white ipython input/output style =))
Thomas Kluyver
Remove magic for loading templates from module names
r13925 ((*- extends 'base.tplx' -*))
Jonathan Frederic
Added black and white ipython style
r12711
%===============================================================================
% Input
%===============================================================================
((* block input scoped *))
Jonathan Frederic
Move verbatim into add prompt macro
r12720 ((( add_prompt(cell.input, cell, 'In ') )))
Jonathan Frederic
Added black and white ipython style
r12711 ((* endblock input *))
%===============================================================================
% Output
%===============================================================================
((* block pyout scoped *))
((*- for type in output | filter_data_type -*))
((*- if type in ['text']*))
Jonathan Frederic
Move verbatim into add prompt macro
r12720 ((( add_prompt(output.text, cell, 'Out') )))
Jonathan Frederic
Added black and white ipython style
r12711 ((*- else -*))
Jonathan Frederic
Unindent
r12721 \verb+Out[((( cell.prompt_number )))]:+((( super() )))
Jonathan Frederic
Added black and white ipython style
r12711 ((*- endif -*))
((*- endfor -*))
((* endblock pyout *))
%==============================================================================
% Support Macros
%==============================================================================
% Name: draw_prompt
% Purpose: Renders an output/input prompt
((* macro add_prompt(text, cell, prompt) -*))
((*- set prompt_number = "" ~ cell.prompt_number -*))
Jonathan Frederic
Fixed, indentation broken post in person review
r12736 ((*- set indentation = " " * (prompt_number | length + 7) -*))
Jonathan Frederic
Move verbatim into add prompt macro
r12720 \begin{verbatim}
Jonathan Frederic
Fixed, indentation broken post in person review
r12736 (((- text | add_prompts(first=prompt ~ '[' ~ prompt_number ~ ']: ', cont=indentation) -)))
Jonathan Frederic
Move verbatim into add prompt macro
r12720 \end{verbatim}
Jonathan Frederic
Added black and white ipython style
r12711 ((*- endmacro *))