From 88673906059b79626ca33f8b629dd4b61f0d12fa 2013-09-23 17:57:19 From: Jonathan Frederic Date: 2013-09-23 17:57:19 Subject: [PATCH] Move verbatim into add prompt macro --- diff --git a/IPython/nbconvert/templates/latex/bw_ipython_style.tplx b/IPython/nbconvert/templates/latex/bw_ipython_style.tplx index 1d77964..e8e7628 100644 --- a/IPython/nbconvert/templates/latex/bw_ipython_style.tplx +++ b/IPython/nbconvert/templates/latex/bw_ipython_style.tplx @@ -7,7 +7,7 @@ %=============================================================================== ((* block input scoped *)) - \begin{verbatim}((( add_prompt(cell.input, cell, 'In ') )))\end{verbatim} +((( add_prompt(cell.input, cell, 'In ') ))) ((* endblock input *)) @@ -18,7 +18,7 @@ ((* block pyout scoped *)) ((*- for type in output | filter_data_type -*)) ((*- if type in ['text']*)) - \begin{verbatim}((( add_prompt(output.text, cell, 'Out') )))\end{verbatim} +((( add_prompt(output.text, cell, 'Out') ))) ((*- else -*)) \verb+Out[((( cell.prompt_number )))]:+((( super() ))) ((*- endif -*)) @@ -35,5 +35,7 @@ ((* macro add_prompt(text, cell, prompt) -*)) ((*- set prompt_number = "" ~ cell.prompt_number -*)) ((*- set prompt_number_replacement = "." * (prompt_number | length + 2) -*)) - (((- text | add_prompts(first=prompt ~ '[' ~ prompt_number ~ ']: ', cont=' ' ~ prompt_number_replacement ~ ': ') -))) +\begin{verbatim} +(((- text | add_prompts(first=prompt ~ '[' ~ prompt_number ~ ']: ', cont=' ' ~ prompt_number_replacement ~ ': ') -))) +\end{verbatim} ((*- endmacro *))