Hi Nicholas.
I was able to test this on my local machine and it seems to work as we discussed.
If there are any other changes to the patch you'd like to see, please let me know.
Thanks for your help. I really appreciate it.
****************BEGIN PATCH**********************
diff --git a/ox-latex.el b/ox-latex.el
index 19f055e..9ed6372 100644
--- a/ox-latex.el
+++ b/ox-latex.el
@@ -103,7 +103,7 @@
(:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
(:latex-header "LATEX_HEADER" nil nil newline)
(:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
- (:latex-hyperref-p nil "texht" org-latex-with-hyperref t)
+ (:latex-hyperref-p nil "texht" (if org-latex-hyperref-template t) t)
;; Redefine regular options.
(:date "DATE" nil "\\today" t)))
@@ -341,10 +341,11 @@ the toc:nil option, not to those generated with #+TOC keyword."
:group 'org-export-latex
:type 'string)
-(defcustom org-latex-with-hyperref t
- "Toggle insertion of \\hypersetup{...} in the preamble."
+
+(defcustom org-latex-hyperref-template "\\hypersetup{\n pdfkeywords={%k},\n pdfsubject={%d},\n pdfcreator={%c}}\n"
+ "The value of \\hyperrefsetup{...} in the preamble. String is a format-spec which accepts keywords for %k (pdfkeywords), %d (pdfdescription) and %c (pdfcreator). Set to nil for no \\hyperrefsetup."
:group 'org-export-latex
- :type 'boolean)
+ :type 'string)
;;;; Headline
@@ -1119,11 +1120,13 @@ holding export options."
(format "\\title{%s}\n" title)
;; Hyperref options.
(when (plist-get info :latex-hyperref-p)
- (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n"
- (or (plist-get info :keywords) "")
- (or (plist-get info :description) "")
- (if (not (plist-get info :with-creator)) ""
- (plist-get info :creator))))
+ (format-spec org-latex-hyperref-template
+ (format-spec-make
+ ?k (or (plist-get info :keywords) "")
+ ?d (or (plist-get info :description)"")
+ ?c (if (plist-get info :with-creator)
+ (plist-get info :creator)
+ ""))))
;; Document start.
"\\begin{document}\n\n"
;; Title command.
****************END PATCH**********************