emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Reproducing a table


From: Jarmo Hurri
Subject: Re: [O] Reproducing a table
Date: Tue, 14 Mar 2017 12:27:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Christian Moe <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]