From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel van der Boom Subject: [PATCH] Add author and title to exported PDF properties Date: Mon, 12 May 2014 23:40:10 +0200 Message-ID: <1399930810-23164-1-git-send-email-marcel@hsdev.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjxyi-0002HF-H6 for emacs-orgmode@gnu.org; Mon, 12 May 2014 17:41:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wjxyb-000630-36 for emacs-orgmode@gnu.org; Mon, 12 May 2014 17:41:44 -0400 Received: from hawking.hsdev.com ([213.125.12.142]:34174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjxya-0005xe-Tb for emacs-orgmode@gnu.org; Mon, 12 May 2014 17:41:37 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Marcel van der Boom * lisp/ox-latex.el (org-latex-template): add pdfauthor and pdftitle (org-latex-hyperref-template): add placeholders for author and title (org-latex-template): adjust default template with author and title This adds author and title to the pdf properties of the exported PDF file when using the LaTeX backend. --- lisp/ox-latex.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index cea21be..844f2cd 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -349,7 +349,7 @@ the toc:nil option, not to those generated with #+TOC keyword." :type 'string) (defcustom org-latex-hyperref-template - "\\hypersetup{\n pdfkeywords={%k},\n pdfsubject={%d},\n pdfcreator={%c}}\n" + "\\hypersetup{\n pdfkeywords={%k},\n pdfsubject={%d},\n pdfcreator={%c},\n pdfauthor={%a},\n pdftitle={%t}}" "Template for hyperref package options. Value is a format string, which can contain the following placeholders: @@ -357,6 +357,8 @@ Value is a format string, which can contain the following placeholders: %k for KEYWORDS line %d for DESCRIPTION line %c for CREATOR line + %a for AUTHOR line + %t for TITLE line Set it to the empty string to ignore the command completely." :group 'org-export-latex @@ -1216,6 +1218,8 @@ holding export options." (format-spec (plist-get info :latex-hyperref) (format-spec-make ?k (or (plist-get info :keywords) "") + ?a (or (first (plist-get info :author)) "") + ?t (or (first (plist-get info :title)) "") ?d (or (plist-get info :description)"") ?c (if (plist-get info :with-creator) (plist-get info :creator) -- 1.9.1