فهرست منبع

LaTeX export: Fix bug with empty lines in VERSE environment

Carsten Dominik 15 سال پیش
والد
کامیت
201517106c
2فایلهای تغییر یافته به همراه8 افزوده شده و 3 حذف شده
  1. 3 0
      lisp/ChangeLog
  2. 5 3
      lisp/org-latex.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-09-28  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-latex.el (org-export-latex-preprocess): Deal properly with
+	empty lines in verse environments.
+
 	* org.el (org-format-latex-header): Inline fullpage.sty.
 
 	* org-footnote.el (org-footnote-create-definition): Reveal context

+ 5 - 3
lisp/org-latex.el

@@ -1661,9 +1661,11 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 	 (org-export-latex-protect-string
 	  (concat "\\hspace*{1cm}" (match-string 2))) t t)
 	(beginning-of-line 1))
-      (unless (looking-at ".*?[^ \t\n].*?\\\\\\\\[ \t]*$")
-	(end-of-line 1)
-	(insert "\\\\"))
+      (if (looking-at "[ \t]*$")
+	  (insert "\\vspace*{1em}")
+	(unless (looking-at ".*?[^ \t\n].*?\\\\\\\\[ \t]*$")
+	  (end-of-line 1)
+	  (insert "\\\\")))
       (beginning-of-line 2))
     (and (looking-at "[ \t]*ORG-VERSE-END.*")
 	 (org-replace-match-keep-properties "\\end{verse}" t t)))