From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kim Toms Subject: Re: Table equations: II on lhs Date: Tue, 2 Feb 2010 09:08:30 -0500 Message-ID: <1513b3111002020608ibead51djafee6409c5c419a6@mail.gmail.com> References: <1513b3111002010908l10a2fe09y34370a2cac29b371@mail.gmail.com> <20100201185821.GI18633@thinkpad.adamsinfoserv.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0127430657==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcJQi-0005ef-3G for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:08:36 -0500 Received: from [199.232.76.173] (port=49921 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcJQh-0005eX-AI for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:08:35 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcJQf-0000pK-Ic for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:08:34 -0500 Received: from mail-bw0-f215.google.com ([209.85.218.215]:53994) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NcJQf-0000os-2M for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:08:33 -0500 Received: by bwz7 with SMTP id 7so70779bwz.26 for ; Tue, 02 Feb 2010 06:08:32 -0800 (PST) In-Reply-To: <20100201185821.GI18633@thinkpad.adamsinfoserv.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0127430657== Content-Type: multipart/alternative; boundary=00032555a2de077db6047e9ea375 --00032555a2de077db6047e9ea375 Content-Type: text/plain; charset=ISO-8859-1 Hm. I hadn't noticed that; thanks! On Mon, Feb 1, 2010 at 1:58 PM, Russell Adams wrote: > On Mon, Feb 01, 2010 at 12:08:20PM -0500, Kim Toms wrote: > > I am using a simple table to add up some estimates for tasks. On the > left > > hand side of the equations in the TBLFM line I can't get an expression > like > > @II$2 to work. > > > > Here's an example > > | task | estimate | probable | > > |-------+----------+----------| > > | one | 12 | 2 | > > | two | 10 | 3 | > > |-------+----------+----------| > > | total | 22 | 5 | > > #+TBLFM: @4$2=vsum(@I..@II-1)::@4$3=vsum(@I..@II-1) > > > > I'd like to be able to put @II$2 on the LHS of the equation. That way, > when > > I add a row to the table, the equation doesn't have to change. > > > > A workaround for the above table is to use $LR2 and $LR3 instead of the > more > > general references. > > I do this fairly often. Just use enter to add a row in the table, the > references are automatically updated. Now, if you copy and paste it > won't work. > > I just tried your example with the LR, and that worked fine for me. > > |-------+----------+----------| > | task | estimate | probable | > |-------+----------+----------| > | one | 12 | 2 | > | two | 10 | 3 | > | three | 8 | 8 | > | three | 8 | 8 | > | three | 8 | 8 | > | three | 8 | 8 | > |-------+----------+----------| > | total | 54 | 37 | > |-------+----------+----------| > #+TBLFM: $LR2=vsum(@-I..@-II)::$LR3=vsum(@-I..@-II) > > This isn't copy/paste sensitive at all. > > Does that answer your question? > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --00032555a2de077db6047e9ea375 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hm. =A0I hadn't noticed that; thanks!

On Mon, Feb 1, 2010 at 1:58 PM, Russell Adams <RLAdams@adamsinfoserv.com> wrote:
On Mon, F= eb 01, 2010 at 12:08:20PM -0500, Kim Toms wrote:
> I am using a simple table to add up some estimates for tasks. =A0On th= e left
> hand side of the equations in the TBLFM line I can't get an expres= sion like
> @II$2 to work.
>
> Here's an example
> | task =A0| estimate | probable |
> |-------+----------+----------|
> | one =A0 | =A0 =A0 =A0 12 | =A0 =A0 =A0 =A02 |
> | two =A0 | =A0 =A0 =A0 10 | =A0 =A0 =A0 =A03 |
> |-------+----------+----------|
> | total | =A0 =A0 =A0 22 | =A0 =A0 =A0 =A05 |
> #+TBLFM: @4$2=3Dvsum(@I..@II-1)::@4$3=3Dvsum(@I..@II-1)
>
> I'd like to be able to put @II$2 on the LHS of the equation. =A0Th= at way, when
> I add a row to the table, the equation doesn't have to change.
>
> A workaround for the above table is to use $LR2 and $LR3 instead of th= e more
> general references.

I do this fairly often. Just use enter to add a row in the tabl= e, the
references are automatically updated. Now, if you copy and paste it
won't work.

I just tried your example with the LR, and that worked fine for me.

|-------+----------+----------|
| task =A0| estimate | probable |
|-------+----------+----------|
| one =A0 | =A0 =A0 =A0 12 | =A0 =A0 =A0 =A02 |
| two =A0 | =A0 =A0 =A0 10 | =A0 =A0 =A0 =A03 |
| three | =A0 =A0 =A0 =A08 | =A0 =A0 =A0 =A08 |
| three | =A0 =A0 =A0 =A08 | =A0 =A0 =A0 =A08 |
| three | =A0 =A0 =A0 =A08 | =A0 =A0 =A0 =A08 |
| three | =A0 =A0 =A0 =A08 | =A0 =A0 =A0 =A08 |
|-------+----------+----------|
| total | =A0 =A0 =A0 54 | =A0 =A0 =A0 37 |
|-------+----------+----------|
#+TBLFM: $LR2=3Dvsum(@-I..@-II)::$LR3=3Dvsum(@-I..@-II)

This isn't copy/paste sensitive at all.

Does that answer your question?

------------------------------------------------------------------
Russell Adams =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0RLAdam= s@AdamsInfoServ.com

PGP Key ID: =A0 =A0 0x1160DCB3 =A0 =A0 =A0 =A0 =A0 http://www.adamsinfoserv.com/

Fingerprint: =A0 =A01723 D8CA 4280 1EC9 557F =A066E8 1154 E018 1160 DCB3

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--00032555a2de077db6047e9ea375-- --===============0127430657== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0127430657==--