[Top][All Lists]

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

Re: [O] using a simple numerical variable in an org text ocument

From: Sebastien Vauban
Subject: Re: [O] using a simple numerical variable in an org text ocument
Date: Wed, 14 Aug 2013 07:54:31 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt)

Hi Dieter,

Dieter Wilhelm wrote:
> "Sebastien Vauban" <address@hidden> writes:
>> As macros are expanded before Babel code is evaluated, I would
>> try #+scr_calc{...} with MACRO constants in the formula (untested).
> it seems that you're working with calc source blocks! :-) I'd like to
> leverage calc in org-mode (I'm thinking of unit conversions, etc.:
> Mathematica for free men) but I'm not getting it.  I assume that in an
> #+src_calc block the mode of operation of calc is algebraic, isn't it?
> #+BEGIN_SRC calc
>   2 + 2
>   sqrt(8)
>   # above is working, by the way, does a calc block have a comment sign?
>   2 cm
>   calc-convert-units(mm)
> : calc - convert - units(mm)
> Above attempt is not working.  Is it also possible to use the RPN? Like
> in this fictive block:
> #+BEGIN_SRC calc :mode rpn
>   2 2 +
>   2 'mm  8 'cm + 'in u c
> #+END_SRC  
> And the *Calc Trail* buffer seems not to reflect any operations, despite
> Calc showing the block results in its calculator buffer!

Sorry to come back to this with a huge delay, but in fact I don't have any
experience with Calc mode at all!  I can't answer your questions without
digging the manuals.

The only thing I make use of is inline Calc for simple computations, to avoid
making mistakes in prices (fictitious example):

--8<---------------cut here---------------start------------->8---
The work will last 20 days and cost src_calc[:results raw]{20 * 498} USD at
the base rate.
--8<---------------cut here---------------end--------------->8---

Best regards,

Sebastien Vauban

reply via email to

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