##// END OF EJS Templates
remove unnecessary 'js' subdir from services...
remove unnecessary 'js' subdir from services part of the point of services is that they are just code, so they won't have js/less/etc. files.

File last commit:

r18381:0fabf68d
r18422:b12e9e0d
Show More
style_ipython.tplx
58 lines | 2.0 KiB | text/plain | TextLexer
Jonathan Frederic
Fixed doc comment
r12719 ((= IPython input/output style =))
Jonathan Frederic
Add colored ipython style
r12718
Thomas Kluyver
Remove magic for loading templates from module names
r13925 ((*- extends 'base.tplx' -*))
Jonathan Frederic
Add colored ipython style
r12718
% Custom definitions
((* block definitions *))
((( super() )))
% Pygments definitions
Jonathan Frederic
s/pygment/pygments
r12742 ((( resources.latex.pygments_definitions )))
Jonathan Frederic
Add colored ipython style
r12718
Jonathan Frederic
Finishing up results of in person review
r12734 % Exact colors from NB
\definecolor{incolor}{rgb}{0.0, 0.0, 0.5}
\definecolor{outcolor}{rgb}{0.545, 0.0, 0.0}
Jonathan Frederic
Add colored ipython style
r12718 ((* endblock definitions *))
%===============================================================================
% Input
%===============================================================================
((* block input scoped *))
Thomas Kluyver
Use kernelspec metadata for higlighting in nbconvert...
r18381 ((( add_prompt(cell.input | highlight_code(strip_verbatim=True), cell, 'In ', 'incolor') )))
Jonathan Frederic
Add colored ipython style
r12718 ((* endblock input *))
%===============================================================================
% Output
%===============================================================================
((* block pyout scoped *))
((*- for type in output | filter_data_type -*))
((*- if type in ['text']*))
((( add_prompt(output.text | escape_latex, cell, 'Out', 'outcolor') )))
((* else -*))
Jonathan Frederic
Finishing up results of in person review
r12734 \texttt{\color{outcolor}Out[{\color{outcolor}((( cell.prompt_number )))}]:}((( super() )))
Jonathan Frederic
Add colored ipython style
r12718 ((*- endif -*))
((*- endfor -*))
((* endblock pyout *))
%==============================================================================
% Support Macros
%==============================================================================
% Name: draw_prompt
% Purpose: Renders an output/input prompt
((* macro add_prompt(text, cell, prompt, prompt_color) -*))
Jessica B. Hamrick
Handle case where prompt number is not defined in latex templates
r18345 ((*- if cell.prompt_number is defined -*))
Jessica B. Hamrick
Display prompt numbers correctly in latex output
r18328 ((*- set prompt_number = "" ~ (cell.prompt_number | replace(None, " ")) -*))
Jessica B. Hamrick
Handle case where prompt number is not defined in latex templates
r18345 ((*- else -*))
((*- set prompt_number = " " -*))
((*- endif -*))
Jonathan Frederic
Fixed, indentation broken post in person review
r12736 ((*- set indention = " " * (prompt_number | length + 7) -*))
Jonathan Frederic
Add colored ipython style
r12718 \begin{Verbatim}[commandchars=\\\{\}]
Jonathan Frederic
Fixed, indentation broken post in person review
r12736 ((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ prompt_number ~ '}]:} ', cont=indention) )))
Jonathan Frederic
Add colored ipython style
r12718 \end{Verbatim}
((*- endmacro *))