填充额外的文件
另有几个文件要和内嵌源代码注释一起维护：<package>.types, <package>-docs.xml (原为 .sgml), <package>-sections.txt。

编辑类型文件
If your library or application includes GObjects, you want their signals, arguments/parameters and position in the hierarchy to be shown in the documentation. All you need to do, is to list the xxx_get_type functions together with their include inside the <package>.types file.

示例类型文件代码段

#include <gtk/gtk.h>

gtk_accel_label_get_type
gtk_adjustment_get_type
gtk_alignment_get_type
gtk_arrow_get_type

从GTK-Doc 1.8开始gtkdoc-scan能够自动生成这个列表。只要往Makefile.am文件中的SCAN_OPTIONS项加入“--rebuild-types”即可。如果你要使用它请保证不发行类型文件也不将它置于版本控制系统的管理之下。

编辑主文档
GTK-Doc 以 DocBook SGML/XML 格式生成文档。当处理源代码内嵌注释时， GTK-Doc 工具以独立文件为每个类或模块生成一个文档页。主文档包含了它们并且将它们按顺序排列。
While GTK-Doc creates a template master document for you, later runs will not touch it again. This means that one can freely structure the documentation. That includes grouping pages and adding extra pages. GTK-Doc has now a test suite, where also the master-document is recreated from scratch. Its a good idea to look at this from time to time to see if there are some new goodies introduced there.
不要把教程(tutorial)当作额外的文档来编写。写成额外的章节即可。把你的库教程直接放入API文档的好处就是教程与符号文档之间的链接很容易。另外教程与库一同升级时分离的机会也更高。
那么什么是主文档内部要修改的东西呢？开始只是一点点东西。有一些占位标识（在方括号内部的文本）你应当多留意。

主文档头部

<bookinfo>
  <title>MODULENAME Reference Manual</title>
  <releaseinfo>
    for MODULENAME [VERSION]
    The latest version of this documentation can be found on-line at
    <ulink role="online-location" url="http://[SERVER]/MODULENAME/index.html">http://[SERVER]/MODULENAME/</ulink>.
  </releaseinfo>
</bookinfo>

<chapter>
  <title>[Insert title here]</title>

In addition a few option elements are created in commented form. You can review these and enable them as you like.

Optional part in the master document

  <!-- enable this when you use gobject introspection annotations
  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
  -->

Finally you need to add new section whenever you introduce one. The gtkdoc-check tool will remind you of newly generated xml files that are not yet included into the doc.

Including generated sections

  <chapter>
    <title>my library</title>
      <xi:include href="xml/object.xml"/>
      ...

编辑节文件(section file)
节文件用于组织由GTK-Doc输出的文档。在此你指定哪个符号属于哪个类或模块，并控制它是否可见(公共的或私有的)。
The section file is a plain text file with tags delimiting sections. Blank lines are ignored and lines starting with a '#' are treated as comment lines.
While the tags make the file look like xml, it is not. Please do not close tags like <SUBSECTION>.

Including generated sections

<INCLUDE>libmeep/meep.h</INCLUDE>

<SECTION>
<FILE>meepapp</FILE>
<TITLE>MeepApp</TITLE>
MeepApp
<SUBSECTION Standard>
MEEP_APP
...
MeepAppClass
meep_app_get_type
</SECTION>

The <FILE> ... </FILE> tag is used to specify the file name, without any suffix. For example, using '<FILE>gnome-config</FILE>' will result in the section declarations being output in the template file tmpl/gnome-config.sgml, which will be converted into the DocBook XML file xml/gnome-config.sgml or the DocBook XML file xml/gnome-config.xml. (The name of the HTML file is based on the module name and the section title, or for GObjects it is based on the GObjects class name converted to lower case).
<TITLE> ... </TITLE>标记用于节的标题。它只在模板（如果使用的话）最初创建之前有用，因为设置在模板文件内的标题覆盖了它。或者如果你在源代码中使用了SECTION注释（此功能已过时）。
You can group items in the section by using the <SUBSECTION> tag. Currently it outputs a blank line between subsections in the synopsis section. You can also use <SUBSECTION Standard> for standard GObject declarations (e.g. the functions like g_object_get_type and macros like G_OBJECT(), G_IS_OBJECT() etc.). Currently these are left out of the documentation. You can also use <SUBSECTION Private> for private declarations which will not be output (it is a handy way to avoid warning messages about unused declarations). If your library contains private types which you don't want to appear in the object hierarchy and the list of implemented or required interfaces, add them to a Private subsection. Whether you would place GObject and GObjectClass like structs in public or Standard section depends if they have public entries (variables, vmethods).
You can also use <INCLUDE> ... </INCLUDE> to specify the #include files which are shown in the synopsis sections. It contains a comma-separate list of #include files, without the angle brackets. If you set it outside of any sections, it acts for all sections until the end of the file. If you set it within a section, it only applies to that section.