source: trunk/third/gtk-doc/doc/authors.txt @ 20745

Revision 20745, 3.2 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20744, which included commits to RCS files with non-trunk default branches.
Line 
1
2General
3=======
4
5The files to edit manually are generated in the tmpl/ directory.
6Remember to use &lt; or &gt; instead of '<' and '>', in these files.
7
8The first part of each function/macro/struct etc. description should be
9a very short summary of what it is. This may be used at some point to
10produce a short reference guide which can be printed out.
11
12For macros which return a value just like a function, you must manually
13add a '@Returns: ' field.
14
15You may want to rearrange the functions/macros etc. to split them into
16related sections. To do this rearrange the MODULE-sections.txt
17files. You can also add <SUBSECTION> between functions. Currently this just
18results in a blank line between them in the synopsis.
19
20
21Abbreviations
22=============
23
24These are expanded into appropriate DocBook tags, saving a lot of typing.
25I've used the Gnome ones (see gnome.txt) but also added '#'.
26
27  Use function() to refer to functions or macros which take arguments.
28
29  Use @param to refer to parameters. (I've also used this when referring to
30  parameters of other functions, related to the one being described.)
31
32  Use %constant to refer to a constant, e.g. %G_TRAVERSE_LEAFS.
33
34  Use #symbol to refer to other types of symbol, e.g. structs and enums
35    and macros which don't take arguments.
36
37
38
39Useful DocBook Tags
40===================
41
42These are the DocBook tags which I have used or I think could be useful.
43Let me know if I'm doing something wrong!
44
45
46To link to another section in the GTK docs:
47
48    <link linkend="glib-Hash-Tables">Hash Tables</link>
49
50  The linkend is the SGML id on the top item of the page you want to link to.
51  For most pages this is currently the part ("gtk", "gdk", glib") and then
52  the page title ("Hash Tables"). For widgets it is just the class name.
53  Spaces and underscores are converted to '-' to conform to SGML.
54
55
56To refer to an external function, e.g. a standard C function:
57
58    <function>...</function>
59
60
61To include example code:
62
63    <example>
64    <title>Using a GHashTable.</title>
65    <programlisting>
66      ...
67    </programlisting>
68    </example>
69
70  or possibly this, for very short code fragments which don't need a title:
71
72    <informalexample>
73    <programlisting>
74      ...
75    </programlisting>
76    </informalexample>
77
78
79To include bulleted lists:
80
81    <itemizedlist>
82
83    <listitem>
84    <para>
85      ...
86    </para>
87    </listitem>
88
89    <listitem>
90    <para>
91      ...
92    </para>
93    </listitem>
94
95    </itemizedlist>
96
97
98To include a note which stands out from the text:
99
100    <note>
101    <para>
102      Make sure you free the data after use.
103    </para>
104    </note>
105
106To refer to a type:
107
108    <type>unsigned char</type>
109
110
111To refer to an external structure (not one described in the GTK docs):
112
113    <structname>XFontStruct</structname>
114
115
116To refer to a field of a structure:
117
118    <structfield>len</structfield>
119
120
121To refer to a class name, we could possibly use:
122
123    <classname>GtkWidget</classname>
124
125  but you'll probably be using #GtkWidget instead (to automatically create
126  a link to the GtkWidget page - see the abbreviations above).
127
128
129To emphasize text:
130
131    <emphasis>This is important</emphasis>
132
133  but I haven't been using it so far.
134
135
136For filenames use:
137
138    <filename>c:\windows</filename>
139
Note: See TracBrowser for help on using the repository browser.