Skip to content

Commit

Permalink
Latex ipython template: draw a vertical line left of ipython code
Browse files Browse the repository at this point in the history
  • Loading branch information
y1thof committed Mar 27, 2018
1 parent e59f4ce commit ceb8baf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nbconvert/templates/latex/document_contents.tplx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

% Display python error text as-is
((* block error *))
\begin{Verbatim}[commandchars=\\\{\}]
\begin{Verbatim}[commandchars=\\\{\},frame=leftline,framerule=1pt,rulecolor=\color{red}]
((( super() )))
\end{Verbatim}
((* endblock error *))
Expand All @@ -23,7 +23,7 @@

% Display stream ouput with coloring
((* block stream *))
\begin{Verbatim}[commandchars=\\\{\}]
\begin{Verbatim}[commandchars=\\\{\},frame=leftline,framerule=1pt,rulecolor=\color{gray}]
((( output.text | escape_latex | ansi2latex )))
\end{Verbatim}
((* endblock stream *))
Expand Down
2 changes: 1 addition & 1 deletion nbconvert/templates/latex/style_ipython.tplx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
((*- set execution_count = " " -*))
((*- endif -*))
((*- set indention = " " * (execution_count | length + 7) -*))
\begin{Verbatim}[commandchars=\\\{\}]
\begin{Verbatim}[commandchars=\\\{\},frame=leftline,framerule=1pt,rulecolor=\color{((( prompt_color )))}]
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) )))
\end{Verbatim}
((*- endmacro *))

0 comments on commit ceb8baf

Please sign in to comment.