emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Yet another literate programming application
Date: Mon, 29 Jul 2013 10:57:01 -0600	[thread overview]
Message-ID: <87bo5lnw2q.fsf@gmail.com> (raw)
In-Reply-To: <m2r4ehtjk1.fsf@polytechnique.org> (Alan Schmitt's message of "Mon, 29 Jul 2013 18:30:54 +0200")

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> schulte.eric@gmail.com writes:
>
>> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>>
>>> Or rather, I should say a literate algebra and calculating application:
>>> http://calca.io/
>>>
>>
>> If this is appealing, it may be worth checking out the "Embedded Mode"
>> of Emacs calc [1].  From what I can tell on the calc.io website, Emacs
>> calc provides the same functionality, but Emacs calc has the benefits of
>> (1) it is open source meaning you can confirm calculations and your
>> answers (in my opinion a must for any peer reviewed publication), and
>> (2) it may be embedded in *any* type of file.
>
> Embedded calc mode is amazing, thanks for the link! It does not seem as
> intuitive to work with equations (I've tried doing the Functions and
> Solving Equations examples in calc),

Very cool, thanks for sharing.  I would note, that one nice thing about
embedded mode is that there is no need for the #+begin/end_src calc
blocks, rather the formulas may be placed directly in the Org-mode file.
So to re-write a small portion of your previous example...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: calc-examples.org --]
[-- Type: text/x-org, Size: 547 bytes --]

#+Title: Emacs Calc Embedded Mode Examples

* Temperature Conversion (solving equations)
Conversion from Celsius to Fahrenheit involves multiplication by 1.8
and the addition of 32 as shown below.

eq := f = 1.8 c + 32

Solving for Celsius from Fahrenheit is then.

ceq := solve(eq, c) =>

So, if we know that water boils at 100\deg Celsius, we can find the
boiling point of water in Fahrenheit.

subst(eq, c, 100) =>

Or if we know that paper burns at 451\deg Fahrenheit, we can find the
burning point of paper in Celsius.

subst(ceq, f, 451) =>

[-- Attachment #3: Type: text/plain, Size: 650 bytes --]


Using embedded mode is still fairly awkward for me.  I would benefit
greatly from some sort of quick reference card explaining the key
bindings and maybe an easier way to switch to/from embedded mode.

> and there are funny results with spaces in names. If someone knows how
> to do the even/odd example in calc, please let me know. Here is what I
> got so far:
>

I'm not clear on how the even/odd example works in calc, could you share
a link to the specific manual page you're referencing?  I've long felt
that calc would be a *very* powerful tool, if only I could climb the
learning curve.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2013-07-29 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 12:56 Yet another literate programming application Alan Schmitt
2013-07-29 14:08 ` Eric Schulte
2013-07-29 16:30   ` Alan Schmitt
2013-07-29 16:57     ` Eric Schulte [this message]
2013-07-29 18:00       ` Alan Schmitt

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=87bo5lnw2q.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=alan.schmitt@polytechnique.org \
    --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).