How to use a non-standard DDoc section?
Robert Fraser
fraserofthenight at gmail.com
Tue Mar 4 02:33:24 PST 2008
Max Samukha wrote:
> On Tue, 4 Mar 2008 18:29:45 +1100, Derek Parnell
> <derek at nomail.afraid.org> wrote:
>
>> On Sun, 02 Mar 2008 08:51:55 +0200, Max Samukha wrote:
>>
>>> /**
>>> Params:
>>> foo = bar
>>>
>>> $(DDOC_SECTION_H Section header:)
>>> $(DDOC_SECTION Section contents)
>>> */
>> Try this ...
>>
>> /**
>> Params:
>> foo = bar
>>
>> Section_Header:
>> Section contents
>>
>> */
>>
>> A Section name can only consist of ASCII alphabetic characters and '_'. The
>> '_' is converted to a space on rendering.
>
> Thanks. I should have deduced that from See_Also section name. Are the
> section naming rules mentioned anywhere in the spec?
Basically, you can name sections any st of alphanumeric
characters/underscores you want and the underscores are converted to
spaces in the output. The text is treated as a section if a line begins
with a valid section identifier followed by a colon.
http://www.digitalmars.com/d/2.0/ddoc.html
Look under "Sections" about halfway down. The sections the DMD Ddoc
generator recognizes specially are:
- Summary
- Description
- Copyright
- Params
- Macros
There are some others specified by the docs, but these aren't treated
any differently than regular sections you make up:
- Authors
- Bugs
- Date
- Deprecated
- Examples
- History
- License
- Returns
- See_Also
- Standards
- Throws
- Version
(FYI, if you're using Descent, the "Returns" section for a function is
given a special meaning in doc views)
More information about the Digitalmars-d-learn
mailing list