From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Mitchell Subject: [PATCH] Allow inclusion of author's email in LaTeX export Date: Thu, 13 Jan 2011 14:29:39 +0000 Message-ID: <1294928979-14439-1-git-send-email-wence@gmx.li> Return-path: Received: from [140.186.70.92] (port=57444 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdOBm-0007um-Rj for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 09:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdOBk-0008G2-0z for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 09:30:10 -0500 Received: from e450.epcc.ed.ac.uk ([129.215.56.230]:44384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdOBj-0008By-PK for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 09:30:07 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Lawrence Mitchell * org-latex.el (org-export-latex-make-header): Export email in author line if `org-export-email-info' is non-nil. Previously exporting to LaTeX would not include the document author's email address when org-export-email-info was set. This patch corrects this oversight using the \thanks command to add a footnote to the author line. --- lisp/org-latex.el | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 8a9f9eb..4b36273 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1276,7 +1276,9 @@ TITLE is the current title from the buffer or region. 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)))) + (plist-get opt-plist :author))) + (email (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")) @@ -1300,8 +1302,12 @@ OPT-PLIST is the options plist for current buffer." (org-export-latex-fontify-headline title)) ;; insert author info (if (plist-get opt-plist :author-info) - (format "\\author{%s}\n" - (org-export-latex-fontify-headline (or author user-full-name))) + (format "\\author{%s%s}\n" + (org-export-latex-fontify-headline (or author user-full-name)) + (if (and org-export-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 -- 1.7.4.rc1.7.g2cf08