]> code.delx.au - gnu-emacs/blobdiff - lisp/org/ox-beamer.el
Update copyright year to 2016
[gnu-emacs] / lisp / org / ox-beamer.el
index 2868944c957830c270cdf9c3199ae88f638821f7..4cf1e644c61be12944ab8034b124b4ea6e5761e9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ox-beamer.el --- Beamer Back-End for Org Export Engine
 
-;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten.dominik AT gmail DOT com>
 ;;         Nicolas Goaziou <n.goaziou AT gmail DOT com>
 (unless (assoc "beamer" org-latex-classes)
   (add-to-list 'org-latex-classes
               '("beamer"
-                "\\documentclass[presentation]{beamer}
-\[DEFAULT-PACKAGES]
-\[PACKAGES]
-\[EXTRA]"
+                "\\documentclass[presentation]{beamer}"
                 ("\\section{%s}" . "\\section*{%s}")
                 ("\\subsection{%s}" . "\\subsection*{%s}")
                 ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
@@ -647,11 +644,11 @@ contextual information."
                  (and (eq (org-element-type first-element) 'paragraph)
                       (org-beamer--element-has-overlay-p first-element))))
        (output (org-export-with-backend 'latex item contents info)))
-    (if (not action) output
+    (if (or (not action) (not (string-match "\\\\item" output))) output
       ;; If the item starts with a paragraph and that paragraph starts
       ;; with an export snippet specifying an overlay, insert it after
       ;; \item command.
-      (replace-regexp-in-string "\\\\item" (concat "\\\\item" action) output))))
+      (replace-match (concat "\\\\item" action) nil nil output))))
 
 
 ;;;; Keyword
@@ -690,11 +687,12 @@ used as a communication channel."
     (cond
      ((equal type "radio")
       (let ((destination (org-export-resolve-radio-link link info)))
-       (when destination
+       (if (not destination) contents
          (format "\\hyperlink%s{%s}{%s}"
                  (or (org-beamer--element-has-overlay-p link) "")
-                 (org-export-solidify-link-text path)
-                 (org-export-data (org-element-contents destination) info)))))
+                 (org-export-solidify-link-text
+                  (org-element-property :value destination))
+                 contents))))
      ((and (member type '("custom-id" "fuzzy" "id"))
           (let ((destination (if (string= type "fuzzy")
                                  (org-export-resolve-fuzzy-link link info)
@@ -1094,6 +1092,8 @@ aid, but the tag does not have any semantic meaning."
                          envs)
                  '((:endgroup))
                  '(("BMCOL" . ?|))))
+        (org-tag-persistent-alist nil)
+        (org-use-fast-tag-selection t)
         (org-fast-tag-selection-single-key t))
     (org-set-tags)
     (let ((tags (or (ignore-errors (org-get-tags-string)) "")))
@@ -1168,7 +1168,9 @@ Return output file name."
   ;; working directory and then moved to publishing directory.
   (org-publish-attachment
    plist
-   (org-latex-compile (org-publish-org-to 'beamer filename ".tex" plist))
+   (org-latex-compile
+    (org-publish-org-to
+     'beamer filename ".tex" plist (file-name-directory filename)))
    pub-dir))