emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allow Currency Symbols and Grouping Commas in Table Numbers


From: Ihor Radchenko
Subject: Re: Allow Currency Symbols and Grouping Commas in Table Numbers
Date: Fri, 27 May 2022 16:22:54 +0800

"Daniel E. Doherty" <ded@ddoherty.net> writes:

> I often use org table to perform calculations and export those tables
> to LaTeX documents.
>
> One thing I always wished I could do with org tables is get it to
> allow numbers to be decorated with currency symbols, the dollar, euro,
> yen, etc., as well as grouping commas so that the tables are more
> suitable for presentation.

You can, for example, do

| 1 USD | 2 USD | 4 USD | 7 USD |
#+tblfm: $4=vsum($1..$3)

Emacs calc is able to work with arbitrary ascii symbols or even units.
However, calc does not appear work with unicode. If Emacs calc were to
support unicode, it would automatically work in Org.

Also, you can

enable latex in calc via
(setq org-calc-default-modes
  '(calc-internal-prec 12
                       calc-float-format  (float 8)
                       calc-angle-mode    deg
                       calc-prefer-frac   nil
                       calc-symbolic-mode nil
                       calc-language latex ;; <--- this is new compared to 
default
                       calc-date-format (YYYY "-" MM "-" DD " " Www (" " hh ":" 
mm))
                       calc-display-working-message t))

Then, the following will work

| \dollar1 | \dollar2 | \dollar3 | 6 \dollar |
#+tblfm: $4=vsum($1..$3)

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]