Browse Source

LaTeX export: Preprocess TEXT properly

Carsten Dominik 15 years ago
parent
commit
fc96f63056
2 changed files with 21 additions and 0 deletions
  1. 4 0
      lisp/ChangeLog
  2. 17 0
      lisp/org-latex.el

+ 4 - 0
lisp/ChangeLog

@@ -1,3 +1,7 @@
+2009-12-18  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-latex.el (org-export-as-latex): Preprocess TEXT as well.
+
 2009-12-17  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-latex.el (org-export-latex-tables): No forced line end if

+ 17 - 0
lisp/org-latex.el

@@ -639,6 +639,23 @@ when PUB-DIR is set, use this as the publishing directory."
 	 (region (buffer-substring
 		  (if region-p (region-beginning) (point-min))
 		  (if region-p (region-end) (point-max))))
+	 (text
+	  (org-export-preprocess-string
+	   text
+	   :emph-multiline t
+	   :for-LaTeX t
+	   :comments nil
+	   :tags (plist-get opt-plist :tags)
+	   :priority (plist-get opt-plist :priority)
+	   :footnotes (plist-get opt-plist :footnotes)
+	   :drawers (plist-get opt-plist :drawers)
+	   :timestamps (plist-get opt-plist :timestamps)
+	   :todo-keywords (plist-get opt-plist :todo-keywords)
+	   :add-text nil
+	   :skip-before-1st-heading skip
+	   :select-tags nil
+	   :exclude-tags nil
+	   :LaTeX-fragments nil))
 	 (string-for-export
 	  (org-export-preprocess-string
 	   region