On Sunday, 15 Mar 2020 at 11:46, Heiko Schmidt wrote: > - I want to use ob-calc to do some "literate calculation" with the > purpose to document what I thought at the time I wrote it.
I have never managed to get ob-calc to do what I want either so I cannot help you directly with your query. Instead, I use embedded calc mode, along these lines: --8<---------------cut here---------------start------------->8--- Number of cars (PKW) in germany: ncars := 45000000. Yearly mileage in [km/y] mileage := 15000 km/y Calculate amount of complete km per year mileage ncars => 675000000000. km / y --8<---------------cut here---------------end--------------->8--- You have to activate embedded mode. By default, calc will look for expressions surrounded by empty lines. The := operator assigns values to variables and the => operator says to show the result here instead of replacing the expression with the result. As an aside, calc understands units which is quite nice... HTH, eric -- : Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-412-ge18415