From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Placement=[H] not exporting to LaTeX anymore? Date: Fri, 23 Jul 2010 18:16:44 -0400 Message-ID: <12750.1279923404@alphaville.usa.hp.com> References: <11930.1279902710@gamaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=36174 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcQXv-0006sX-Tf for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 18:16:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcQXu-000637-93 for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 18:16:47 -0400 Received: from g6t0186.atlanta.hp.com ([15.193.32.63]:3761) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcQXu-000632-4J for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 18:16:46 -0400 In-Reply-To: Message from Nick Dokos of "Fri\, 23 Jul 2010 12\:31\:50 EDT." <11930.1279902710@gamaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: emacs-orgmode Nick Dokos wrote: > John Hendy wrote: >=20 > > Just to be sure I created an blank org file with only this: > >=20 > > * test > >=20 > > #+CAPTION: test table > > #+ATTR_LaTeX: placement=3D[H] > > | 1 =C2=A0 =C2=A0| 2 =C2=A0 =C2=A0| 3 =C2=A0 =C2=A0| 4 =C2=A0 =C2=A0| > > |------+------+------+------| > > | test | test | test | test | > > | test | test | test | test | > >=20 > > It gets exported to this: > >=20 > > \begin{table}[htb] > > \caption{test table} > > \begin{center} > > \begin{tabular}{llll} > >=20 > > Did something change between 6.35 and 7.01 or in the LaTeX table option= s? > >=20 >=20 > I think that placement works fine for figures, but not for tables. In > fact, I cannot find the code that's supposed to do this for tables: I > suspect that it never existed. So unless I'm mistaken, it seems that > tables never got the placement treatment that figures did. >=20 Try the following patch (might be wrong in detail, and its scope might be too limited, but I hope it's not too far off: at least it seems to work on your simple table.) It may also be white-space damaged, so some reformatting may be needed after applying it. Nick >From 4c8cdde9f3d80edc882efe83562a934fd9a6a8c8 Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Fri, 23 Jul 2010 17:54:06 -0400 Subject: [PATCH] Process latex placement attribute for tables. Figures got placement attributes previously, but tables never did. --- lisp/org-latex.el | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index f3a55ee..74af57a 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1597,7 +1597,7 @@ The conversion is made depending of STRING-BEFORE and= STRING-AFTER." (org-table-last-column-widths (copy-sequence org-table-last-column-widths)) fnum fields line lines olines gr colgropen line-fmt align - caption shortn label attr floatp longtblp) + caption shortn label attr floatp placement longtblp) (if org-export-latex-tables-verbatim (let* ((tbl (concat "\\begin{verbatim}\n" raw-table "\\end{verbatim}\n"))) @@ -1617,7 +1617,12 @@ The conversion is made depending of STRING-BEFORE an= d STRING-AFTER." align (and attr (stringp attr) (string-match "\\