org.el 3.12: a plain-text spreadsheet for emacs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

org.el 3.12: a plain-text spreadsheet for emacs

Carsten Dominik-2

Hi,

in the latest version of org-mode, the table editor has been extended
to have many spreadsheet-like capabilities.  It makes use of the Emacs
calc package and allows you to use complex expressions to calculate
fields in a table.

Even if you are not using org-mode, the table editor/spreadsheet can
be embedded into any other major mode through the minor orgtbl-mode.

Take a look at

http://www.astro.uva.nl/~dominik/Tools/org

Here are two examples for tables created with that mode:

1. A table that collects exam results of students.

   |---+---------+--------+--------+--------+-------+------|
   |   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
   |---+---------+--------+--------+--------+-------+------|
   | ! |         |     P1 |     P2 |     P3 |   Tot |      |
   | # | Maximum |     10 |     15 |     25 |    50 | 10.0 |
   |---+---------+--------+--------+--------+-------+------|
   | # | Peter   |     10 |      8 |     23 |    41 |  8.2 |
   | # | Sara    |      7 |     14 |     19 |    40 |  8.0 |
   | # | Sam     |      2 |      4 |      3 |     9 |  1.8 |
   |---+---------+--------+--------+--------+-------+------|
   | $ | max=50  |        |        |        |       |      |
   |---+---------+--------+--------+--------+-------+------|
   #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f


2. Since calc is behind the table calculations, there are many
   possibilities.  For example, here is a table that computes the
   Taylor series for a couple of functions.

   |---+-------------+---+-----+--------------------------------------|
   |   | Func        | n | x   | Result                               |
   |---+-------------+---+-----+--------------------------------------|
   | # | exp(x)      | 1 | x   | 1 + x                                |
   | # | exp(x)      | 2 | x   | 1 + x + x^2 / 2                      |
   | # | exp(x)      | 3 | x   | 1 + x + x^2 / 2 + x^3 / 6            |
   | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
   | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2    |
   | * | tan(x)      | 3 | x   | 0.0175 x + 1.77e-6 x^3               |
   |---+-------------+---+-----+--------------------------------------|
   #+TBLFM: $5=taylor($2,$4,$3);n3

_______________________________________________
Gnu-emacs-sources mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources