Ticket #5 (assigned enhancement)

Opened 4 years ago

Last modified 7 months ago

Improve rst markup support

Reported by: mgalloy Owned by: mgalloy
Priority: major Milestone: IDLdoc 3.4
Component: parsing Version: 3.3
Keywords: rst markup Cc:

Description (last modified by mgalloy) (diff)

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.

Change History

  Changed 4 years ago by mgalloy

  • status changed from new to assigned

  Changed 4 years ago by mgalloy

  • description modified (diff)

  Changed 4 years ago by mgalloy

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

  Changed 4 years ago by mpiper

  • priority changed from major to minor
  • component changed from parsing to output

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

  Changed 4 years ago by mpiper

  • priority changed from minor to major
  • component changed from output to parsing

  Changed 4 years ago by mgalloy

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

follow-up: ↓ 8   Changed 4 years ago by mpiper

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

in reply to: ↑ 7   Changed 4 years ago by mgalloy

Replying to 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.

  Changed 4 years ago by mgalloy

  • milestone changed from IDLdoc 3.1 to IDLdoc 3.2

  Changed 3 years ago by mgalloy

  • milestone changed from IDLdoc 3.2 to IDLdoc 3.3

  Changed 3 years ago by mgalloy

  • version changed from 3.0 to 3.2

  Changed 2 years ago by mgalloy

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

  Changed 23 months ago by mgalloy

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

  Changed 21 months ago by mgalloy

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

  Changed 16 months ago by mgalloy

  • version changed from 3.2 to 3.3
  • milestone changed from IDLdoc 3.3 to IDLdoc 3.4

  Changed 7 months ago by mgalloy

  • description modified (diff)
Note: See TracTickets for help on using tickets.