help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave to (la)tex conversion


From: Carnë Draug
Subject: Re: octave to (la)tex conversion
Date: Tue, 2 Oct 2012 08:26:16 +0200

On 2 October 2012 01:01, Leo Butler <address@hidden> wrote:
> Maxima has the function 'tex' that lets one transform an object in
> Maxima to a string of tex code. This is quite useful: an emacs mode
> (imaxima) uses this to create a front end that looks really
> professional; plus, with mathjax, it can be rolled into a nice web-based
> frontend.
>
> Is there anything similar in Octave?
>
> ----------
> What I have in mind is the following application: I am writing course
> notes that have a lot of numerical examples in them. With \write18, I
> can put these inside a LaTeX file and have Octave do the computations. I
> would like to have Octave run a hook before quitting to dump all of the
> user-defined variables into a tex file as tex macros. It doesn't need to
> be fancy, something like
>
> x=1:2; ==>
> \def\octavex#1{\ifnum#1=1{1}\else\ifnum#1=2{2}\else\relax\fi\fi}
>
> IPC on the cheap, if you like. It seems like someone might have already
> written something like this.
>
> Leo

Look in the miscellaneous packages in the function `publish'. It
should do what you want though I'm not sure if free of bugs. You find
any, please fix it and send us patches.

There's also a very nice textable function that hasn't been released
yet (also from miscellaneous package). Check it out at

https://sourceforge.net/p/octave/code/11184/tree/trunk/octave-forge/main/miscellaneous/inst/textable.m

Carnë


reply via email to

[Prev in Thread] Current Thread [Next in Thread]