From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Halder Subject: Re: table as parameter for latex block Date: Sun, 18 Mar 2012 20:10:07 +0100 Message-ID: References: <3F1A1157-9068-4F41-AD35-A6D926DF69F5@gmail.com> Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9LUv-0002Hr-Eh for emacs-orgmode@gnu.org; Sun, 18 Mar 2012 15:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9LUa-0001gi-T4 for emacs-orgmode@gnu.org; Sun, 18 Mar 2012 15:10:33 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:57756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9LUa-0001ex-KD for emacs-orgmode@gnu.org; Sun, 18 Mar 2012 15:10:12 -0400 Received: by wibhj13 with SMTP id hj13so2302840wib.12 for ; Sun, 18 Mar 2012 12:10:10 -0700 (PDT) In-Reply-To: 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org > Martin Halder writes: >=20 >> Hi all, >>=20 >> was trying to use a table as input for a latex block. Is there a way = to directly reference parts of the table inside the block or do I have = to specify each parameter as separate parameter ? >>=20 >> Thanks for help, >> Martin > Aloha Martin, >=20 > Can I ask why you want to use a table as input for a latex block? An > alternative is to send the table to a source block in some other > language and then evaluate with :results latex. The advantage is that > the other language can have loops and complex data types that make it > relatively easy to deal with tables. It might be possible to do these > kinds of things with TeX, but it is likely to be difficult. >=20 > hth, > Tom Aloha Tom, the reason was that I have a quite complex latex file in a src latex = block (which I tangle) and just wanted to replace some variables from a table. But :results latex looks very interesting, will have a look if I can = solve it with that one, many thanks for the hint. This is my use case, the example below was maybe too much simplified: #begin_src latex ... weird latex code \put(-2,-50){ \parbox{8cm}{ \tiny{mycompany - mystree - mycountry}\\ \\ \normalsize \textbf{company}\\ street\\ \textbf{country} \vspace{2mm}\\ } } ... weird latex code #end_src latex Cheers, Martin >=20 >>=20 >> This is working: >>=20 >> #+tblname: data >> | Name | John Doe | >> | Address | Doestreet 42 | >> | Country | Doecountry | >>=20 >> #+name: invoice(name=3Ddata[0,1], address=3Ddata[1,1], = country=3Ddata[2,1]) >> #+begin_src latex >> name >> address >> country >> #+end_src >>=20 >> #+RESULTS: invoice >> #+BEGIN_LaTeX >> John Doe >> Doestreet 42 >> Doecountry >> #+END_LaTeX >>=20 >> what I would like to do: >>=20 >> #+name: invoice(data=3Ddata) >> #+begin_src latex >> data[0,1] >> data[1,1] >> data[2,1] >> #+end_src >>=20 >> or even better: >>=20 >> #+name: invoice(data=3Ddata) >> #+begin_src latex >> data['Name'] >> data['Adress'] >> data['Country'] >> #+end_src >>=20 >>=20 >>=20 >>=20 >=20 > --=20 > Thomas S. Dye > http://www.tsdye.com