##// END OF EJS Templates
Unindent
Unindent

File last commit:

r12688:6fe4e4cb
r12721:87076bbf
Show More
simple_style.tplx
68 lines | 1.9 KiB | text/plain | TextLexer
Jonathan Frederic
Added dummy...
r12664 ((= Simple input/output style =))
Jonathan Frederic
Proof of concept
r12665 ((*- extends 'latex_base.tplx' -*))
Jonathan Frederic
Use needspace for latex simplestyle to make prompt lines follow text
r12678
% Custom packages
((* block packages *))
((( super() )))
Jonathan Frederic
Moved pygments defs out of base
r12688
Jonathan Frederic
Use needspace for latex simplestyle to make prompt lines follow text
r12678 \usepackage{needspace} % Make prompts follow contents
((* endblock packages *))
% Custom definitions
((* block definitions *))
Jonathan Frederic
Added mdframed package
r12686 ((( super() )))
Jonathan Frederic
Moved pygments defs out of base
r12688
% Pygments definitions
((( resources.latex.pygment_definitions )))
Jonathan Frederic
Use needspace for latex simplestyle to make prompt lines follow text
r12678 \newlength{\promptspace}
\setlength{\promptspace}{4\baselineskip} % Space needed to start a new
% input/output
((* endblock definitions *))
Jonathan Frederic
Implemented old simple style prompts
r12671 %===============================================================================
% Input
%===============================================================================
((*- block in_prompt scoped -*))
Jonathan Frederic
s/write_prompt/draw_prompt
r12687 ((( draw_prompt('Input') )))
Jonathan Frederic
Implemented old simple style prompts
r12671 ((*- endblock in_prompt -*))
((*- block input_group scoped -*))
(((- super() )))
\vspace{-2em}
((* endblock input_group -*))
Jonathan Frederic
Moved pygments defs out of base
r12688 ((* block input scoped *))
((( cell.input | highlight2latex )))
((* endblock input *))
Jonathan Frederic
Implemented old simple style prompts
r12671
%===============================================================================
% Output
%===============================================================================
((*- block output_prompt scoped -*))
Jonathan Frederic
s/write_prompt/draw_prompt
r12687 ((( draw_prompt('Output') )))
Jonathan Frederic
Implemented old simple style prompts
r12671 ((*- endblock output_prompt -*))
((*- block output_group scoped -*))
(((- super() )))
\vspace{-2em}
((* endblock output_group -*))
%==============================================================================
% Support Macros
%==============================================================================
Jonathan Frederic
s/write_prompt/draw_prompt
r12687 % Name: draw_prompt
Jonathan Frederic
Implemented old simple style prompts
r12671 % Purpose: Renders an output/input prompt for notebook style pdfs
Jonathan Frederic
s/write_prompt/draw_prompt
r12687 ((* macro draw_prompt(prompt) *))
Jonathan Frederic
Implemented old simple style prompts
r12671 % Add a horizantal break, along with break title.
Jonathan Frederic
Use needspace for latex simplestyle to make prompt lines follow text
r12678 \needspace{\promptspace}
Jonathan Frederic
Implemented old simple style prompts
r12671 \br\br
{\scriptsize ((( prompt )))}
\br
\rule[10pt]{\linewidth}{0.5pt}
\vspace{-2.5em}
((* endmacro *))