# DoxyGen文档三

## Step 2:运行doxygen

doxygen <config-file>

Doxygen将在输入目录下生成一个htmlrtflatexman目录，分别对应于HTMLRTF Unix-Man文件格式。

缺省的输出目录是doxygen的目录。使用OUTPUT_DIRECTORYHTML_OUTPUT, RTF_OUTPUTLATEX_OUTPUTMAN_OUTPUT可以进行修改。如果输出目录不存在，doxygen会创建出来。

The generated documentation must first be compiled by a compiler (I use teTeX distribution version 0.9 that contains version 3.14159). To simplify the process of compiling the generated documentation, doxygen writes a Makefile into the latex directory. By typing make in the latex directory the dvi file refman.dvi will be generated (provided that you have a make tool called make of course). This file can then be viewed using xdvi or converted into a PostScript file refman.ps by typing make ps (this requires dvips). To put 2 pages on one physical page use make ps_2on1 instead. The resulting PostScript file can be send to a PostScript printer. If you do not have a PostScript printer, you can try to use ghostscript to convert PostScript into something your printer understands. Conversion to PDF is also possible if you have installed the ghostscript interpreter; just type make pdf (or make pdf_2on1). To get the best results for PDF output you should set the PDF_HYPERLINKS tag to YES.

文档必须首先经过 编译器（我手头上的是teTeX version 0.9其中包括 version 3.14159）。

## Step 3: Documenting the sources为源码添加注释

Although documenting the source is presented as step 3, in a new project this should of course be step 1. Here I assume you already have some code and you want doxygen to generate a nice document describing the API and maybe the internals as well.

1.        memberclassnamespace之前添加special注释。对于fileclassnamespace members也直接可以在该member后添加注释。参考Special documentation blocks一章。

2.        在其他地方（另一个文件或位置）放置一个特殊的文档块并在此文档块中放置一个structural command。一个structural command in链接到、一个文档块到一个特定的可以documented（例如一个memberclassnamespacefile）。具体参考Documentation at other places一章。

parse的过程中有以下几步：

·         执行文档中的Special Commands

·         If a line starts with some whitespace followed by one or more asterisks (*) and then optionally more whitespace, then all whitespace and asterisks are removed.

·         空白行被认为是段的分隔符。无需再使用一个new-paragraph命令。

·         出现在文本中的单词，如果和documented类相匹配，就生成一个到documented类的链接。

·         Links to members are created when certain patterns are found in the text.参见Automatic link generation以获取有关自动创建链接。

·         HTML tags that are in the documentation are interpreted and converted to equivalents for the output. See section HTML Commands for an overview of all supported HTML tags.

• 0
点赞
• 0
收藏
• 打赏
• 0
评论
06-27
07-27
10-15
09-21
12-19

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

SigmaSys

¥2 ¥4 ¥6 ¥10 ¥20

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。