Browse Source

org-e-beamer: Output "\date{}" when :with-date is nil

* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Output "\date{}"
  when :with-date is nil.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Make sure output
  contains "\date{}" when date is empty.
Nicolas Goaziou 5 years ago
parent
commit
b0a0511ff4
2 changed files with 6 additions and 5 deletions
  1. 3 2
      contrib/lisp/org-e-beamer.el
  2. 3 3
      contrib/lisp/org-e-latex.el

+ 3 - 2
contrib/lisp/org-e-beamer.el

@@ -860,8 +860,9 @@ holding export options."
 	     (author (format "\\author{%s}\n" author))
 	     (t "\\author{}\n")))
      ;; 6. Date.
-     (when (plist-get info :with-date)
-       (format "\\date{%s}\n" (org-export-data (plist-get info :date) info)))
+     (let ((date (and (plist-get info :with-date)
+		      (org-export-data (plist-get info :date) info))))
+       (format "\\date{%s}\n" (or date "")))
      ;; 7. Title
      (format "\\title{%s}\n" title)
      ;; 8. Hyperref options.

+ 3 - 3
contrib/lisp/org-e-latex.el

@@ -1026,9 +1026,9 @@ holding export options."
 	      (format "\\author{%s\\thanks{%s}}\n" author email))
 	     ((or author email) (format "\\author{%s}\n" (or author email)))))
      ;; Date.
-     (if (not (plist-get info :with-date)) "\\date{}\n"
-       (let ((date (org-export-data (plist-get info :date) info)))
-	 (and date (format "\\date{%s}\n" date))))
+     (let ((date (and (plist-get info :with-date)
+		      (org-export-data (plist-get info :date) info))))
+       (format "\\date{%s}\n" (or date "")))
      ;; Title
      (format "\\title{%s}\n" title)
      ;; Hyperref options.