Skip to content

Commit a753d0d

Browse files
Bob Vergauwenyantar92
authored andcommitted
lisp/ox-latex: Omit empty date
* lisp/ox-latex.el: (org-latex-template): When no date is provided or the export option date is nil, the empty '\date{}' string is no longer included in the exported latex document. The default behaviour for ox-latex was to include an empty date line as '\date{}'. This empty date line can affect more complex latex templates when the date is for example set by the template on compilation, or when the date command is overwritten entirely. In this new patch, the date line is omitted from the exported document. TINYCHANGE
1 parent 2027445 commit a753d0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lisp/ox-latex.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,8 @@ holding export options."
19771977
((or author email) (format "\\author{%s}\n" (or author email)))))
19781978
;; Date.
19791979
(let ((date (and (plist-get info :with-date) (org-export-get-date info))))
1980-
(format "\\date{%s}\n" (org-export-data date info)))
1980+
(when date
1981+
(format "\\date{%s}\n" (org-export-data date info))))
19811982
;; Title and subtitle.
19821983
(let* ((subtitle (plist-get info :subtitle))
19831984
(formatted-subtitle

0 commit comments

Comments
 (0)