emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Guido Van Hoecke <guivho@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Using constants in columns
Date: Sat, 17 Oct 2015 20:00:40 +0200	[thread overview]
Message-ID: <CALn3zoiU72hkoGQUv_tX_4or__1O6gOKjtdGGadHh4UGWWRYqA@mail.gmail.com> (raw)
In-Reply-To: <CAEySM9GUgrDz-_VnaXJ7ZZ_nu7JTMHWgdtWgTK3mv4_LE0mUmw@mail.gmail.com>

Hi Guido

On Sat, Oct 17, 2015 at 1:47 PM, Guido Van Hoecke <guivho@gmail.com> wrote:
> I have not found a way to specify the vector in a constant.

You can access the elements of the vector constant suggested by Eric
with Calc's subscript function:

#+CONSTANTS: vat=[1.15,1.21,1.40]

| Amount | VAT |  Total |
|--------+-----+--------|
|    100 |   1 | 115.00 |
|    100 |   2 | 121.00 |
#+TBLFM: $3 = $1 * subscr($vat, $2); %.2f

Michael

  reply	other threads:[~2015-10-17 18:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 12:39 Using constants in columns Guido Van Hoecke
2015-10-16 13:48 ` Eric S Fraga
2015-10-16 14:38   ` Guido Van Hoecke
2015-10-16 14:59     ` Eric S Fraga
2015-10-17 11:47       ` Guido Van Hoecke
2015-10-17 18:00         ` Michael Brand [this message]
2015-10-17 20:27           ` Guido Van Hoecke
2015-10-19  6:12             ` Eric S Fraga
2015-10-19  7:13               ` Guido Van Hoecke

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=CALn3zoiU72hkoGQUv_tX_4or__1O6gOKjtdGGadHh4UGWWRYqA@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=guivho@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).