Exporting examples for use in other applications



On 11/14/2012 07:55 PM, Leo Butler wrote:
> You can embed Maxima, or BC, or what-have-you in LaTeX--all that is
> needed is file i/o and the \write18 system command. Here is a near
> minimal working example of how to do this (the \exec macro in
> exec.tex).
Hi Leo,
We already use a similar approach to build the Maxima manual. The 
difference with you approach is that instead of defining Tex macros to 
execute Maxima and get the result, a Perl preprocessor (update_examples) 
is used before latex is run.

The paper you mentioned in another message, "Developing a Lisp-based 
preprocessor for TEX documents", also argues in favor of using a 
preprocessor rather than defining macros directly in tex.

A lisp version of "update_examples" would simplify our current 
dependencies for building Maxima and could be a good step in the 
direction of integrating Maxima with latex.

Regards,
Jaime