diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-03-01 10:42:59 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-03-01 10:42:59 -0700 |
commit | 9652e5f64ede0167c4bbd2b6a22c2ca6706a087d (patch) | |
tree | 74b2e4395870dfdf8a6813abd62167b699188d63 | |
parent | cfb06bc70b1c886e9cf12bcd5dac6fadc89f4066 (diff) | |
parent | 87b73ad2711b72cd36327058f47e501c1e525083 (diff) | |
download | org-mode-9652e5f64ede0167c4bbd2b6a22c2ca6706a087d.tar.gz |
Merge branch 'master' of orgmode.org:org-mode
-rw-r--r-- | lisp/org-exp.el | 22 | ||||
-rw-r--r-- | lisp/org-latex.el | 11 |
2 files changed, 11 insertions, 22 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 964e18e..f950183 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1197,23 +1197,11 @@ on this string to produce the exported version." ;; Another hook (run-hooks 'org-export-preprocess-before-backend-specifics-hook) - ;; LaTeX-specific preprocessing - (when (eq backend 'latex) - (require 'org-latex nil) - (org-export-latex-preprocess parameters)) - - ;; ASCII-specific preprocessing - (when (eq backend 'ascii) - (org-export-ascii-preprocess parameters)) - - ;; HTML-specific preprocessing - (when (eq backend 'html) - (org-export-html-preprocess parameters)) - - ;; DocBook-specific preprocessing - (when (eq backend 'docbook) - (require 'org-docbook nil) - (org-export-docbook-preprocess parameters)) + ;; Backend-specific preprocessing + (let* ((backend-name (symbol-name backend)) + (f (intern (format "org-export-%s-preprocess" backend-name)))) + (require (intern (concat "org-" backend-name)) nil) + (funcall f parameters)) ;; Remove or replace comments (org-export-handle-comments (plist-get parameters :comments)) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index d9e0e3f..19baa40 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1334,8 +1334,10 @@ OPT-PLIST is the options plist for current buffer." (let ((toc (plist-get opt-plist :table-of-contents)) (author (org-export-apply-macros-in-string (plist-get opt-plist :author))) - (email (org-export-apply-macros-in-string - (plist-get opt-plist :email)))) + (email (replace-regexp-in-string + "_" "\\\\_" + (org-export-apply-macros-in-string + (plist-get opt-plist :email))))) (concat (if (plist-get opt-plist :time-stamp-file) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) @@ -1361,11 +1363,10 @@ OPT-PLIST is the options plist for current buffer." (if (plist-get opt-plist :author-info) (format "\\author{%s%s}\n" (org-export-latex-fontify-headline (or author user-full-name)) - (org-export-latex-fontify-headline - (if (and (plist-get opt-plist :email-info) email + (if (and (plist-get opt-plist :email-info) email (string-match "\\S-" email)) (format "\\thanks{%s}" email) - ""))) + "")) (format "%%\\author{%s}\n" (org-export-latex-fontify-headline (or author user-full-name)))) ;; insert the date |