From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: Re: Reproducing a table Date: Tue, 14 Mar 2017 12:27:58 +0200 Message-ID: <87a88o17bl.fsf@iki.fi> References: <874lyxje0m.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnjgl-0008F3-Vr for emacs-orgmode@gnu.org; Tue, 14 Mar 2017 06:28:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnjgi-00021P-P4 for emacs-orgmode@gnu.org; Tue, 14 Mar 2017 06:28:24 -0400 Received: from [195.159.176.226] (port=40239 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnjgi-0001zu-JO for emacs-orgmode@gnu.org; Tue, 14 Mar 2017 06:28:20 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cnjgU-000406-9d for emacs-orgmode@gnu.org; Tue, 14 Mar 2017 11:28:06 +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" To: emacs-orgmode@gnu.org Christian Moe writes: Greetings. > You can simplify it even further to > > #+begin_src elisp :var data=my-table :hlines yes > data > #+end_src > > which is sane enough for me. > > To get simpler than that, I think you need #+INCLUDE and a separate > file. I think that would be the best approach. > I can't tell from the example why you need to define it in one place > and reproduce it in another, though, instead of just giving it a name > right where you want it to appear. The table contains a bivariate probability distribution, which I need to reproduce at multiple locations in a document, and from which I need to calculate a few things (which is why I need to pass the data part to functions). This is part of a process of fixing an old Org file which no longer exports into LaTeX PDF. In some earlier version of Org the following used to work: #+name: my-table | row 1 | 1 | 2 | | row 2 | 3 | 4 | |-------+-------+-------| | | col 1 | col 2 | #+call: my-table() :hlines yes That is, in the past the table name used to sort of define a function which could then be called to reproduce the table. But this produced errors in the current version, so I started to figure out ways to achieve the same end result. Thanks! Jarmo