Bladeren bron

LaTeX export: Skip title command when there is no title

Using "#+TITLE:" without a value make the LaTeX export ignore the
value of org-export-latex-title-command.
Carsten Dominik 16 jaren geleden
bovenliggende
commit
6677f745cc
3 gewijzigde bestanden met toevoegingen van 10 en 4 verwijderingen
  1. 5 0
      lisp/ChangeLog
  2. 4 3
      lisp/org-latex.el
  3. 1 1
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,5 +1,10 @@
 2009-07-27  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-latex.el (org-export-latex-make-header): Only insert title
+	if one is defined.
+
+	* org.el (org-make-options-regexp): Allow empty values.
+
 	* org-html.el (org-export-as-html): Move hrule detection to after
 	plain list handling.
 

+ 4 - 3
lisp/org-latex.el

@@ -940,9 +940,10 @@ OPT-PLIST is the options plist for current buffer."
      ;; beginning of the document
      "\n\\begin{document}\n\n"
      ;; insert the title command
-     (if (string-match "%s" org-export-latex-title-command)
-	 (format org-export-latex-title-command title)
-       org-export-latex-title-command)
+     (when (string-match "\\S-" title)
+       (if (string-match "%s" org-export-latex-title-command)
+	   (format org-export-latex-title-command title)
+	 org-export-latex-title-command))
      "\n\n"
      ;; table of contents
      (when (and org-export-with-toc

+ 1 - 1
lisp/org.el

@@ -16509,7 +16509,7 @@ Show the heading too, if it is currently invisible."
    (mapconcat 'regexp-quote kwds "\\|")
    (if extra (concat "\\|" extra))
    "\\):[ \t]*"
-   "\\(.+\\)"))
+   "\\(.*\\)"))
 
 ;; Make isearch reveal the necessary context
 (defun org-isearch-end ()