mgalloy / idldoc

Documenting IDL code
Other
20 stars 13 forks source link

Improve rst markup support #5

Open mgalloy opened 11 years ago

mgalloy commented 11 years ago
The rst markup was only partly implemented for IDLdoc 3.0. Missing markup that should be implemented:

  * lists (numbered, bulleted, and definition)
  * *emphasis* and **bold**
  * inline ``code``
  * links: single word and phrase links (HTML and internal links)
  * images
  * tables

There is other markup that is not as important for header documentation that could also be implemented for a separate ticket later.
mgalloy commented 11 years ago

Changeset r481 adds images to rst markup and links should be easy now.

mgalloy commented 11 years ago

Author: mpiper I'd like to ask for an enhancement to the rst form for the '''Examples''' tag. I'd like this form:

; :Examples:
;   IDL> ; A comment
;   IDL> foo

to place pre tags (or use a monospaced font with line breaks) around the example code in the output, like this:

=== Examples ===

IDL> ; A comment
IDL> foo
mgalloy commented 11 years ago

So, you mean

; :Examples:
;    Try this example::
;
;       IDL> ; A comment
;       IDL> foo

is too wordy? I'm not sure I want the Examples section to not have any "regular" text. For example, I could have an Examples section that has some explanation in it:

; :Examples:
;    Run the main-level program at the end of this file for an example of using MG_THEMERIVER::
; 
;       IDL> .run mg_themeriver
; 
;    This should produce a result like .. image:: themeriver.png
mgalloy commented 11 years ago

Author: mpiper Aha! I didn't read the documentation carefully enough -- I now see how the double colon works.

mgalloy commented 11 years ago

Replying to [comment:7 mpiper]:

Aha! I didn't read the documentation carefully enough -- I now see how the double colon works.

The IDL format does do that since there is no double colon markup; everything in the EXAMPLE section is treated as code.

mgalloy commented 11 years ago

Also, add special text in backticks, i.e., routine. Maybe this looks up in the index and makes a link to it?

mgalloy commented 11 years ago

r642 adds three levels of heading for rst markup (particularly useful in overviews, .idldoc files, directory overviews, and file comments).

mgalloy commented 11 years ago

r652 adds some basic links. Uses "my_routine" and "text http://michaelgalloy.com" notation with backticks.