Commits

Brian Mearns committed 4d68834

Fixed a bug in writeLatex, with the way it generated samepage/verbatim for pre-formatted text.

Comments (0)

Files changed (2)

 Rel 11 - vX.X.X.X - XXXX-XX-XX
+    [p] Fixed the samepage/verbatim for writeLatex.
 
 Rel 10 - v1.4.1.0 - 2013-05-01
     [p] Fixed a bug in generating separator dashes in the TOC and

src/tome/writeLatex.py

 
         #Formatting
         if tag == "pre":
-            ostream.write("\\begin{samepage}\\begin{verbatim}\n")
-            close = "\\end{verbatim}\\end{samepage}\n"
+            ostream.write("\\begin{samepage}\n\\begin{verbatim}\n")
+            close = "\\end{verbatim}\n\\end{samepage}\n"
             verbatim = True
         elif tag == "b":
             ostream.write("\\textbf{")
                         parPreformatted = paragraph.tag() == "pre"
 
                         if parPreformatted:
-                            buf.write("\\begin{samepage}\\begin{verbatim}\n")
+                            buf.write("\\begin{samepage}\n\\begin{verbatim}\n")
 
                         for k in xrange(len(paragraph)):
                             writeSegment(buf, paragraph[k], i==0 and j==0 and k==0 and (not parPreformatted), verbatim=parPreformatted)
 
                         if parPreformatted:
-                            buf.write("\\end{verbatim}\\end{samepage}\n")
+                            buf.write("\\end{verbatim}\n\\end{samepage}\n")
                         buf.write("\n\n")
 
                     if i < lastScene: