On 27/09/10 05:58, Marcus D. Hanwell wrote:
Hi,

I am quite new to asciidoc, but would like to know if there is an
existing macro to link to Doxygen pages? If not, I am not certain how
best to accomplish that with a macro. What I essentially need is a
macro where I can name a class, and have asciidoc add text to the
start and end of the name and make it into a hyperlink.

For example, QApplication would become http://docs.site.com/QApplication.html.
The parts before and after the name are constant, but from what I read
macros are not recursive, and so that would not be made into a
hyperlink by that macro. This seems like it should be quite easy to
accomplish, but after reading through the docs and searching I have
not figured it out.

Here's how (I cloned and modified the http inline macro. Put this in a conf 
file:

[macros]
(?su)(?<!\w)[\\]?(?P<name>doxygen):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=

[doxygen-inlinemacro]
<a href="http://docs.site.com/{target}";>{target}</a>

Now you can use this:

A doxygen:QApplication[] example.

To generate this:

A <a href="http://docs.site.com/QApplication";>QApplication</a> example.


Cheers, Stuart



Thanks in advance for any help,

Marcus


--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to