diff --git a/IPython/nbconvert/templates/latex/sphinx.tplx b/IPython/nbconvert/templates/latex/sphinx.tplx
index 06b32ae..36bb164 100644
--- a/IPython/nbconvert/templates/latex/sphinx.tplx
+++ b/IPython/nbconvert/templates/latex/sphinx.tplx
@@ -232,7 +232,7 @@ Note: For best display, use latex syntax highlighting. =))
     in IPYNB file titles) do not make their way into latex.  Sometimes this
     causes latex to barf. =))
     ((*- endif -*))
-    {((( cell.source | citation2latex | markdown2latex )))}
+    {((( cell.source | replace('\n', ' ') | citation2latex | markdown2latex )))}
 ((*- endblock headingcell *))
 
 %==============================================================================