Modernizing the documentation
GTK-Doc has been around for quite some time. In this section we list new features together with the version since when it is available.

GTK-Doc 1.9
When using xml instead of sgml, one can actually name the master document <package>-docs.xml.
This version supports SCAN_OPTIONS=--rebuild-sections in Makefile.am. When this is enabled, the <package>-sections.txt is autogenerated and can be removed from the vcs. This only works nicely for projects that have a very regular structure (e.g. each .{c,h} pair will create new section). If one organize a project close to that updating a manually maintained section file can be as simple as running meld <package>-decl-list.txt <package>-sections.txt.
Version 1.8 already introduced the syntax for documenting sections in the sources instead of the separate files under tmpl. This version adds options to switch the whole doc module to not use the extra tmpl build step at all, by using --flavour no-tmpl in configure.ac. If you don't have a tmpl checked into your source control system and haven't yet switched, just add the flag to configure.ac and you are done.

GTK-Doc 1.10
This version supports SCAN_OPTIONS=--rebuild-types in Makefile.am. When this is enabled, the <package>.types is autogenerated and can be removed from the vcs. When using this feature it is important to also setup the IGNORE_HFILES in Makefile.am for code that is build conditionally.

GTK-Doc 1.16
This version includes a new tool called gtkdoc-check. This tool can run a set of sanity checks on your documentation. It is enabled by adding these lines to the end of Makefile.am.

Enable gtkdoc-check

if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = \
  DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
TESTS = $(GTKDOC_CHECK)
endif

GTK-Doc 1.20
Version 1.18 brought some initial markdown support. Using markdown in doc comments is less intrusive than writing docbook xml. This version improves a lot on this and add a lot more styles. The section that explains the comment syntax has all the details.

GTK-Doc 1.25
The makefiles shipped with this version generate an entity file at xml/gtkdocentities.ent, containing entities for e.g. package_name and package_version. You can use this e.g. in the main xml file to avoid hardcoding the version number. Below is an example that shows how the entity file is included in the master template and how the entities are used. The entities can also be used in all generated files, GTK-Doc will use the same xml header in generated xml files.

Use pre-generated entities

<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
  <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
  %gtkdocentities;
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
  <bookinfo>
    <title>&package_name; Reference Manual</title>
    <releaseinfo>
      for &package_string;.
      The latest version of this documentation can be found on-line at
      <ulink role="online-location" url="http://[SERVER]/&package_name;/index.html">http://[SERVER]/&package_name;/</ulink>.
    </releaseinfo>
  </bookinfo>