emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-table: decimal numbers with a dot at the end: for example 10.
@ 2015-06-24  8:22 Uwe Brauer
  2015-06-24  9:34 ` Robert Klein
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2015-06-24  8:22 UTC (permalink / raw)
  To: emacs-orgmode


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?

thanks

Uwe Brauer 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: decimal numbers with a dot at the end: for example 10.
  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
  2015-06-24 10:06   ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Klein @ 2015-06-24  9:34 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: decimal numbers with a dot at the end: for example 10.
  2015-06-24  9:34 ` Robert Klein
@ 2015-06-24 10:06   ` Uwe Brauer
  2015-06-24 10:08     ` Robert Klein
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2015-06-24 10:06 UTC (permalink / raw)
  To: emacs-orgmode


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


   > 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.

I think I can live with 10.00 and then later make a query-replace of .00

Thanks!

Uwe 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: decimal numbers with a dot at the end: for example 10.
  2015-06-24 10:06   ` Uwe Brauer
@ 2015-06-24 10:08     ` Robert Klein
  2015-06-24 10:11       ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Klein @ 2015-06-24 10:08 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

Hello,

On Wed, 24 Jun 2015 12:06:14 +0200
Uwe Brauer <oub@mat.ucm.es> wrote:

> 
> Hi
>    > Hello,
>    > On Wed, 24 Jun 2015 10:22:43 +0200
>    > Uwe Brauer <oub@mat.ucm.es> wrote:
> 
> 
>    > 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.

*cough* this should be:

   would be displayed as "10" .  (This dot is the sentence ending dot :)

> 
>    > If you can live with a 10.0  use %.1f instead of %.0f after the
>    > semicolon.
> 
> I think I can live with 10.00 and then later make a query-replace
> of .00
> 

Best regards
Robert

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-table: decimal numbers with a dot at the end: for example 10.
  2015-06-24 10:08     ` Robert Klein
@ 2015-06-24 10:11       ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2015-06-24 10:11 UTC (permalink / raw)
  To: emacs-orgmode

>> "Robert" == Robert Klein <roklein@roklein.de> writes:

   > Hello,
   > On Wed, 24 Jun 2015 12:06:14 +0200
   > Uwe Brauer <oub@mat.ucm.es> wrote:

   >> 
   >> Hi
   >> > Hello,
   >> > On Wed, 24 Jun 2015 10:22:43 +0200
   >> > Uwe Brauer <oub@mat.ucm.es> wrote:
   >> 
   >> 
   >> > 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.

   > *cough* this should be:

   >    would be displayed as "10" .  (This dot is the sentence ending dot :)

Yes I understand that much.
However if I chose this setting 6.25 gets displayed as 6 which is not
acceptable.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-24 10:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-06-24 10:06   ` Uwe Brauer
2015-06-24 10:08     ` Robert Klein
2015-06-24 10:11       ` Uwe Brauer

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).