mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 08:49:30 +00:00
cookbook: Made docbook element usage consistent
Made usage of docbook elements consistent across recipes; to ensure the conventions are kept by others, added a section about how to write and style recipes.
This commit is contained in:
@ -49,9 +49,60 @@
|
||||
<appendix id="contributing">
|
||||
<title>Contributing to this document</title>
|
||||
|
||||
<para>This document is written in Docbook XML. The source file for this
|
||||
document is located in the subdirectory "doc/cookbook" of the source
|
||||
directory of Clutter.</para>
|
||||
<para>This document is written in
|
||||
<link url="http://docbook.org/">Docbook XML</link>. The source files
|
||||
for this document are located in the subdirectory
|
||||
<filename>doc/cookbook</filename> inside the Clutter source directory.</para>
|
||||
|
||||
<para>To maintain some degree of consistency, try to stick to the
|
||||
following broad guidelines about how to write Docbook for this
|
||||
cookbook:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>If adding a new recipe, use the
|
||||
<filename>recipe-template.xml</filename> XML file as a basis.
|
||||
You can find it in the <filename><clutter_source>/doc/cookbook/</filename>
|
||||
directory.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Try to indent your XML sensibly using 2 spaces per level
|
||||
(we're not too strict, but some indentation helps reading
|
||||
the source).</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Stick to a column width of around 80 characters.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Use the <filename> element for file
|
||||
and directory names.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Use the <property> element for property names
|
||||
(e.g. GObject properties).</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Use the <type> element for GObject class
|
||||
names.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Use the <constant> element for C defines.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Use the <keycap> element for keys, where
|
||||
you are referring to what's actually printed on the key, e.g.
|
||||
<keycap>Shift</keycap>. If you're referring to the key some
|
||||
other way (e.g. "the Control key"), don't use
|
||||
<keycap>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Use the <function> element for functions;
|
||||
the style adopted is to give the function name followed by
|
||||
empty brackets, e.g. <function>clutter_actor_set_size()</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</appendix>
|
||||
|
||||
</book>
|
||||
|
Reference in New Issue
Block a user