Skip to content

Commit ceb8baf

Browse files
author
y1thof
committed
Latex ipython template: draw a vertical line left of ipython code
1 parent e59f4ce commit ceb8baf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nbconvert/templates/latex/document_contents.tplx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

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

2424
% Display stream ouput with coloring
2525
((* block stream *))
26-
\begin{Verbatim}[commandchars=\\\{\}]
26+
\begin{Verbatim}[commandchars=\\\{\},frame=leftline,framerule=1pt,rulecolor=\color{gray}]
2727
((( output.text | escape_latex | ansi2latex )))
2828
\end{Verbatim}
2929
((* endblock stream *))

nbconvert/templates/latex/style_ipython.tplx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
((*- set execution_count = " " -*))
6565
((*- endif -*))
6666
((*- set indention = " " * (execution_count | length + 7) -*))
67-
\begin{Verbatim}[commandchars=\\\{\}]
67+
\begin{Verbatim}[commandchars=\\\{\},frame=leftline,framerule=1pt,rulecolor=\color{((( prompt_color )))}]
6868
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) )))
6969
\end{Verbatim}
7070
((*- endmacro *))

0 commit comments

Comments
 (0)