Re: Using IDLdoc to format documentation [message #82750] |
Fri, 18 January 2013 15:36  |
Matthew Argall
Messages: 286 Registered: October 2011
|
Senior Member |
|
|
> Any thoughts?
I just recently started using IDLdoc and love it. I have been looking for something like it for my MatLab code. Seems like IDLdoc could work if I could just change the comment character to "%". Can there be a keyword for that?
Bullets would be good. Writing "1.", "2.", etc. has been easy enough for numerated lists. Especially for fixed-width fonts.
|
|
|
|
|
|
|
Re: Using IDLdoc to format documentation [message #82857 is a reply to message #82820] |
Tue, 22 January 2013 12:57  |
Ajean
Messages: 4 Registered: November 2012
|
Junior Member |
|
|
On Tuesday, January 15, 2013 3:52:07 PM UTC-8, Mike Galloy wrote:
> On 1/15/13 4:20 PM, Phillip Bitzer wrote:
>
>> Perhaps Mike (or someone else) can offer a different/better
>
>> solution, but I usually do something like this:
>
>>
>
>> ; :Returns:
>
>> ; One of three possible values are returned::
>
>> ; -1 IF xUTC1 < xUTC2
>
>> ; 0 IF xUTC1 == XUTC2
>
>> ; 1 IF xUTC1 > XUTC2
>
>>
>
>> Similarly,
>
>>
>
>> ; :History:
>
>> ; Modification history::
>
>> ; 21 Mar 2007 D. A. Gell Initial coding
>
>> ; 16 Apr 2007 D. A. Gell correct variable usage
>
>> ; 7 Aug 2007 D. A. Gell added Kepler (dust) ram direction
>
>
>
> Yes, I do things like that too, but find it awkward. I don't have a good
>
> solution to this right now.
>
>
>
> I would like to add itemized and enumerated lists to IDLdoc rst markup
>
> with syntax something like:
>
>
>
> ; :Returns:
>
> ; One of three possible values are returned:
>
> ;
>
> ; * -1 if xUTC1 < xUTC2
>
> ; * 0 if xUTC1 == xUTC2
>
> ; * 1 if xUTC1 > xUTC2
>
>
>
> and
>
>
>
> ; :History:
>
> ; * 21 Mar 2007 D. A. Gell Initial coding
>
> ; * 16 Apr 2007 D. A. Gell correct variable usage
>
> ; * 7 Aug 2007 D. A. Gell added Kepler (dust) ram direction
>
>
>
> These would make simple bullet item lists (note that this would not
>
> align the comparison operators in the first example).
>
>
>
> Enumerated lists would look like:
>
>
>
> ; :Returns:
>
> ; One of three possible values are returned:
>
> ;
>
> ; 1. -1 if xUTC1 < xUTC2
>
> ; 2. 0 if xUTC1 == xUTC2
>
> ; 3. 1 if xUTC1 > xUTC2
>
>
>
> or
>
>
>
> ; :Returns:
>
> ; One of three possible values are returned:
>
> ;
>
> ; #. -1 if xUTC1 < xUTC2
>
> ; #. 0 if xUTC1 == xUTC2
>
> ; #. 1 if xUTC1 > xUTC2
>
>
>
> Any thoughts?
>
>
>
> Mike
>
> --
>
> Michael Galloy
>
> www.michaelgalloy.com
>
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
>
> Research Mathematician
>
> Tech-X Corporation
This would be lovely, actually ... there are several places I (like many others) am using :: in a funny way to make this happen. One more vote for this functionality!
|
|
|
Re: Using IDLdoc to format documentation [message #82894 is a reply to message #82750] |
Sun, 20 January 2013 10:21  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 1/18/13 4:36 pm, Matthew Argall wrote:
>> Any thoughts?
>
> I just recently started using IDLdoc and love it. I have been looking
> for something like it for my MatLab code. Seems like IDLdoc could
> work if I could just change the comment character to "%". Can there
> be a keyword for that?
>
> Bullets would be good. Writing "1.", "2.", etc. has been easy enough
> for numerated lists. Especially for fixed-width fonts.
>
There are a lot of IDL specific issues in IDLdoc besides the comment
character. If you want to give it a try, take a look at
docparprofileparser__define.pro., particularly the _parseLines method.
There are a couple places where you can replace ';+' and ';' with the
appropriate characters for MATLAB. You will also have to change it from
looking for .pro files to looking to for MATLAB's extension.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
|
|
|