From 8d8417387341d0eb88e1cc961860754e80d3086f Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 22 Oct 2011 11:05:28 +0200 Subject: [PATCH] org-latex.el (org-export-latex-make-header): Add some hyperref options. * org-latex.el (org-export-latex-make-header): Add some hyperref options. Thanks to Mikhail Titov for a preliminary version of this patch. --- lisp/org-latex.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 63b3cf038..a6f408da3 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1399,7 +1399,11 @@ OPT-PLIST is the options plist for current buffer." (email (replace-regexp-in-string "_" "\\\\_" (org-export-apply-macros-in-string - (plist-get opt-plist :email))))) + (plist-get opt-plist :email)))) + (description (org-export-apply-macros-in-string + (plist-get opt-plist :description))) + (keywords (org-export-apply-macros-in-string + (plist-get opt-plist :keywords)))) (concat (if (plist-get opt-plist :time-stamp-file) (format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) @@ -1433,6 +1437,12 @@ OPT-PLIST is the options plist for current buffer." (format-time-string (or (plist-get opt-plist :date) org-export-latex-date-format))) + ;; add some hyperref options + ;; FIXME: let's have a defcustom for this? + (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n" + (org-export-latex-fontify-headline keywords) + (org-export-latex-fontify-headline description) + (concat "Emacs Org-mode version " org-version)) ;; beginning of the document "\n\\begin{document}\n\n" ;; insert the title command -- 2.11.4.GIT