diff options
author | Bastien <bzg@gnu.org> | 2015-08-18 19:23:34 +0200 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2015-08-18 19:23:34 +0200 |
commit | 6f41105bd97c4a64272ec23493d9ae3ced4c4cbe (patch) | |
tree | ade1d11761f0e0c79a76d8da100c68a577d65ebc | |
parent | ffbf9119cd74bf380012e13b460e2863aeb00507 (diff) | |
download | org-mode-6f41105bd97c4a64272ec23493d9ae3ced4c4cbe.tar.gz |
ox-latex.el: Resurrect `org-latex-with-hyperref'
* ox-latex.el (latex): Resurrect :latex-hyperref-p.
(org-latex-with-hyperref): Resurrect.
(org-latex-template): Use :latex-hyperref-p.
* org.texi (Beamer specific export settings)
(@LaTeX{} specific export settings): Mention both
`org-latex-hyperref-template' and `org-latex-with-hyperref'.
Thanks to Scott Randby for raising this issue.
-rw-r--r-- | doc/org.texi | 38 | ||||
-rw-r--r-- | lisp/ox-latex.el | 13 |
2 files changed, 34 insertions, 17 deletions
diff --git a/doc/org.texi b/doc/org.texi index 292875f..f6168c9 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -11100,8 +11100,11 @@ settings. @item DESCRIPTION @cindex #+DESCRIPTION (Beamer) +@vindex org-latex-hyperref-template (Beamer) +@vindex org-latex-with-hyperref (Beamer) The document description. By default these are inserted as metadata using -@samp{hyperref}. Document metadata can be configured via +@samp{hyperref}. A non-@code{nil} value for @code{org-latex-with-hyperref} +will insert the document metadata, which can then be configured via @code{org-latex-hyperref-template}. Description can also be typeset as part of the front matter via @code{org-latex-title-command}. You can use several @code{#+DESCRIPTION} keywords if the description is is long. @@ -11109,10 +11112,12 @@ of the front matter via @code{org-latex-title-command}. You can use several @item KEYWORDS @cindex #+KEYWORDS (Beamer) The keywords defining the contents of the document. By default these are -inserted as metadata using @samp{hyperref}. Document metadata can be -configured via @code{org-latex-hyperref-template}. Description can also be -typeset as part of the front matter via @code{org-latex-title-command}. You -can use several @code{#+KEYWORDS} if the description is is long. +inserted as metadata using @samp{hyperref}. A non-@code{nil} value for +@code{org-latex-with-hyperref} will insert the document metadata, which can +then be configured via @code{org-latex-hyperref-template}. Description can +also be typeset as part of the front matter via +@code{org-latex-title-command}. You can use several @code{#+KEYWORDS} if the +description is is long. @item SUBTITLE @cindex #+SUBTITLE (Beamer) @@ -11946,8 +11951,11 @@ options settings described in @ref{Export settings}. @table @samp @item DESCRIPTION @cindex #+DESCRIPTION (@LaTeX{}) +@vindex org-latex-hyperref-template (@LaTeX{}) +@vindex org-latex-with-hyperref (@LaTeX{}) The document description. By default these are inserted as metadata using -@samp{hyperref}. Document metadata can be configured via +@samp{hyperref}. A non-@code{nil} value for @code{org-latex-with-hyperref} +will insert the document metadata, which can then be configured via @code{org-latex-hyperref-template}. Description can also be typeset as part of the front matter via @code{org-latex-title-command}. You can use several @code{#+DESCRIPTION} keywords if the description is is long. @@ -11981,20 +11989,22 @@ Arbitrary lines added to the preamble of the document, before the @item KEYWORDS @cindex #+KEYWORDS (@LaTeX{}) The keywords defining the contents of the document. By default these are -inserted as metadata using @samp{hyperref}. Document metadata can be -configured via @code{org-latex-hyperref-template}. Description can also be -typeset as part of the front matter via @code{org-latex-title-command}. You -can use several @code{#+KEYWORDS} if the description is is long. +inserted as metadata using @samp{hyperref}. A non-@code{nil} value for +@code{org-latex-with-hyperref} will insert the document metadata, which can +then be configured via @code{org-latex-hyperref-template}. Description can +also be typeset as part of the front matter via +@code{org-latex-title-command}. You can use several @code{#+KEYWORDS} if the +description is is long. @item SUBTITLE @cindex #+SUBTITLE (@LaTeX{}) @vindex org-latex-subtitle-separate @vindex org-latex-subtitle-format The document subtitle. This is typeset according to -@code{org-latex-subtitle-format}. If @code{org-latex-subtitle-separate} -is non-@code{nil} it is typed as part of the @samp{\title}-macro. It -can also access via @code{org-latex-hyperref-template} or typeset as -part of the front matter via @code{org-latex-title-command}. +@code{org-latex-subtitle-format}. If @code{org-latex-subtitle-separate} is +non-@code{nil}, it is typed as part of the @samp{\title}-macro. It can also +be accessed via @code{org-latex-hyperref-template} or typeset as part of the +front matter via @code{org-latex-title-command}. @end table These keywords are treated in details in the following sections. diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index ddb9649..e56b676 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -123,6 +123,7 @@ (:latex-format-drawer-function nil nil org-latex-format-drawer-function) (:latex-format-headline-function nil nil org-latex-format-headline-function) (:latex-format-inlinetask-function nil nil org-latex-format-inlinetask-function) + (:latex-hyperref-p nil "texht" org-latex-with-hyperref t) (:latex-hyperref-template nil nil org-latex-hyperref-template t) (:latex-image-default-height nil nil org-latex-image-default-height) (:latex-image-default-option nil nil org-latex-image-default-option) @@ -590,6 +591,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 `org-latex-hyperref-template' in the preamble." + :group 'org-export-latex + :type 'boolean) + (defcustom org-latex-hyperref-template "\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k}, pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n" @@ -1541,9 +1547,10 @@ holding export options." (when (and separate subtitle) (concat formatted-subtitle "\n")))) ;; Hyperref options. - (let ((template (plist-get info :latex-hyperref-template))) - (and (stringp template) - (format-spec template spec))) + (when (plist-get info :latex-hyperref-p) + (let ((template (plist-get info :latex-hyperref-template))) + (and (stringp template) + (format-spec template spec)))) ;; Document start. "\\begin{document}\n\n" ;; Title command. |