From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: Re: [PATCH] org-e-latex: Fixes bug introduced by commit 907110e Date: Sat, 17 Nov 2012 15:32:22 +0000 Message-ID: <87vcd4b5yx.fsf@gmail.com> References: <87y5i0b6aj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZkNY-00060X-Bm for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 10:32:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZkNV-000598-9w for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 10:32:20 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:59359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZkNV-00058v-32 for emacs-orgmode@gnu.org; Sat, 17 Nov 2012 10:32:17 -0500 Received: by mail-we0-f169.google.com with SMTP id u3so1544914wey.0 for ; Sat, 17 Nov 2012 07:32:16 -0800 (PST) In-reply-to: <87y5i0b6aj.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Cc: Andreas Leha I forgot the say TINYCHANGE. Myles English writes: > Fixes bug reported to the mailing list with "[O] [BUG] centering export > of babel results". > > From e9e99b22d814c1272475f30e4bc7543cc46603f4 Mon Sep 17 00:00:00 2001 > From: Myles English > Date: Sat, 17 Nov 2012 15:18:16 +0000 > Subject: [PATCH] org-e-latex: Fixes bug introduced by commit 907110e > > * contrib/lisp/org-e-latex.el: Floating tables get a \centering > declaration, otherwise the table get wrapped in \begin{center} > and \end{center} environment. > > Thanks to Andreas Leha for reporting it. > --- > contrib/lisp/org-e-latex.el | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el > index 41513a1..d74c30a 100644 > --- a/contrib/lisp/org-e-latex.el > +++ b/contrib/lisp/org-e-latex.el > @@ -2302,20 +2302,22 @@ This function assumes TABLE has `org' as its `:type' attribute." > (if (or org-e-latex-table-caption-above (string= "" caption)) "" > (concat (org-trim caption) "\\\\\n")))) > ;; Others. > - (t (concat (when float-env > + (t (concat (if float-env > (concat > (format "\\begin{%s}%s\n" float-env placement) > - (if org-e-latex-table-caption-above caption ""))) > - (when org-e-latex-tables-centered "\\centering\n") > + (if org-e-latex-table-caption-above caption "") > + (when org-e-latex-tables-centered "\\centering\n")) > + (when org-e-latex-tables-centered "\\begin{center}\n")) > (format "\\begin{%s}%s{%s}\n%s\\end{%s}" > table-env > (if width (format "{%s}" width) "") > alignment > contents > table-env) > - (when float-env > + (if float-env > (concat (if org-e-latex-table-caption-above "" caption) > - (format "\n\\end{%s}" float-env)))))))) > + (format "\n\\end{%s}" float-env)) > + (when org-e-latex-tables-centered "\n\\end{center}"))))))) > > (defun org-e-latex-table--table.el-table (table contents info) > "Return appropriate LaTeX code for a table.el table.