Browse Source

LaTeX export: No additional white lines around examples

Empty lines create paragraphs in LaTeX.

Patch by Nicolas Girad
Carsten Dominik 15 years ago
parent
commit
f9f13be88c
2 changed files with 5 additions and 2 deletions
  1. 3 0
      lisp/ChangeLog
  2. 2 2
      lisp/org-exp.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-12-03  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp.el (org-export-format-source-code-or-example): Avoid
+	additional extra white lines in LaTeX.
+
 	* org-list.el (org-list-parse-list): Leave empty lines after the
 	list, don't consider them as part of the list.
 

+ 2 - 2
lisp/org-exp.el

@@ -2403,7 +2403,7 @@ INDENT was the original indentation of the block."
 	      (concat "\n#+BEGIN_HTML\n" (org-add-props rtn '(org-protected t)) "\n#+END_HTML\n\n"))
 	     ((eq backend 'latex)
 	      (setq rtn (org-export-number-lines rtn 'latex 0 0 num cont rpllbl fmt))
-	      (concat "\n#+BEGIN_LaTeX\n"
+	      (concat "#+BEGIN_LaTeX\n"
 		      (org-add-props
                           (if org-export-latex-listings
                               (concat
@@ -2423,7 +2423,7 @@ INDENT was the original indentation of the block."
                             (concat (car org-export-latex-verbatim-wrap)
                                     rtn (cdr org-export-latex-verbatim-wrap)))
 			  '(org-protected t))
-		      "#+END_LaTeX\n\n"))
+		      "#+END_LaTeX\n"))
 	     ((eq backend 'ascii)
 	      ;; This is not HTML or LaTeX, so just make it an example.
 	      (setq rtn (org-export-number-lines rtn 'ascii 0 0 num cont rpllbl fmt))