From 8063ecb79d398f3a10cebf0064d88ff9a9c3c4cb 2013-09-06 23:01:24
From: Min RK <benjaminrk@gmail.com>
Date: 2013-09-06 23:01:24
Subject: [PATCH] Merge pull request #4181 from jdfreder/crlf

nbconvert: sphinx template not removing new lines from headers
---

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 *))
 
 %==============================================================================