The Crash Course to DocBook

10.4. Describing an API

DocBook has a rather detailed way of marking up descriptions of function behaviour. The tag that introduces it is <funcsynopsis>. Here is an example:

Example 10-8. Describing a function in a C library API

<funcsynopsisinfo>#include <stdlib.h></funcsynopsisinfo>
<funcdef>double <function>atof</function></funcdef>
<paramdef>const char *<parameter>nptr</parameter></paramdef>

Here is how it looks:

#include <stdlib.h>

double atof(const char *nptr);