浏览代码

Keep BABEL meta lines in tact

* lisp/org-latex.el (org-export-latex-first-lines): Do not mark
meta lines for removal. Do not remove BABEL config lines during export
Carsten Dominik 14 年之前
父节点
当前提交
d4781b9d88
共有 1 个文件被更改,包括 10 次插入3 次删除
  1. 10 3
      lisp/org-latex.el

+ 10 - 3
lisp/org-latex.el

@@ -1221,9 +1221,16 @@ If END is non-nil, it is the end of the region."
 	    :timestamps (plist-get opt-plist :timestamps)
 	    :footnotes (plist-get opt-plist :footnotes)))
 	(org-unmodified
-	 (let ((inhibit-read-only t))
-	   (add-text-properties pt (max pt (1- end))
-				'(:org-license-to-kill t))))))))
+	 (let ((inhibit-read-only t)
+	       (limit (max pt (1- end))))
+	   (add-text-properties pt limit
+				'(:org-license-to-kill t))
+	   (save-excursion
+	     (goto-char pt)
+	     (while (re-search-forward "^[ \t]*#+.*\n?" limit t)
+	       (remove-text-properties (match-beginning 0) (match-end 0)
+				'(:org-license-to-kill t))))))))))
+	       
 
 (defvar org-export-latex-header-defs nil
   "The header definitions that might be used in the LaTeX body.")