all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: Re: Reproducing a table
Date: Tue, 14 Mar 2017 12:27:58 +0200	[thread overview]
Message-ID: <87a88o17bl.fsf@iki.fi> (raw)
In-Reply-To: m2wpbspayn.fsf@christianmoe.com

Christian Moe <mail@christianmoe.com> 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	other threads:[~2017-03-14 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 17:13 Reproducing a table Jarmo Hurri
2017-03-14  7:35 ` Christian Moe
2017-03-14 10:27   ` Jarmo Hurri [this message]
2017-03-14 15:38     ` Christian Moe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a88o17bl.fsf@iki.fi \
    --to=jarmo.hurri@iki.fi \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.