emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Klein <roklein@roklein.de>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-table: decimal numbers with a dot at the end: for example 10.
Date: Wed, 24 Jun 2015 11:34:59 +0200	[thread overview]
Message-ID: <20150624113459.5113a343@pckr150.mpip-mainz.mpg.de> (raw)
In-Reply-To: <87bng5wm5o.fsf@mat.ucm.es>

Hello,

On Wed, 24 Jun 2015 10:22:43 +0200
Uwe Brauer <oub@mat.ucm.es> wrote:

> 
> Hello 
> 
> Take the following example 
> 
> | Apellido | Nombre |  E1 |  E2 | E3 |  E4 |  E5 |  E6 | E7 | E8 |
> E9 | E10 | E11 | Res |
> |----------+--------+-----+-----+----+-----+-----+-----+----+----+-----+-----+-----+-----|
> | Brauer   |        | 1.5 | 0.5 |  1 | 0.5 | 0.5 | 0.5 |  1 |  1 |
> 0.5 |   1 |   2 | 10. | #+TBLFM:
> $14=$3+$4+$5+$6+$7+$8+$9+$10+$11+$12+$13
> 
> 
> The result is 10.
> 
> Instead of 10
> 
> How can I get rid of the «.» at the end of the number?

you can put a format in the tblfm line, e.g.:

#+TBLFM: $14=$3+$4+$5+$6+$7+$8+$9+$10+$11+$12+$13;%.0f

However, this cuts any numbers at the dot, that is a 10.5 would be
displayed as 10.

If you can live with a 10.0  use %.1f instead of %.0f after the
semicolon.

Best regards
Robert

  reply	other threads:[~2015-06-24  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24  8:22 org-table: decimal numbers with a dot at the end: for example 10 Uwe Brauer
2015-06-24  9:34 ` Robert Klein [this message]
2015-06-24 10:06   ` Uwe Brauer
2015-06-24 10:08     ` Robert Klein
2015-06-24 10:11       ` Uwe Brauer

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=20150624113459.5113a343@pckr150.mpip-mainz.mpg.de \
    --to=roklein@roklein.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=oub@mat.ucm.es \
    /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).