Browse Source

Exporting lists to LaTeX respects blank lines

* lisp/org-latex.el (org-export-latex-lists): do not add an
  unnecessary newline character after a list.
* lisp/org-list.el (org-list-bottom-point-with-indent): ensure bottom
  point is just after a non blank line.
Nicolas Goaziou 14 years ago
parent
commit
acd6126300
2 changed files with 6 additions and 2 deletions
  1. 1 1
      lisp/org-latex.el
  2. 5 1
      lisp/org-list.el

+ 1 - 1
lisp/org-latex.el

@@ -2383,7 +2383,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 			   "\n"
 			   "\n"
 			   (match-string 1 res))
 			   (match-string 1 res))
 		   t t res)))
 		   t t res)))
-      (insert res "\n"))))
+      (insert res))))
 
 
 (defconst org-latex-entities
 (defconst org-latex-entities
  '("\\!"
  '("\\!"

+ 5 - 1
lisp/org-list.el

@@ -518,7 +518,11 @@ List ending is determined by the indentation of text. See
 	      (setq ind-ref ind)
 	      (setq ind-ref ind)
 	      (forward-line 1))
 	      (forward-line 1))
 	     ((<= ind ind-ref)
 	     ((<= ind ind-ref)
-	      (throw 'exit (point-at-bol)))
+	      (throw 'exit (progn
+			     ;; Again, ensure bottom is just after a
+			     ;; non-blank line.
+			     (skip-chars-backward " \r\t\n")
+			     (min (point-max) (1+ (point-at-eol))))))
 	     ((looking-at "#\\+begin_")
 	     ((looking-at "#\\+begin_")
 	      (re-search-forward "[ \t]*#\\+end_")
 	      (re-search-forward "[ \t]*#\\+end_")
 	      (forward-line 1))
 	      (forward-line 1))