Use of doxygen's \link command

我的未来我决定 提交于 2019-12-19 05:48:13

问题


I have an external HTML file I'd like to have linked form either my doxygen "Related Pages" tab or the left hand frame. It seems I need to use the \link command but I can't find a good example of how to use it or where. I am currently using doxywizard to generate the HTML.

So, is \link something I incorporate into my doxygen config file or do I add it when I build the HTML somehow?

Update

So I ended up having to do the following:

  1. Create a new page (docs_main.html) that had the following:

    /*! \mainpage MY TITLE HERE
     * \section intro_sec External resources
     * <a href="link_to_my_external_page.html">My external page</a>
     */
    
  2. Include that page in my doxygen included files list

  3. Rebuild my documentation

That added to my doxygen "Main Page" the following

MY TITLE HERE

My external page (which was a link to that page)

回答1:


Doxygen allows you to insert certain HTML commands in to your documentation, including links. In case you didn't know this is how you make a link in HTML:

<a href="externalfile.html">External file</a>

cdiggins' answer is also worth reading.




回答2:


We have a Markdown support in doxygen nowadays. Your code may be a clearer:

/*! \mainpage MY TITLE HERE
 * \anchor intro_sec
 * # External resources
 * [My external page](http://link_to_my_external_page.html)
 */

The above should render somewhat close to:


External resources

My external page





回答3:


The \link (and anything of the form \command or @command) is called a "special command" and is part of the mark-up used in the input files processed by Doxygen not part of the configuration. The \link command does not do what you want.

You could perhaps use the \page command to create a new related page and then use the \htmlinclude command to insert the external HTML file as the contents of that page.




回答4:


As other answers here looks bits and pieces for a beginner, here is the complete procedure.

1) create an html file with content(ex:abc.html) as below

/*! \mainpage MY TITLE HERE 
 * \section intro_sec External resources
 * <a href="link_to_my_external_page.html">My external page</a>
 */

2) Add this file path in config file here INPUT =

3)Also add your file type here FILE_PATTERNS =

The above procedure opens your file in doxygen window

Add the below content to open the file in explorer

<a href="link_to_my_external_page.html" target="_blank"><b>My external page</b></a>

Note: If file doesn't open try giving absolute path




回答5:


You can add a tab to the main navigation bar (with your link) by using a custom layout file.

Take a look at the Customizing the Output page of the Doxygen manual. It's pretty clear about how to do it, assuming I understood your question.



来源:https://stackoverflow.com/questions/6154848/use-of-doxygens-link-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!