From mboxrd@z Thu Jan 1 00:00:00 1970 From: Niels Giesen Subject: Re: [PATCH] customize latex table export Date: Fri, 2 Dec 2011 10:59:05 +0100 Message-ID: References: <87r57uyim9.fsf@cantab.net> <093BD03D-0067-44CD-BBCE-81A5D7B9FACC@gmail.com> <87fwh6escl.fsf@cantab.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3074b882fcde3c04b319047c Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWPtd-0002Ik-6Q for emacs-orgmode@gnu.org; Fri, 02 Dec 2011 04:59:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWPtb-0008LO-Oq for emacs-orgmode@gnu.org; Fri, 02 Dec 2011 04:59:09 -0500 Received: from mail-qw0-f41.google.com ([209.85.216.41]:45978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWPtb-0008L8-K0 for emacs-orgmode@gnu.org; Fri, 02 Dec 2011 04:59:07 -0500 Received: by qabg14 with SMTP id g14so319554qab.0 for ; Fri, 02 Dec 2011 01:59:07 -0800 (PST) In-Reply-To: <87fwh6escl.fsf@cantab.net> 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: Christophe Rhodes Cc: emacs-orgmode@gnu.org --20cf3074b882fcde3c04b319047c Content-Type: text/plain; charset=UTF-8 Hi Christophe, Could you provide us with a minimal example of how this new functionality can be used? I am trying to test it and see if there are any conflicts with my patch of late to supports the booktabs package @ http://patchwork.newartisans.com/patch/1016/ (aside from one of the two patches not applying without some minor human intervention around line 1998). Besides that, it would in general be good to have an example for documentation purposes. On Tue, Nov 29, 2011 at 6:44 PM, Christophe Rhodes wrote: > Carsten Dominik writes, a long time ago: > > > On May 19, 2011, at 2:34 PM, Christophe Rhodes wrote: > > > >> To produce documents in something approaching my organization's house > >> style, I need to be able to style the headers of tables. It's nice that > >> orgtbl has the functionality for this, but the call to orgtbl-to-latex > >> has a hard-coded list of parameters with no possibility for extension. > >> With the attached patch, I am able to put e.g. > >> > >> #+BIND: org-export-latex-tables-orgtbl-extra-parameters (:hfmt > "\\multicolumn{1}{c}{\\bf\\color{white}\\cellcolor{blue}%s}") > >> > >> in the header of my document, and tables throughout the document all > >> pick up this style. > >> > >> I daresay that this is not the optimal way of doing things; while this > >> solves my immediate problem there is likely to be a more general way of > >> doing things. > > > > would it be better to be able to set these parameters on a per-table > basis with ATTR_LaTeX ? > > Would you like to try to prepare a patch to this effect? > > Find attached a patch to this effect. It is the combination of two > changes which I consider tiny: one is the support for hfmt itself as an > ATTR_LaTeX attribute; the other is the consolidation of the > word-matching on the attributes into local macros, which I needed > because my use case (as above) includes the string "multicolumn", which > was otherwise confusing the attribute parser into thinking that I needed > a table* LaTeX environment. > > Please let me know if this suits better. > > > > Christophe > > -- http://pft.github.com --20cf3074b882fcde3c04b319047c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Christophe,

Could you provide us with a minimal examp= le of how this new functionality can be used?=C2=A0

I am trying to test it and see if there are any conflicts with my patch o= f late to supports the booktabs package @=C2=A0http://patchwork.newartisans.com/patch/1016/=C2=A0=C2=A0(aside from one of the two patches not applying without some = minor human intervention around line 1998).

Besides that, it would in general be good to have an ex= ample for documentation purposes.=C2=A0

On Tue, Nov 29, 2011 at 6:44 PM, Christophe Rhodes = <csr21@cantab.net> wro= te:
Carsten Dominik <carsten.dominik@gmail.com> writes, a long time= ago:

> On May 19, 2011, at 2:34 PM, Christophe Rhodes wrote:
>
>> To produce documents in something approaching my organization'= s house
>> style, I need to be able to style the headers of tables. =C2=A0It&= #39;s nice that
>> orgtbl has the functionality for this, but the call to orgtbl-to-l= atex
>> has a hard-coded list of parameters with no possibility for extens= ion.
>> With the attached patch, I am able to put e.g.
>>
>> #+BIND: org-export-latex-tables-orgtbl-extra-parameters (:hfmt &qu= ot;\\multicolumn{1}{c}{\\bf\\color{white}\\cellcolor{blue}%s}")
>>
>> in the header of my document, and tables throughout the document a= ll
>> pick up this style.
>>
>> I daresay that this is not the optimal way of doing things; while = this
>> solves my immediate problem there is likely to be a more general w= ay of
>> doing things.
>
> would it be better to be able to set these parameters on a per-table b= asis with ATTR_LaTeX ?
> Would you like to try to prepare a patch to this effect?

Find attached a patch to this effect. =C2=A0It is the combination of two changes which I consider tiny: one is the support for hfmt itself as an
ATTR_LaTeX attribute; the other is the consolidation of the
word-matching on the attributes into local macros, which I needed
because my use case (as above) includes the string "multicolumn",= which
was otherwise confusing the attribute parser into thinking that I needed a table* LaTeX environment.

Please let me know if this suits better.



Christophe




--
http://pft.github.com
--20cf3074b882fcde3c04b319047c--