From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Placement=[H] not exporting to LaTeX anymore? Date: Fri, 23 Jul 2010 10:03:18 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1186685984==" Return-path: Received: from [140.186.70.92] (port=44507 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcJmT-0006OD-7t for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 11:03:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcJmR-0002tb-Vu for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 11:03:21 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:37534) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcJmR-0002tD-Q2 for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 11:03:19 -0400 Received: by eydd26 with SMTP id d26so69885eyd.0 for ; Fri, 23 Jul 2010 08:03:19 -0700 (PDT) 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: emacs-orgmode --===============1186685984== Content-Type: multipart/alternative; boundary=0014852e6d16cb32cb048c0f55bd --0014852e6d16cb32cb048c0f55bd Content-Type: text/plain; charset=ISO-8859-1 Hi, I had a problem with floating tables/figures a ways back, found here: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg25566.html The solution, which was simply inserting #+ATTR_LATEX: placement=[H], worked perfectly. I just ran into it again, however. my org file has the following order in a section: * section text before table 1 table 1 (featuring both #+CAPTION and #+ATTR_LATEX: placement [H]) text before table 2 table 2 (featuring both #+CAPTION and #+ATTR_LATEX: placement [H]) But it's being exported to pdf like so: text before table 1 text before table 2 table 1 table 2 The exported .tex has this for table 1: \begin{table}[htb] \caption{table 1 caption} \begin{center} If I manually change the \begin{table}[htb] line to \begin{table}[H], things work exactly as I want. Somehow the [H] option just isn't making it through... Just to be sure I created an blank org file with only this: * test #+CAPTION: test table #+ATTR_LaTeX: placement=[H] | 1 | 2 | 3 | 4 | |------+------+------+------| | test | test | test | test | | test | test | test | test | It gets exported to this: \begin{table}[htb] \caption{test table} \begin{center} \begin{tabular}{llll} Did something change between 6.35 and 7.01 or in the LaTeX table options? John --0014852e6d16cb32cb048c0f55bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,


I had a problem with floating tables/= figures a ways back, found here:=A0http://www.mail-archive.com/emacs-orgmo= de@gnu.org/msg25566.html

The solution, which was simply inserting #+ATTR_LATEX: = placement=3D[H], worked perfectly.

I just ran into= it again, however. my org file has the following order in a section:

