emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-export-latex-hyperref-options-format
@ 2014-02-17 20:41 Joe Hirn
  2014-02-17 22:13 ` org-export-latex-hyperref-options-format Nicolas Goaziou
  0 siblings, 1 reply; 34+ messages in thread
From: Joe Hirn @ 2014-02-17 20:41 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2602 bytes --]

Hello. I recently upgraded to org 8 from the builtin org (7.x) of Emacs
24.3 and lost the ability to customize the \hypersetup block via the custom
var org-export-latex-hyperref-options-format. Platform is OSX, Emacs
installed via homebrew and org-mode updated via package.el.

Org 7.x defines the var in org-latex.el. Because it's a builtin, the custom
var still displays in the 'org-latex-export group when configuring options.
However, the new export logic from ox-latex.el does not define this custom
var, nor does it respect the value if it is set. This is doubly confusing
because it appears the var is available, but it actually unused.

I found this thread from September which describes the same issue, but the
patch did not address adding the custom var back and seems to have died.
http://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg01364.html

I've created a patch via git format-patch which adds the custom var to
ox-latex.el and makes use of it. Thanks for considering it.


rom 0df51396b04bd785948032055e48b40787c15d98 Mon Sep 17 00:00:00 2001
From: Joe Hirn <joseph.hirn@gmail.com>
Date: Mon, 17 Feb 2014 14:39:35 -0600
Subject: [PATCH] add org-export-latex-hyperref-options-format custom var
back
 to latex exporter

---
 ox-latex.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/ox-latex.el b/ox-latex.el
index 19f055e..9724def 100644
--- a/ox-latex.el
+++ b/ox-latex.el
@@ -186,6 +186,17 @@
   :group 'org-export-latex
   :type '(string :tag "LaTeX class"))

+(defcustom org-export-latex-hyperref-options-format
+  "\\hypersetup{\n  pdfkeywords={%s},\n  pdfsubject={%s},\n
 pdfcreator={Emacs Org-mode version %s}}\n"
+  "A format string for hyperref options.
+When non-nil, it must contain three %s format specifications
+which will respectively be replaced by the document's keywords,
+its description and the Org's version number, as a string.  Set
+this option to the empty string if you don't want to include
+hyperref options altogether."
+  :type 'string
+  :group 'org-export-latex)
+
 (defcustom org-latex-classes
   '(("article"
      "\\documentclass[11pt]{article}"
@@ -1119,7 +1130,7 @@ 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"
+       (format org-export-latex-hyperref-options-format
        (or (plist-get info :keywords) "")
        (or (plist-get info :description) "")
        (if (not (plist-get info :with-creator)) ""
--
1.8.5.4

[-- Attachment #2: Type: text/html, Size: 3734 bytes --]

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2014-03-23 21:40 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 20:41 org-export-latex-hyperref-options-format Joe Hirn
2014-02-17 22:13 ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-17 22:59   ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-17 23:23     ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-17 23:42       ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-19 13:05         ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-19 16:21           ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-19 22:43           ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-20 10:22             ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-20 12:34               ` org-export-latex-hyperref-options-format Joseph Hirn
2014-02-20 17:58                 ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-20 20:51                   ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-20 21:52                     ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-20 22:53                       ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-21 17:28                         ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-21 18:35                           ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-22  9:39                             ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-02-22 16:42                               ` org-export-latex-hyperref-options-format Joe Hirn
2014-02-22 17:02                                 ` org-export-latex-hyperref-options-format Bastien
2014-02-24 21:51                                   ` org-export-latex-hyperref-options-format Joe Hirn
2014-03-21  8:00                                     ` org-export-latex-hyperref-options-format Bastien
2014-03-21 13:03                                       ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-03-21 13:06                                         ` org-export-latex-hyperref-options-format Bastien
2014-03-21 16:51                                           ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-21 17:11                                             ` org-export-latex-hyperref-options-format Joe Hirn
2014-03-21 17:23                                             ` org-export-latex-hyperref-options-format Nicolas Goaziou
2014-03-21 18:38                                               ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-21 21:19                                                 ` org-export-latex-hyperref-options-format Nick Dokos
2014-03-21 21:47                                                   ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-21 22:19                                                     ` org-export-latex-hyperref-options-format Charles Millar
2014-03-21 22:39                                                     ` org-export-latex-hyperref-options-format Nick Dokos
2014-03-22 18:26                                                       ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-03-23 21:39                                                         ` org-export-latex-hyperref-options-format Thomas S. Dye
2014-02-17 23:25     ` org-export-latex-hyperref-options-format Rasmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).