I wonder if this feature is available in TeX system? For example, given a formula within a table, it can apply the formula and display data after the calculation.
|
There is the package
|
|||
|
|
|
Here's a simple example of using R, knitr and xtable to produce a LaTeX table. Assume you have the following document called
In short, the code between To convert the file into latex and then to pdf you could just open the rnw file in the open source R IDE called RStudio and click "Compile PDF". Or you could issue commands like this from the command line.
It would produce output like this:
To run the above example, you would need to install:
For more information check out the knitr website: http://yihui.name/knitr/ |
|||
|
|
|
If you use LuaTeX you can extend TeX with any C math library and create Lua bindings. To create the necessary bindings the program SWIG can be used. Here is a ConTeXt example which uses the PARI/GP algebra system to do the calculations. Generate the binding file:
Generate the binding with
then compile the module
Now the module is available in LuaTeX with Using the library
The result of this code:
Since this approach does not make use of any ConTeXt features this code should work in LaTeX as well with only minor modifications. However, it only works with LuaTeX. This description is based on a talk by Luigi Scarso at BachoTeX 2011. All credits go to him. |
|||
|
|



spreadtabwhich looks quite promising on this respect. – egreg Sep 9 '12 at 20:28