From a564f83774a1752bdbe190a6418e7ab657d49d01 2013-08-03 16:45:28 From: MinRK Date: 2013-08-03 16:45:28 Subject: [PATCH] ensure filenames have posix-paths in latex on Windows --- diff --git a/IPython/nbconvert/templates/latex/latex_basic.tplx b/IPython/nbconvert/templates/latex/latex_basic.tplx index f389c04..681865f 100644 --- a/IPython/nbconvert/templates/latex/latex_basic.tplx +++ b/IPython/nbconvert/templates/latex/latex_basic.tplx @@ -49,28 +49,28 @@ it introduces a new line ((*- block data_png -*)) \begin{center} -\includegraphics[max size={0.7\textwidth}{0.9\textheight}]{((( output.png_filename )))} +\includegraphics[max size={0.7\textwidth}{0.9\textheight}]{((( output.png_filename | posix_path )))} \par \end{center} ((*- endblock -*)) ((*- block data_jpg -*)) \begin{center} -\includegraphics[max size={0.7\textwidth}{0.9\textheight}]{((( output.jpeg_filename )))} +\includegraphics[max size={0.7\textwidth}{0.9\textheight}]{((( output.jpeg_filename | posix_path )))} \par \end{center} ((*- endblock -*)) ((*- block data_svg -*)) \begin{center} -\includegraphics[width=0.7\textwidth]{((( output.svg_filename )))} +\includegraphics[width=0.7\textwidth]{((( output.svg_filename | posix_path )))} \par \end{center} ((*- endblock -*)) ((*- block data_pdf -*)) \begin{center} -\includegraphics[width=0.7\textwidth]{((( output.pdf_filename )))} +\includegraphics[width=0.7\textwidth]{((( output.pdf_filename | posix_path )))} \par \end{center} ((*- endblock -*)) diff --git a/IPython/nbconvert/templates/latex/sphinx.tplx b/IPython/nbconvert/templates/latex/sphinx.tplx index 25d49df..099829e 100644 --- a/IPython/nbconvert/templates/latex/sphinx.tplx +++ b/IPython/nbconvert/templates/latex/sphinx.tplx @@ -46,7 +46,7 @@ Note: For best display, use latex syntax highlighting. =)) \def\sphinxdocclass{(((parentdocumentclass)))} % Declare the document class - \documentclass[letterpaper,10pt,english]{((( resources.sphinx.texinputs )))/sphinx(((documentclass)))} + \documentclass[letterpaper,10pt,english]{((( resources.sphinx.texinputs | posix_path )))/sphinx(((documentclass)))} % Imports \usepackage[utf8]{inputenc} @@ -55,9 +55,9 @@ Note: For best display, use latex syntax highlighting. =)) \usepackage{babel} \usepackage{times} \usepackage{import} - \usepackage[((( resources.sphinx.chapterstyle )))]{((( resources.sphinx.texinputs )))/fncychap} + \usepackage[((( resources.sphinx.chapterstyle )))]{((( resources.sphinx.texinputs | posix_path )))/fncychap} \usepackage{longtable} - \usepackage{((( resources.sphinx.texinputs )))/sphinx} + \usepackage{((( resources.sphinx.texinputs | posix_path )))/sphinx} \usepackage{multirow} \usepackage{amsmath} @@ -352,19 +352,19 @@ Note: For best display, use latex syntax highlighting. =)) % Supported image formats %============================================================================== ((*- block data_png -*)) -((( conditionally_center_output(insert_graphics(output.png_filename)) ))) +((( conditionally_center_output(insert_graphics(output.png_filename | posix_path)) ))) ((*- endblock -*)) ((*- block data_jpg -*)) -((( conditionally_center_output(insert_graphics(output.jpg_filename)) ))) +((( conditionally_center_output(insert_graphics(output.jpg_filename | posix_path)) ))) ((*- endblock -*)) ((*- block data_svg -*)) -((( conditionally_center_output(insert_graphics(output.svg_filename)) ))) +((( conditionally_center_output(insert_graphics(output.svg_filename | posix_path)) ))) ((*- endblock -*)) ((*- block data_pdf -*)) -((( conditionally_center_output(insert_graphics(output.pdf_filename)) ))) +((( conditionally_center_output(insert_graphics(output.pdf_filename | posix_path)) ))) ((*- endblock -*)) ((*- block data_latex *))