From mboxrd@z Thu Jan 1 00:00:00 1970 From: AW Subject: Re: Format a whole column using ";%.2f" in orgtbl? Date: Thu, 21 Jun 2012 12:15:26 +0200 Message-ID: <3465224.sPDMcBHj5z@linux-nyil.site> References: <30475045.6Ox6BBrYdW@linux-nyil.site> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SheQJ-0001nG-NZ for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 06:15:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SheQH-0002Zf-9c for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 06:15:35 -0400 Received: from mailout04.t-online.de ([194.25.134.18]:40648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SheQH-0002Yd-2D for emacs-orgmode@gnu.org; Thu, 21 Jun 2012 06:15:33 -0400 In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Michael Brand Am Freitag, 15. Juni 2012, 19:01:35 schrieb Michael Brand: > Hi Alexander > > On Fri, Jun 15, 2012 at 4:34 PM, AW wrote: > > [...] > > > > Desired outoput: > > | 100.00 | Value | > > | 150.00 | Value | > > > > #+TBLFM: $1=%s;%.2f > > > > [...] > > What you tried would be > > | 100.00 | Value | > | 150.00 | Value | > > #+TBLFM: $1=$0;%.2f > > $0 is the current table field. What I recommend is > > | 100.00 | Value | > | 150.00 | Value | > > #+TBLFM: $1 = $0 +.0; f-2 > > because of the behavior I explained in the tables shown here: > http://orgmode.org/worg/org-faq.html#table-float-fraction > > Michael O.K., thank you very much for your help. This is a nice trick! Unfortunately, my tables have other formulas than only one: | Values | Desc. | |--------+-------| | 100.00 | Value | | 150.00 | Value | | 250. | sum | |--------+-------| | 500. | End | #+TBLFM: @4$1=@2$1+@3$1::@5$1=vsum(@I..@II)::$1=$0 +.0; f-2 I get at least every number in column 1 with a dot, but without ".00", as needed: *Do I have to ad '; f-2' to every formula?* And besides that, I've never seen this description "f-2". Is it explained somewhere for non-mathematicians? You know, if there are differences between this and ";%.2f", I should better be aware of them. Regards Alexander