From 567c753f8bae77d3c572da3851aa76b4c13c6fa4 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 16 Dec 2009 20:25:20 +0100 Subject: [PATCH] LaTeX export: Only define a caption for longtable if there is one Report by Ulf Stegemann. --- lisp/ChangeLog | 3 +++ lisp/org-latex.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dad1c3e8e..1462bd9e2 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-12-16 Carsten Dominik + * 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. diff --git a/lisp/org-latex.el b/lisp/org-latex.el index e481ccd21..9bd9f3777 100644 --- a/lisp/org-latex.el +++ b/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 "}") "")