[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: publish()
From: |
Carlo de Falco |
Subject: |
Re: publish() |
Date: |
Sat, 10 Jul 2010 13:10:06 +0200 |
On 26 Jun 2010, at 16:35, address@hidden wrote:
Message: 2
Date: Sat, 26 Jun 2010 11:51:13 +0200
From: David Bateman <address@hidden>
Subject: Re: publish()
To: Fotios Kasolis <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Fotios Kasolis wrote:
So here we are! I made a function "publish()" with reasonably close
interface to matlabs publish().
1) It works only for scripts but it is not difficult to use it for
functions after a small fix: see todo at the eof.
2) It is able to generate beautiful latex results and ugly html.
3) It is documented so "help publish".
I get warning like
warning: unrecognized escape sequence `\d' -- converting to `d'
warning: unrecognized escape sequence `\u' -- converting to `u'
warning: unrecognized escape sequence `\u' -- converting to `u'
warning: unrecognized escape sequence `\u' -- converting to `u'
warning: unrecognized escape sequence `\u' -- converting to `u'
warning: unrecognized escape sequence `\d' -- converting to `d'
then the latex has things like
^Hegin{document}
where "^H" is control-h and the latex doesn't compile. As for the code
itself, looking rapidly I see three problem
1) Don't use CamelCase variables like fileName
2) The indentation doesn't follow the Octave stands of two spaces
3) Use spaces between function names and the first parentheses eg
"exist
(...)" rather than "exist(...)"
See the pages
http://www.gnu.org/software/octave/doc/interpreter/Contributing-Guidelines.html
and in particular
http://www.gnu.org/software/octave/doc/interpreter/Octave-Sources-_0028m_002dfiles_0029.html#Octave-Sources-_0028m_002dfiles_0029
D.
As I find Fotios' function useful, I
1) made the necessary style and bug fixes (a few camel-case variables
are left as
they have the same name as options in the Matlab version of publish),
2) changed the style for passing options to the
more standard ["name", value] format
3) checked it in to octave-forge in the "miscellaneous" package.
The current version can be found here:
<http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/miscellaneous/inst/publish.m?view=log
>
best regards,
c.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: publish(),
Carlo de Falco <=