1 <chapter id="documentation">
2 <title>Documenting Wine</title>
3 <para>How to help out with the Wine documentation effort...</para>
6 <title>Writing Wine API Documentation</title>
9 Written by &name-douglas-ridgway; <email>&email-douglas-ridgway;</email>
12 (Extracted from <filename>wine/documentation/README.documentation</filename>)
16 To improve the documentation of the Wine API, just add
17 comments to the existing source. For example,
20 /******************************************************************
21 * CopyMetaFileA (GDI32.23)
23 * Copies the metafile corresponding to hSrcMetaFile to either
24 * a disk file, if a filename is given, or to a new memory based
25 * metafile, if lpFileName is NULL.
29 * Handle to metafile copy on success, NULL on failure.
33 * Copying to disk returns NULL even if successful.
35 HMETAFILE WINAPI CopyMetaFileA(
36 HMETAFILE hSrcMetaFile, /* handle of metafile to copy */
37 LPCSTR lpFilename /* filename if copying to a file */
41 becomes, after processing with <command>c2man</command> and
42 <command>nroff -man</command>,
45 CopyMetaFileA(3w) CopyMetaFileA(3w)
49 CopyMetaFileA (GDI32.23)
52 HMETAFILE CopyMetaFileA
54 HMETAFILE hSrcMetaFile,
59 HMETAFILE hSrcMetaFile
60 Handle of metafile to copy.
63 Filename if copying to a file.
66 Copies the metafile corresponding to hSrcMetaFile to
67 either a disk file, if a filename is given, or to a new
68 memory based metafile, if lpFileName is NULL.
71 Handle to metafile copy on success, NULL on failure.
74 Copying to disk returns NULL even if successful.
77 GetMetaFileA(3w), GetMetaFileW(3w), CopyMetaFileW(3w),
78 PlayMetaFile(3w), SetMetaFileBitsEx(3w), GetMetaFileBit-
83 <sect1 id="wine-docbook">
84 <title>The Wine DocBook System</title>
87 Written by &name-john-sheets; <email>&email-john-sheets;</email>
90 <sect2 id="writing-docbook">
91 <title>Writing Documentation with DocBook</title>
94 DocBook is a flavor of <acronym>SGML</acronym>
95 (<firstterm>Standard Generalized Markup
96 Language</firstterm>), a syntax for marking up the contents
97 of documents. HTML is another very common flavor of SGML;
98 DocBook markup looks very similar to HTML markup, although
99 the names of the markup tags differ.
103 <title>Terminology</title>
106 SGML markup contains a number of syntactical elements that
107 serve different purposes in the markup. We'll run through
108 the basics here to make sure we're on the same page when
109 we refer to SGML semantics.
112 The basic currency of SGML is the
113 <firstterm>tag</firstterm>. A simple tag consists of a
114 pair of angle brackets and the name of the tag. For
115 example, the <sgmltag>para</sgmltag> tag would appear in
116 an SGML document as <sgmltag
117 class="starttag">para</sgmltag>. This start tag indicates
118 that the immediately following text should be classified
119 according to the tag. In regular SGML, each opening tag
120 must have a matching end tag to show where the start tag's
121 contents end. End tags begin with
122 <quote><literal></</literal></quote> markup, e.g.,
123 <sgmltag class="endtag">para</sgmltag>.
126 The combination of a start tag, contents, and an end tag
127 is called an <firstterm>element</firstterm>. SGML
128 elements can be nested inside of each other, or contain
129 only text, or may be a combination of both text and other
130 elements, although in most cases it is better to limit
131 your elements to one or the other.
134 The <acronym>XML</acronym> (<firstterm>eXtensible Markup
135 Language</firstterm>) specification, a modern subset of
136 the SGML specification, adds a so-called <firstterm>empty
137 tag</firstterm>, for elements that contain no text
138 content. The entire element is a single tag, ending with
139 <quote><literal>/></literal></quote>, e.g.,
140 <sgmltag><xref/></sgmltag>. However, use of this
141 tag style restricts you to XML DocBook processing, and
142 your document may no longer compile with SGML-only
145 <!-- *** Note: We could normally use the "emptytag"
146 attribute for XML empty tags, but that's only a recent
147 addition, and we don't want to screw up documents
148 generated against older stylesheets.
151 Often a processing system will need more information about
152 an element than you can provide with just tags. SGML
153 allows you to add extra <quote>hints</quote> in the form
154 of SGML <firstterm>attributes</firstterm> to pass along
155 this information. The most common use of attributes in
156 DocBook is giving specific elements a name, or an ID, so
157 you can refer to it from elsewhere. This ID can be used
158 for many things, including file-naming for HTML output,
159 hyper-linking to specific parts of the document, and even
160 pulling text from that element (see the <sgmltag
161 class="starttag">xref</sgmltag> tag).
164 An SGML attribute appears inside the start tag, between
165 the < and > brackets. For example, if you wanted to
166 set the <sgmltag class="attribute">id</sgmltag> attribute
167 of the <sgmltag class="starttag">book</sgmltag> element to
168 <quote>mybook</quote>, you would create a start tag like
169 this: <programlisting><book id="mybook"></programlisting>
172 Notice that the contents of the attribute are enclosed in
173 quote marks. These quotes are optional in SGML, but
174 mandatory in XML. It's a good habit to use quotes, as it
175 will make it much easier to migrate your documents to an
176 XML processing system later on.
179 You can also specify more than one attribute in a single
180 tag: <programlisting><book id="mybook" status="draft"></programlisting>
183 Another commonly used type of SGML markup is the
184 <firstterm>entity</firstterm>. An entity lets you
185 associate a block of text with a name. You declare the
186 entity once, at the beginning of your document, and can
187 invoke it as many times as you like throughout the
188 document. You can use entities as shorthand, or to make
189 it easier to maintain certain phrases in a central
190 location, or even to insert the contents of an entire file
194 An entity in your document is always surrounded by the
195 <quote>&</quote> and <quote>;</quote> characters. One
196 entity you'll need sooner or later is the one for the
197 <quote><</quote> character. Since SGML expects all
198 tags to begin with a <quote><</quote>, the
199 <quote><</quote> is a reserved character. To use it in
200 your document (as I am doing here), you must insert it
201 with the <literal>&lt;</literal> entity. Each time
202 the SGML processor encounters <literal>&lt;</literal>,
203 it will place a literal <quote><</quote> in the output
204 document. Similarly you must use the <literal>&gt;</literal>
205 and <literal>&amp;</literal> entities for the
206 <quote>></quote> and <quote>&</quote> characters.
209 The final term you'll need to know when writing simple
210 DocBook documents is the <acronym>DTD</acronym>
211 (<firstterm>Document Type Declaration</firstterm>). The
212 DTD defines the flavor of SGML a given document is written
213 in. It lists all the legal tag names, like <sgmltag
214 class="starttag">book</sgmltag>, <sgmltag
215 class="starttag">para</sgmltag>, and so on, and declares
216 how those tags are allowed to be used together. For
217 example, it doesn't make sense to put a <sgmltag
218 class="starttag">book</sgmltag> element inside a <sgmltag
219 class="starttag">para</sgmltag> paragraph element -- only
223 The DTD thus defines the legal structure of the document.
224 It also declares which attributes can be used with which
225 tags. The SGML processing system can use the DTD to make
226 sure the document is laid out properly before attempting
227 to process it. SGML-aware text editors like <link
228 linkend="emacs-psgml">Emacs</link> can also use the DTD to
229 guide you while you write, offering you choices about
230 which tags you can add in different places in the
231 document, and beeping at you when you try to add a tag
232 where it doesn't belong.
235 Generally, you will declare which DTD you want to use as
236 the first line of your SGML document. In the case of
237 DocBook, you will use something like this:
238 <programlisting><!doctype book PUBLIC "-//OASIS//DTD
239 DocBook V3.1//EN" []> <book> ...
240 </book></programlisting>
243 Note that you must specify your toplevel element inside
244 the doctype declaration. If you were writing an article
245 rather than a book, you might use this declaration instead:
246 <programlisting><!doctype article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" []>
249 </article></programlisting>
253 <sect3 id="sgml-document">
254 <title>The Document</title>
256 Once you're comfortable with SGML, creating a DocBook
257 document is quite simple and straightforward. Even
258 though DocBook contains over 300 different tags, you can
259 usually get by with only a small subset of those tags.
260 Most of them are for inline formatting, rather than for
261 document structuring. Furthermore, the common tags have
262 short, intuitive names.
265 Below is a (completely nonsensical) example to illustrate
266 how a simple document might be laid out. Notice that all
267 <sgmltag class="starttag">chapter</sgmltag> and <sgmltag
268 class="starttag">sect1</sgmltag> elements have <sgmltag
269 class="attribute">id</sgmltag> attributes. This is not
270 mandatory, but is a good habit to get into, as DocBook is
271 commonly converted into HTML, with a separate generated
272 file for each <sgmltag class="starttag">book</sgmltag>,
273 <sgmltag class="starttag">chapter</sgmltag>, and/or <sgmltag
274 class="starttag">sect1</sgmltag> element. If the given
275 element has an <sgmltag class="attribute">id</sgmltag>
276 attribute, the processor will typically name the file
277 accordingly. Thus, the below document might result in
278 <filename>index.html</filename>,
279 <filename>chapter-one.html</filename>,
280 <filename>blobs.html</filename>, and so on.
283 Also notice the text marked off with <quote><!--
284 </quote> and <quote> --></quote> characters. These
285 denote SGML comments. SGML processors will completely
286 ignore anything between these markers, similar to
287 <quote>/*</quote> and <quote>*/</quote> comments in C
291 <!-- Encase the following SGML excerpt inside a CDATA
292 block so we don't have to bother converting all
297 <!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" []>
300 <title>A Poet's Guide to Nonsense</title>
303 <chapter id="chapter-one">
304 <title>Blobs and Gribbles</title>
306 <!-- This section contains only one major topic -->
308 <title>The Story Behind Blobs</title>
310 Blobs are often mistaken for ice cubes and rain
315 <!-- This section contains embedded sub-sections -->
316 <sect1 id="gribbles">
317 <title>Your Friend the Gribble</title>
319 A Gribble is a cute, unassuming little fellow...
322 <sect2 id="gribble-temperament">
323 <title>Gribble Temperament</title>
325 When left without food for several days...
329 <sect2 id="gribble-appearance">
330 <title>Gribble Appearance</title>
332 Most Gribbles have a shock of white fur running from...
338 <chapter id="chapter-two">
339 <title>Phantasmagoria</title>
341 <sect1 id="dretch-pools">
342 <title>Dretch Pools</title>
345 When most poets think of Dretch Pools, they tend to...
355 <title>Common Elements</title>
357 Once you get used to the syntax of SGML, the next hurdle
358 in writing DocBook documentation is to learn the many
359 DocBook-specific tag names, and when to use them. DocBook
360 was created for technical documentation, and as such, the
361 tag names and document structure are slanted towards the
362 needs of such documentation.
365 To cover its target audience, DocBook declares a wide
366 variety of specialized tags, including tags for formatting
367 source code (with somewhat of a C/C++ bias), computer
368 prompts, GUI application features, keystrokes, and so on.
369 DocBook also includes tags for universal formatting needs,
370 like headers, footnotes, tables, and graphics.
373 We won't cover all of these elements here (over 300
374 DocBook tags exist!), but we will cover the basics. To
375 learn more about the other tags, check out the official
376 DocBook guide, at <ulink
377 url="http://docbook.org">http://docbook.org</ulink>. To
378 see how they are used in practice, download the SGML
379 source for this manual (the Wine Developer Guide) and
380 browse through it, comparing it to the generated HTML (or
384 There are often many correct ways to mark up a given piece
385 of text, and you may have to make guesses about which tag
386 to use. Sometimes you'll have to make compromises.
387 However, remember that it is possible to further <link
388 linkend="docbook-tweaking">customize the output</link> of
389 the SGML processors. If you don't like the way a certain
390 tag looks in HTML, that doesn't mean you should choose a
391 different tag based on its output formatting. The
392 processing stylesheets can be altered to fix the
393 formatting of that same tag everywhere in the document
394 (not just in the place you're working on). For example,
395 if you're frustrated that the <sgmltag
396 class="starttag">systemitem</sgmltag> tag doesn't produce
397 any formatting by default, you should fix the stylesheets,
398 not change the valid <sgmltag
399 class="starttag">systemitem</sgmltag> tag to, for example,
400 an <sgmltag class="starttag">emphasis</sgmltag> tag.
403 Here are the common SGML elements:
407 <title>Structural Elements</title>
409 <term><sgmltag class="starttag">book</sgmltag></term>
412 The book is the most common toplevel element, and is
413 probably the one you should use for your document.
418 <term><sgmltag class="starttag">set</sgmltag></term>
421 If you want to group more than one book into a
422 single unit, you can place them all inside a set.
423 This is useful when you want to bundle up
424 documentation in alternate ways. We do this with
425 the Wine documentation, using a <sgmltag
426 class="starttag">set</sgmltag> to put everything
427 into a single directory (see
428 <filename>documentation/wine-doc.sgml</filename>),
429 and a <sgmltag class="starttag">book</sgmltag> to
430 put each Wine guide into a separate directory (see
431 <filename>documentation/wine-devel.sgml</filename>,
437 <term><sgmltag class="starttag">chapter</sgmltag></term>
440 A <sgmltag class="starttag">chapter</sgmltag>
441 element includes a single entire chapter of the
447 <term><sgmltag class="starttag">part</sgmltag></term>
450 If the chapters in your book fall into major
451 categories or groupings (as in the Wine Developer
452 Guide), you can place each collection of chapters
453 into a <sgmltag class="starttag">part</sgmltag>
459 <term><sgmltag class="starttag">sect?</sgmltag></term>
462 DocBook has many section elements to divide the
463 contents of a chapter into smaller chunks. The
464 encouraged approach is to use the numbered section
465 tags, <sgmltag class="starttag">sect1</sgmltag>,
466 <sgmltag class="starttag">sect2</sgmltag>, <sgmltag
467 class="starttag">sect3</sgmltag>, <sgmltag
468 class="starttag">sect4</sgmltag>, and <sgmltag
469 class="starttag">sect5</sgmltag> (if necessary).
470 These tags must be nested in order: you can't place
471 a <sgmltag class="starttag">sect3</sgmltag> directly
472 inside a <sgmltag class="starttag">sect1</sgmltag>.
473 You have to nest the <sgmltag
474 class="starttag">sect3</sgmltag> inside a <sgmltag
475 class="starttag">sect2</sgmltag>, and so forth.
476 Documents with these explicit section groupings are
477 easier for SGML processors to deal with, and lead to
478 better organized documents. DocBook also supplies a
479 <sgmltag class="starttag">section</sgmltag> element
480 which you can nest inside itself, but its use is
481 discouraged in favor of the numbered section tags.
486 <term><sgmltag class="starttag">title</sgmltag></term>
489 The title of a book, chapter, part, section, etc.
490 In most of the major structural elements, like
491 <sgmltag class="starttag">chapter</sgmltag>,
492 <sgmltag class="starttag">part</sgmltag>, and the
493 various section tags, <sgmltag
494 class="starttag">title</sgmltag> is mandatory. In
495 other elements like <sgmltag
496 class="starttag">book</sgmltag> and <sgmltag
497 class="starttag">note</sgmltag>, it's optional.
502 <term><sgmltag class="starttag">para</sgmltag></term>
505 The basic unit of text is the paragraph, represented
506 by the <sgmltag class="starttag">para</sgmltag> tag.
507 This is probably the tag you'll use most often. In
508 fact, in a simple document, you can probably get
509 away with using only <sgmltag
510 class="starttag">book</sgmltag>, <sgmltag
511 class="starttag">chapter</sgmltag>, <sgmltag
512 class="starttag">title</sgmltag>, and <sgmltag
513 class="starttag">para</sgmltag>.
518 <term><sgmltag class="starttag">article</sgmltag></term>
521 For shorter, more targeted documents, like topic
522 pieces and whitepapers, you can use <sgmltag
523 class="starttag">article</sgmltag> as your toplevel
531 <title>Inline Formatting Elements</title>
533 <term><sgmltag class="starttag">filename</sgmltag></term>
536 The name of a file. You can optionally set the
537 <sgmltag class="attribute">class</sgmltag> attribute
538 to <literal>Directory</literal>,
539 <literal>HeaderFile</literal>, and
540 <literal>SymLink</literal> to further classify the
546 <term><sgmltag class="starttag">userinput</sgmltag></term>
549 Literal text entered by the user.
554 <term><sgmltag class="starttag">computeroutput</sgmltag></term>
557 Literal text output by the computer.
562 <term><sgmltag class="starttag">literal</sgmltag></term>
565 A catch-all element for literal computer data. Its
566 use is somewhat vague; try to use a more specific
567 tag if possible, like <sgmltag
568 class="starttag">userinput</sgmltag> or <sgmltag
569 class="starttag">computeroutput</sgmltag>.
574 <term><sgmltag class="starttag">quote</sgmltag></term>
577 An inline quotation. This tag typically inserts
578 quotation marks for you, so you would write <sgmltag
579 class="starttag">quote</sgmltag>This is a
580 quote<sgmltag class="endtag">quote</sgmltag> rather
581 than "This is a quote". This usage may be a little
582 bulkier, but it does allow for automated formatting
583 of all quoted material in the document. Thus, if
584 you wanted all quotations to appear in italic, you
585 could make the change once in your stylesheet,
586 rather than doing a search and replace throughout
587 the document. For larger chunks of quoted text, you
589 class="starttag">blockquote</sgmltag>.
594 <term><sgmltag class="starttag">note</sgmltag></term>
597 Insert a side note for the reader. By default, the
598 SGML processor usually prefixes the content with
599 "Note:". You can change this text by adding a
600 <sgmltag class="starttag">title</sgmltag> element.
601 Thus, to add a visible FIXME comment to the
602 documentation, you might write:
608 <para>This section needs more info about...</para>
612 The results will look something like this:
616 <para>This section needs more info about...</para>
621 <term><sgmltag class="starttag">sgmltag</sgmltag></term>
624 Used for inserting SGML tags, etc., into a SGML
625 document without resorting to a lot of entity
626 quoting, e.g., &lt;. You can change the
627 appearance of the text with the <sgmltag
628 class="attribute">class</sgmltag> attribute. Some
629 common values of this are
630 <literal>starttag</literal>,
631 <literal>endtag</literal>,
632 <literal>attribute</literal>,
633 <literal>attvalue</literal>, and even
634 <literal>sgmlcomment</literal>. See this SGML file,
635 <filename>documentation/documentation.sgml</filename>,
641 <term><sgmltag class="starttag">prompt</sgmltag></term>
644 The text used for a computer prompt, for example a
645 shell prompt, or command-line application prompt.
650 <term><sgmltag class="starttag">replaceable</sgmltag></term>
653 Meta-text that should be replaced by the user, not
654 typed in literally, e.g., in command descriptions
655 and <parameter>--help</parameter> outputs.
660 <term><sgmltag class="starttag">constant</sgmltag></term>
663 A programming constant, e.g.,
664 <constant>MAX_PATH</constant>.
669 <term><sgmltag class="starttag">symbol</sgmltag></term>
672 A symbolic value replaced, for example, by a
673 pre-processor. This applies primarily to C macros,
674 but may have other uses. Use the <sgmltag
675 class="starttag">constant</sgmltag> tag instead of
676 <sgmltag class="starttag">symbol</sgmltag> where
682 <term><sgmltag class="starttag">function</sgmltag></term>
685 A programming function name.
690 <term><sgmltag class="starttag">parameter</sgmltag></term>
693 Programming language parameters you pass with a
699 <term><sgmltag class="starttag">option</sgmltag></term>
702 Parameters you pass to a command-line executable.
707 <term><sgmltag class="starttag">varname</sgmltag></term>
710 Variable name, typically in a programming language.
715 <term><sgmltag class="starttag">type</sgmltag></term>
718 Programming language types, e.g., from a typedef
719 definition. May have other uses, too.
724 <term><sgmltag class="starttag">structname</sgmltag></term>
727 The name of a C-language <type>struct</type>
728 declaration, e.g., <structname>sockaddr</structname>.
733 <term><sgmltag class="starttag">structfield</sgmltag></term>
736 A field inside a C <type>struct</type>.
741 <term><sgmltag class="starttag">command</sgmltag></term>
744 An executable binary, e.g., <command>wine</command>
745 or <command>ls</command>.
750 <term><sgmltag class="starttag">envar</sgmltag></term>
753 An environment variable, e.g, <envar>$PATH</envar>.
758 <term><sgmltag class="starttag">systemitem</sgmltag></term>
761 A generic catch-all for system-related things, like
762 OS names, computer names, system resources, etc.
767 <term><sgmltag class="starttag">email</sgmltag></term>
770 An email address. The SGML processor will typically
771 add extra formatting characters, and even a
772 <literal>mailto:</literal> link for HTML pages.
774 class="starttag">email</sgmltag>user@host.com<sgmltag
775 class="endtag">email</sgmltag>
780 <term><sgmltag class="starttag">firstterm</sgmltag></term>
783 Special emphasis for introducing a new term. Can
784 also be linked to a <sgmltag
785 class="starttag">glossary</sgmltag> entry, if
793 <title>Item Listing Elements</title>
795 <term><sgmltag class="starttag">itemizedlist</sgmltag></term>
798 For bulleted lists, no numbering. You can tweak the
799 layout with SGML attributes.
804 <term><sgmltag class="starttag">orderedlist</sgmltag></term>
807 A numbered list; the SGML processor will insert the
808 numbers for you. You can suggest numbering styles
810 class="attribute">numeration</sgmltag> attribute.
815 <term><sgmltag class="starttag">simplelist</sgmltag></term>
818 A very simple list of items, often inlined. Control
819 the layout with the <sgmltag
820 class="attribute">type</sgmltag> attribute.
825 <term><sgmltag class="starttag">variablelist</sgmltag></term>
828 A list of terms with definitions or descriptions,
836 <title>Block Text Quoting Elements</title>
838 <term><sgmltag class="starttag">programlisting</sgmltag></term>
841 Quote a block of source code. Typically highlighted
842 in the output and set off from normal text.
847 <term><sgmltag class="starttag">screen</sgmltag></term>
850 Quote a block of visible computer output, like the
851 output of a command or chunks of debug logs.
858 <title>Hyperlink Elements</title>
860 <term><sgmltag class="starttag">link</sgmltag></term>
863 Generic hypertext link, used for pointing to other
864 sections within the current document. You supply
865 the visible text for the link, plus the name of the <sgmltag
866 class="attribute">id</sgmltag> attribute of the
867 element that you want to link to. For example:
868 <programlisting><link linkend="configuring-wine">the section on configuring wine</link>
870 <sect2 id="configuring-wine">
876 <term><sgmltag class="starttag">xref</sgmltag></term>
879 In-document hyperlink that can generate its own
880 text. Similar to the <sgmltag
881 class="starttag">link</sgmltag> tag, you use the
882 <sgmltag class="attribute">linkend</sgmltag>
883 attribute to specify which target element you want
887 <programlisting><xref linkend="configuring-wine">
889 <sect2 id="configuring-wine">
893 By default, most SGML processors will autogenerate
894 some generic text for the <sgmltag
895 class="starttag">xref</sgmltag> link, like
896 <quote>Section 2.3.1</quote>. You can use the
897 <sgmltag class="attribute">endterm</sgmltag>
898 attribute to grab the visible text content of the
899 hyperlink from another element:
902 <programlisting><xref linkend="configuring-wine" endterm="config-title">
904 <sect2 id="configuring-wine">
905 <title id="config-title">Configuring Wine</title>
909 This would create a link to the
910 <symbol>configuring-wine</symbol> element,
911 displaying the text of the
912 <symbol>config-title</symbol> element for the
913 hyperlink. Most often, you'll add an <sgmltag
914 class="attribute">id</sgmltag> attribute to the
915 <sgmltag class="starttag">title</sgmltag> of the
916 section you're linking to, as above, in which case
917 the SGML processor will use the target's title text
921 Alternatively, you can use an <sgmltag
922 class="attribute">xreflabel</sgmltag> attribute in
923 the target element tag to specify the link text:
925 <programlisting><sect1 id="configuring-wine" xreflabel="Configuring Wine"></programlisting>
928 <sgmltag class="starttag">xref</sgmltag> is an
929 empty element. You don't need a closing tag for
930 it (this is defined in the DTD). In SGML
931 documents, you should use the form <sgmltag
932 class="starttag">xref</sgmltag>, while in XML
933 documents you should use
934 <sgmltag><xref/></sgmltag>.
940 <term><sgmltag class="starttag">anchor</sgmltag></term>
943 An invisible tag, used for inserting <sgmltag
944 class="attribute">id</sgmltag> attributes into a
945 document to link to arbitrary places (i.e., when
946 it's not close enough to link to the top of an
952 <term><sgmltag class="starttag">ulink</sgmltag></term>
955 Hyperlink in URL form, e.g., <ulink
956 url="http://www.winehq.com">http://www.winehq.com</ulink>.
961 <term><sgmltag class="starttag">olink</sgmltag></term>
964 Indirect hyperlink; can be used for linking to
965 external documents. Not often used in practice.
973 <title>Multiple SGML files</title>
975 How to split an SGML document into multiple files...
980 <sect2 id="sgml-environment">
981 <title>The SGML Environment</title>
984 You can write SGML/DocBook documents in any text editor you
985 might find (although as we'll find in <xref
986 linkend="emacs-psgml">, some editors are more friendly for
987 this task than others). However, if you want to convert
988 those documents into a more friendly form for reading, such
989 as HTML, PostScript, or PDF, you will need a working SGML
990 environment. This section attempts to lay out the various
991 SGML rendering systems, and how they are set up on the
992 popular Linux distributions.
996 <title>DSSSL Environment</title>
998 Explain tools and methodologies..
1003 <title>XSLT Environment</title>
1005 Explain tools and methodologies...
1010 <title>SGML on Redhat</title>
1012 Most Linux distributions have everything you need already
1013 bundled up in package form. Unfortunately, each
1014 distribution seems to handle its SGML environment
1015 differently, installing it into different paths, and
1016 naming its packages according to its own whims.
1019 The following packages seems to be sufficient for RedHat 7.1. You
1020 will want to be careful about the order in which you install the
1023 <listitem><para>sgml-common-*.rpm</para></listitem>
1024 <listitem><para>openjade-*.rpm</para></listitem>
1025 <listitem><para>perl-SGMLSpm-*.rpm</para></listitem>
1026 <listitem><para>docbook-dtd*.rpm</para></listitem>
1027 <listitem><para>docbook-style-dsssl-*.rpm</para></listitem>
1028 <listitem><para>tetex-*.rpm</para></listitem>
1029 <listitem><para>jadetex-*.rpm</para></listitem>
1030 <listitem><para>docbook-utils-*.rpm</para></listitem>
1032 You can also use ghostscript to view the ps format output and
1033 Adobe Acrobat 4 to view the pdf file.
1038 <title>SGML on Debian</title>
1040 List package names and install locations...
1045 <title>SGML on Other Distributions</title>
1047 List package names and install locations...
1052 <sect2 id="emacs-psgml">
1053 <title>PSGML Mode in Emacs</title>
1055 Although you can write SGML documentation in any simple text
1056 editor, some editors provide extra support for entering SGML
1057 tags, and for verifying that the SGML you create is valid.
1058 SGML has been around for a long time, and many commercial
1059 editors exist for it; however, until recently open source
1060 SGML editors have been scarce.
1063 <title>FIXME</title>
1065 List the available commercial and open source SGML
1070 The most commonly used open source SGML editor is Emacs,
1071 with the PSGML <firstterm>mode</firstterm>, or extension.
1072 Emacs does not supply a GUI or WYSIWYG (What You See Is What
1073 You Get) interface, but it does provide many helpful
1074 shortcuts for creating SGML, as well as automatic
1075 formatting, validity checking, and the ability to create
1076 your own macros to simplify complex, repetitive actions.
1077 We'll touch briefly on each of these points.
1080 The first thing you need is a working installation of Emacs
1081 (or XEmacs), with the PSGML package. Most Linux
1082 distributions provide both as easy-to-install packages.
1085 Next, you'll need a working SGML environment. See <xref
1086 linkend="sgml-environment"> for more info on setting that
1091 <sect2 id="docbook-build">
1092 <title>The DocBook Build System</title>
1094 <sect3 id="docbook-infrastructure">
1095 <title>Basic Infrastructure</title>
1097 How the build/make system works (makefiles, db2html,
1098 db2html-winehq, jade, stylesheets).
1102 <sect3 id="docbook-tweaking">
1103 <title>Tweaking the DSSSL stylesheets</title>
1105 Things you can tweak, and how to do it (examples from
1106 default.dsl and winehq.dsl).
1110 <sect3 id="docbook-generating">
1111 <title>Generating docs for Wine web sites</title>
1113 Explain make_winehq, rsync, etc.
1120 <!-- Keep this comment at the end of the file
1123 sgml-parent-document:("wine-doc.sgml" "set" "book" "part" "chapter" "")