Browse Source

LaTeX export: Only define a caption for longtable if there is one

Report by Ulf Stegemann.
Carsten Dominik 15 years ago
parent
commit
567c753f8b
2 changed files with 4 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-latex.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-12-16  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-latex.el (org-export-latex-tables): Only add a caption when
+	macro in in longtable environments if one has been defined.
+
 	* org-html.el (org-export-as-html): Only take title from buffer if
 	not exporting body-only.
 

+ 1 - 1
lisp/org-latex.el

@@ -1533,7 +1533,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
                         (if longtblp
                             (concat "\\begin{longtable}{" align "}\n")
                           (if floatp "\\begin{table}[htb]\n"))
-                        (if (or floatp longtblp)
+                        (if floatp
                             (format
                              "\\caption{%s%s}"
                              (if label (concat "\\\label{" label "}") "")