1

Is there a tool available which would convert the sources given into HTML with links?

By links I mean that every type, class, and method used would point via href to its definition.

I haven't managed to make highlight, syntax-highlight, nor pygments work this way. Even if it supports input from ctags, it only adds the title attribute, but not links.

2 Answers 2

2

Highlight can easily be modified to support things such as adding links to function / class definitions, as well as manual entries.

I was able to hook on to the class and function detection, and have each instance linked to the PHP Manual in my testing. I don't know what you'd want yours to link to, so it's your choice (per language, of course.)

Sign up to request clarification or add additional context in comments.

2 Comments

Sure, I was thinking about that as well. Obviously, I would prefer an established and well tested solution if available.
Unfortunately, I am not seeing one.
0

Depending upon the language of your source code you might want to use doxygen. It supports a variety of source languages and can export the comments to HTML and LaTeX.

Many modern languages, like Java or C# support XML-comments to document the source code. You can then extract these comments into a single XML file by compiling them with special options. From this XML you can then easily produce HTML by adding an appropriate CSS sheet. MSDN documentation, for example, is largely based upon these HTML files generated in automated mode.

1 Comment

Yes, some highlighting tool support links between source code and the documentation. Unfortunately, what I need is link between sources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.