* section
text before table 1
table= 1 (featuring both #+CAPTION and #+ATTR_LATEX: placement [H])
tex= t before table 2
table 2=A0(featuring both #+CAPTION and #+ATTR_L= ATEX: placement [H])

But it's being exported to pdf like so:
text before table 1
text before table 2
tab= le 1
table 2

The exported .tex has this for table = 1:
\begin{table}[htb]
\caption{table 1 captio= n}
\begin{center}

If I manua= lly change the \begin{table}[htb] line to \begin{table}[H], things work exa= ctly as I want. Somehow the [H] option just isn't making it through...<= /div>

Just to be sure I created an blank org file with only t= his:

* test

#+CAPTIO= N: test table
#+ATTR_LaTeX: placement=3D[H]
| 1 =A0 =A0| 2 =A0 =A0| 3 =A0 = =A0| 4 =A0 =A0|
|------+------+------+------|
| test | = test | test | test |
| test | test | test | test |

=
It gets exported to this:

\begin{table}[htb]<= /div>
\caption{test table}
\begin{center}
\begin{ta= bular}{llll}

Did something change between 6.= 35 and 7.01 or in the LaTeX table options?


John
--0014852e6d16cb32cb048c0f55bd-- --===============1186685984== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1186685984==-- 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 12:31:50 -0400 Message-ID: <11930.1279902710@gamaville.dokosmarshall.org> References: 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=33675 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcLAP-00068V-LF for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 12:32:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcLAO-000805-1N for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 12:32:09 -0400 Received: from vms173013pub.verizon.net ([206.46.173.13]:56624) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcLAN-0007za-UJ for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 12:32:08 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173013.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L6000IIXR92RBA0@vms173013.mailsrvcs.net> for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 11:31:52 -0500 (CDT) In-reply-to: Message from John Hendy of "Fri\, 23 Jul 2010 10\:03\:18 CDT." 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: John Hendy Cc: nicholas.dokos@hp.com, emacs-orgmode John Hendy wrote: >=20 > I had a problem with floating tables/figures a ways back, found here:=C2= =A0http://www.mail-archive.com/emacs-orgmode@gnu.org/msg25566.html >=20 > The solution, which was simply inserting #+ATTR_LATEX: placement=3D[H], w= orked perfectly. >=20 > I just ran into it again, however. my org file has the following order in= a section: >=20 > * section > text before table 1 > table 1 (featuring both #+CAPTION and #+ATTR_LATEX: placement [H]) > text before table 2 > table 2=C2=A0(featuring both #+CAPTION and #+ATTR_LATEX: placement [H]) >=20 [Just a note for the unwary: the syntax above is not quite correct - John gives the correct syntax below in his example.] > But it's being exported to pdf like so: >=20 > text before table 1 > text before table 2 > table 1 > table 2 >=20 > The exported .tex has this for table 1: > \begin{table}[htb] > \caption{table 1 caption} > \begin{center} >=20 > If I manually change the \begin{table}[htb] line to \begin{table}[H], thi= ngs work exactly as I want. Somehow the [H] option just isn't making it > through... >=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 options? >=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. Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Placement=[H] not exporting to LaTeX anymore? Date: Fri, 23 Jul 2010 12:48:10 -0500 Message-ID: References: <11930.1279902710@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0466796935==" Return-path: Received: from [140.186.70.92] (port=39223 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcMcg-0006gl-Vd for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 14:05:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcMLz-0005q6-WE for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 13:48:14 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:54938) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcMLz-0005pq-QV for emacs-orgmode@gnu.org; Fri, 23 Jul 2010 13:48:11 -0400 Received: by vws16 with SMTP id 16so532205vws.0 for ; Fri, 23 Jul 2010 10:48:11 -0700 (PDT) In-Reply-To: <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 --===============0466796935== Content-Type: multipart/alternative; boundary=0016e646a4566acadb048c11a389 --0016e646a4566acadb048c11a389 Content-Type: text/plain; charset=ISO-8859-1 Thanks Nick. - Whoops on forgetting the = in my first example! - Is this hard to integrate? Is it possible to pass this option to LaTeX just as with figures? It only involves overriding [htb] with [H]... John On Fri, Jul 23, 2010 at 11:31 AM, Nick Dokos wrote: > John Hendy wrote: > > > > > I had a problem with floating tables/figures a ways back, found here: > http://www.mail-archive.com/emacs-orgmode@gnu.org/msg25566.html > > > > The solution, which was simply inserting #+ATTR_LATEX: placement=[H], > worked perfectly. > > > > I just ran into it again, however. my org file has the following order in > a section: > > > > * section > > text before table 1 > > table 1 (featuring both #+CAPTION and #+ATTR_LATEX: placement [H]) > > text before table 2 > > table 2 (featuring both #+CAPTION and #+ATTR_LATEX: placement [H]) > > > > [Just a note for the unwary: the syntax above is not quite correct - > John gives the correct syntax below in his example.] > > > But it's being exported to pdf like so: > > > > text before table 1 > > text before table 2 > > table 1 > > table 2 > > > > The exported .tex has this for table 1: > > \begin{table}[htb] > > \caption{table 1 caption} > > \begin{center} > > > > If I manually change the \begin{table}[htb] line to \begin{table}[H], > things work exactly as I want. Somehow the [H] option just isn't making it > > through... > > > > Just to be sure I created an blank org file with only this: > > > > * test > > > > #+CAPTION: test table > > #+ATTR_LaTeX: placement=[H] > > | 1 | 2 | 3 | 4 | > > |------+------+------+------| > > | test | test | test | test | > > | test | test | test | test | > > > > It gets exported to this: > > > > \begin{table}[htb] > > \caption{test table} > > \begin{center} > > \begin{tabular}{llll} > > > > Did something change between 6.35 and 7.01 or in the LaTeX table options? > > > > 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. > > Nick > --0016e646a4566acadb048c11a389 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Nick.

- Whoops on forgetting the =3D in my first = example!
- Is this hard to integrate? Is it possible to pass this= option to LaTeX just as with figures? It only involves overriding [htb] wi= th [H]...

John

On Fri, J= ul 23, 2010 at 11:31 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
John Hendy <jw.h= endy@gmail.com> wrote:

>
> I had a problem with floating tables/figures a ways back, found here:= =A0http://www.mail-archive.com/emacs-orgmode@gnu.org/msg= 25566.html
>
> The solution, which was simply inserting #+ATTR_LATEX: placement=3D[H]= , worked perfectly.
>
> I just ran into it again, however. my org file has the following order= in a section:
>
> * section
> text before table 1
> table 1 (featuring both #+CAPTION and #+ATTR_LATEX: placement [H])
> text before table 2
> table 2=A0(featuring both #+CAPTION and #+ATTR_LATEX: placement [H]) >

[Just a note for the unwary: the syntax above is not quite correct -<= br> John gives the correct syntax below in his example.]

> But it's being exported to pdf like so:
>
> text before table 1
> text before table 2
> table 1
> table 2
>
> The exported .tex has this for table 1:
> \begin{table}[htb]
> \caption{table 1 caption}
> \begin{center}
>
> If I manually change the \begin{table}[htb] line to \begin{table}[H], = things work exactly as I want. Somehow the [H] option just isn't making= it
> through...
>
> Just to be sure I created an blank org file with only this:
>
> * test
>
> #+CAPTION: test table
> #+ATTR_LaTeX: placement=3D[H]
> | 1 =A0 =A0| 2 =A0 =A0| 3 =A0 =A0| 4 =A0 =A0|
> |------+------+------+------|
> | test | test | test | test |
> | test | test | test | test |
>
> It gets exported to this:
>
> \begin{table}[htb]
> \caption{test table}
> \begin{center}
> \begin{tabular}{llll}
>
> Did something change between 6.35 and 7.01 or in the LaTeX table optio= ns?
>

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.

Nick

--0016e646a4566acadb048c11a389-- --===============0466796935== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0466796935==-- 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 "\\ Subject: Patchwork: Patch 167 Accepted Date: Sat, 31 Jul 2010 11:17:08 +0200 (CEST) Message-ID: <20100731091708.3033F4045A@myhost.localdomain> References: <12750.1279923404@alphaville.usa.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=35145 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Of8Br-0003YA-UN for emacs-orgmode@gnu.org; Sat, 31 Jul 2010 05:17:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Of8Bq-0001xh-NW for emacs-orgmode@gnu.org; Sat, 31 Jul 2010 05:17:11 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:58772) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Of8Bq-0001xY-II for emacs-orgmode@gnu.org; Sat, 31 Jul 2010 05:17:10 -0400 Received: by wyg36 with SMTP id 36so2096191wyg.0 for ; Sat, 31 Jul 2010 02:17:09 -0700 (PDT) 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: emacs-orgmode@gnu.org Patch 167 (http://patchwork.newartisans.com/patch/167/) is now Accepted. This relates to the following submission: http://mid.gmane.org/%3C12750.1279923404%40alphaville.usa.hp.com%3E