Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named sections of companion guides #85

Open
amyworrall opened this issue Mar 11, 2011 · 3 comments
Open

Named sections of companion guides #85

amyworrall opened this issue Mar 11, 2011 · 3 comments
Labels

Comments

@amyworrall
Copy link

I'm trying to convert someone's doxygen-marked-up code to use appledoc. It seems doxygen lets you give sections names, thus:

@section library The Library

Then when you want to refer to it, you can do

- @ref library, some more text here

And it automatically replaces @ref library with The Library, as well as providing a link to that section. The @section command also seems to make a section header.

This seems to be what I've been trying to describe in bug 84, but a more general case: from this documentation I see that doxygen allows @page, @section, @subsection and @subsubsection, and it uses all of these to generate different pages and link to the right bits.

I think that copying doxygen is the way to go here, unless there's a better idea floating around!

P.S. When I get some free time I'm going to try and have a look at the appledoc code. If I was able to make some changes myself it might make up for my many feature requests :)

@tomaz
Copy link
Owner

tomaz commented Mar 11, 2011

This is certainly doable. All these @ directives could simply create <a name="something" /> sections so should be relatively easy to link to them later on.

Hm, I wrote the comment for #85 and was suggesting similar thing, however looks like it was lost somehow (sometimes I manage to do stuff like that, just out of the blue :)
Anyway, this could also be used to close that issue!

@tomaz
Copy link
Owner

tomaz commented Feb 23, 2012

Just adding note and link to Amy's solution for future reference:

I've got sections in generated documents working (including displaying with the Apple-style sidebar). Code is at:

https://github.com/amyworrall/appledoc/

Sections are written as
@section shortname Human Readable Title

Also, documents themselves can be given a title via
@title Document Title

I haven't done anything for cross referencing yet. Eventually I'd like to have the section short name used for cross referencing: at the moment it fills in the tags with it, but that's it. However, I won't have time to implement that for a bit.

The code might need a little cleaning up. In particular in GBDocumentParser there's a check to see if someone tried to do a subsection outside a section, and I didn't know what to do if they did: at the moment I just NSLogged the error. I also haven't written any unit tests for the new functionality.

This is long overdue for bringing it into main branch, but I currently don't have time for it :)

@ryanjm
Copy link

ryanjm commented Jan 14, 2015

Has there been any movement / updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants