From mboxrd@z Thu Jan 1 00:00:00 1970 From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) Subject: Unit conversions and symbolic mathematics with Babel Date: Wed, 03 Sep 2014 08:54:19 +0200 Message-ID: <87vbp5urc4.fsf@vsl28t2g.ww011> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP4YF-0002Sv-Dy for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 03:00:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP4Y7-0004go-Ut for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 03:00:19 -0400 Received: from plane.gmane.org ([80.91.229.3]:52072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP4Y7-0004gN-O5 for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 03:00:11 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XP4Xz-0003dr-It for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 09:00:03 +0200 Received: from p57acd04f.dip0.t-ipconnect.de ([87.172.208.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Sep 2014 09:00:03 +0200 Received: from dieter by p57acd04f.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Sep 2014 09:00:03 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Jay Belanger Hello Org, for some engineering most often I need estimations with unit conversions, Emacs Calc is perfect for this. When it comes to reporting and documentation I'd like to do it with org-mode, of course. For numerical stuff and visualisation purposes I'm using already R and TikZ. But for unit conversions and symbolic maths I'm in a bind when trying to do this with free programs. - R :: Do you have experience with a units packages under the R-project? What I've seen so far is not so reassuring... - Maxima :: I think there is a nice and intuitive units package for maxima. But this would mean learning an additional tool and mentally switching between both within one document. - Calc :: I'd prefer to do it with Calc but the Babel interface is (yet?) restricted For example, I can define functions and do some unit conversions: #+BEGIN_SRC emacs-lisp (defmath cvun(a b) (math-convert-units a b)) #+END_SRC #+RESULTS: : calcFunc-cvun #+BEGIN_SRC calc :var L1 = "5 mm" cvun( L1, m) #+END_SRC #+RESULTS: : 5e-3 m But what is missing is to assign variables within a source block #+BEGIN_SRC calc :var L1 = "5 mm" L2 := cvun( L1, m) #+END_SRC Unfortunately this is not working. Do you have an idea how to implement this? - Are you using (better) alternatives? Thanks for your insights Dieter -- Best wishes H. Dieter Wilhelm Darmstadt, Germany