On 5/6/24 12:42 PM, Ihor Radchenko wrote:
Max Nikulin <maniku...@gmail.com> writes:
On 06/05/2024 19:44, Ihor Radchenko wrote:
Charles Millar writes:
#+NAME: TABLE2
|22578.60|
src_latex[:var printthis=TABLE2[-1,-1] :eval yes :results replace
:exports results]{\num{printthis}} {{{results(@@latex:\num{22578.6}@@)}}}
This is expected. When you assign :var, Org mode reads the table data,
converting it to number.
After discussion of ob-shell related issues I am in doubts if org-babel
should eagerly convert strings to numbers. Perhaps numbers should be
recognized for specific backends only (or vice versa conversion should
be suppressed for specific backends).
Maybe. But changing the current behavior is not trivial - a lot of code
relies upon it implicitly. If anyone wants to work on more
fine-grained control over Org markup -> Elisp conversion, feel free.
Thanks for the feedback. For the moment I will create separate tables
that have the the desired data in quotes.
I appreciate that mathematically a trailing zero or zeros may be
non-significant; however, in my use case, i.e. correct format in a text,
they are necessary. Another example, in addition to my Dollars and cents
scenario, may be a table that that has been created by using append, and
the table appears as follows because trailing zeros were disregarded.
This 1.222
that 3.444
it 5.6
last 7.691
Question arises - is the correct number reported on line "it" 5.600 or
has some editing omitted the last two decimal places?
As an aside, I am not a coder; however I was playing around in the
scratch butter, and it appears to me that this issue may run deeper that
Org Mode, for instance:
(number-to-string 5.000)
evaluates to "5.0"
Furthermore, and more closely related to the topic,
(setq toconvert 5.000)
(number-to-string toconvert)
evaluates to "5".
Just my 0.020 cents
Charlie Millar