Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Created May 12, 2014 20:47
Show Gist options
  • Save mrvdb/ae611e83ca48ee8d08f2 to your computer and use it in GitHub Desktop.
Save mrvdb/ae611e83ca48ee8d08f2 to your computer and use it in GitHub Desktop.
Modified lisp/ox-latex.el
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment