From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: table as parameter for latex block Date: Sun, 18 Mar 2012 08:29:03 -1000 Message-ID: References: <3F1A1157-9068-4F41-AD35-A6D926DF69F5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9Kqz-0006AB-1d for emacs-orgmode@gnu.org; Sun, 18 Mar 2012 14:29:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9Kqx-00031C-6q for emacs-orgmode@gnu.org; Sun, 18 Mar 2012 14:29:16 -0400 Received: from oproxy4-pub.bluehost.com ([69.89.21.11]:48723) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S9Kqw-000314-U9 for emacs-orgmode@gnu.org; Sun, 18 Mar 2012 14:29:15 -0400 In-Reply-To: <3F1A1157-9068-4F41-AD35-A6D926DF69F5@gmail.com> (Martin Halder's message of "Sun, 18 Mar 2012 09:40:05 +0100") 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: Martin Halder Cc: emacs-orgmode@gnu.org Martin Halder writes: > Hi all, > > 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 ? > > Thanks for help, > Martin Aloha Martin, 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. hth, Tom > > This is working: > > #+tblname: data > | Name | John Doe | > | Address | Doestreet 42 | > | Country | Doecountry | > > #+name: invoice(name=data[0,1], address=data[1,1], country=data[2,1]) > #+begin_src latex > name > address > country > #+end_src > > #+RESULTS: invoice > #+BEGIN_LaTeX > John Doe > Doestreet 42 > Doecountry > #+END_LaTeX > > what I would like to do: > > #+name: invoice(data=data) > #+begin_src latex > data[0,1] > data[1,1] > data[2,1] > #+end_src > > or even better: > > #+name: invoice(data=data) > #+begin_src latex > data['Name'] > data['Adress'] > data['Country'] > #+end_src > > > > -- Thomas S. Dye http://www.tsdye.com