emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Millar <millarc@verizon.net>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Bug: Final zero after decimal point is stripped when inline code evaluated
Date: Sun, 5 May 2024 14:41:45 -0400	[thread overview]
Message-ID: <6102485d-b58f-4740-abf9-f2af64e7a36e@verizon.net> (raw)
In-Reply-To: <144951b9-d715-4fd6-a3f5-2462ff98acb0@verizon.net>

Forgot to include that i also used the numprint package.

On 5/5/24 2:30 PM, Charles Millar wrote:
> Please note that in the second src_latex the zero is stripped from the 
> results. The final zero is required for my purposes, i.e. dollars and 
> cents. This occurs in both results and on export to pdflatex,
> 
> Does org's evaluation cause this or does latex? I have attempted to use 
> the siunutx and currency packages.as follows,
> 
> #+NAME: TABLE2
> |22578.60|
> 
> src_latex[:var printthis=TABLE2[-1,-1] :eval yes :results replace 
> :exports results]{\num{printthis}} {{{results(@@latex:\num{22578.6}@@)}}}
> 
> src_latex[:var printthis=TABLE2[-1,-1] :eval yes :results scalar 
> :results replace :exports 
> results]{\num[round-precision=2,round-mode=places,round-pad = 
> false]{printthis}} {{{results(@@latex:\num{22578.6}@@)}}}
> 
> src_latex[:var printthis=TABLE2[-1,-1] :eval yes :results replace 
> :exports results]{\vUSD{printthis}} {{{results(@@latex:\vUSD{22578.6}@@)}}}
> (I also tried \dUSA and \cUSA)
> 
> On the other hand this has no problem:
> 
> #+NAME: TABLE1
> |22578.59 |
> 
> src_latex[:var printthis=TABLE1[-1,-1] :eval yes :results replace 
> :exports results]{\num{printthis}} {{{results(@@latex:\num{22578.59}@@)}}}
> 
> The missing zero is important - the result is supposed to be dollars and 
> cents.
> 
> Org mode version 9.7-pre (release_9.6.27-1391-gba7475 @ 
> /usr/local/share/org-mode/lisp/)
> 
> GNU Emacs 30.0.50 (build 100, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, 
> cairo version 1.16.0) of 2024-04-27
> 



  reply	other threads:[~2024-05-05 18:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <144951b9-d715-4fd6-a3f5-2462ff98acb0.ref@verizon.net>
2024-05-05 18:30 ` Bug: Final zero after decimal point is stripped when inline code evaluated Charles Millar
2024-05-05 18:41   ` Charles Millar [this message]
2024-05-06 12:44   ` Ihor Radchenko
2024-05-06 16:36     ` Max Nikulin
2024-05-06 16:42       ` Ihor Radchenko
2024-05-06 20:05         ` Charles Millar
2024-05-07 11:49           ` Max Nikulin
     [not found]             ` <aad9bb0b-4b64-4934-952d-a6cdc9f3b32f@verizon.net>
2024-05-07 14:31               ` Fwd: " Charles Millar
2024-05-07 16:40               ` Max Nikulin

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=6102485d-b58f-4740-abf9-f2af64e7a36e@verizon.net \
    --to=millarc@verizon.net \
    --cc=emacs-orgmode@gnu.org \
    /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).