Bläddra i källkod

Merge branch 'maint'

Bastien 9 år sedan
förälder
incheckning
c9872990ed
2 ändrade filer med 34 tillägg och 17 borttagningar
  1. 24 14
      doc/org.texi
  2. 10 3
      lisp/ox-latex.el

+ 24 - 14
doc/org.texi

@@ -11104,8 +11104,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.
@@ -11113,10 +11116,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)
@@ -11950,8 +11955,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.
@@ -11985,20 +11993,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.

+ 10 - 3
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.