Convert underscore in email addresses.

This commit is contained in:
Bastien Guerry 2011-03-01 18:35:47 +01:00
parent 511fb10eb1
commit 87b73ad271
1 changed files with 6 additions and 5 deletions

View File

@ -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