有用的DocBook标记
这些是在编写代码文档时非常有用处的DocBook标记。
To link to another section in the GTK docs:
<link linkend="glib-Hash-Tables">Hash Tables</link>
引用一个外部函数,比如一个标准 C 函数:
<function>...</function>
要包含示例代码:
<example> <title>Using a GHashTable.</title> <programlisting> ... </programlisting> </example>
<informalexample> <programlisting> ... </programlisting> </informalexample>
要包含符号列表:
<itemizedlist> <listitem> <para> ... </para> </listitem> <listitem> <para> ... </para> </listitem> </itemizedlist>
要包含一条文字中突出显示的注解:
<note> <para> Make sure you free the data after use. </para> </note>
要引用一个类型:
<type>unsigned char</type>
引用一个外部结构(不是在GTK 文档中描述的):
<structname>XFontStruct</structname>
要引用一个结构字段:
<structfield>len</structfield>
要引用一个类的名字,你可能会使用:
<classname>GtkWidget</classname>
要强调文本:
<emphasis>This is important</emphasis>
对于文件名,使用:
<filename>/home/user/documents</filename>
要引用键值,使用:
<keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>