4 >Documentation Guidelines</TITLE
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="Privoxy Developer Manual"
11 HREF="index.html"><LINK
13 TITLE="The CVS Repository"
16 TITLE="Coding Guidelines"
17 HREF="coding.html"><LINK
20 HREF="../p_doc.css"></HEAD
31 SUMMARY="Header navigation table"
40 >Privoxy Developer Manual</TH
76 NAME="DOCUMENTATION">3. Documentation Guidelines</H1
78 > All formal documents are maintained in Docbook SGML and located in the
80 CLASS="COMPUTEROUTPUT"
82 > directory. You will need
84 HREF="http://www.docbook.org"
88 DTD's and the Docbook modular stylesheets (or comparable alternatives),
96 > (recommended) installed in order to
97 build docs from source. Currently there is <A
98 HREF="../user-manual/index.html"
106 HREF="../faq/index.html"
131 > files are also now maintained as Docbook
132 SGML. These files, when built, in the top-level source directory are
133 generated files! Also, the <SPAN
140 variation on this file, <TT
142 >privoxy-index.html</TT
144 meant for inclusion with doc packages), are maintained as SGML as well.
149 >DO NOT edit these directly</I
151 >. Edit the SGML source, or
152 contact someone involved in the documentation (at present Hal).
158 > requires some special handling. The reason it
159 is maintained this way is so that the extensive comments in the file
163 >. But the conversion
164 process requires going from SGML to HTML to text to special formatting
165 required for the embedded comments. Some of this does not survive so
166 well. Especially some of the examples that are longer than 80 characters.
167 The build process for this file outputs to <TT
171 which should be reviewed for errors and mis-formatting. Once satisfied
172 that it is correct, then it should be hand copied to
179 > Other, less formal documents (e.g. <TT
186 >) are maintained as plain text files in the
187 top-level source directory. At least for the time being.
190 > Packagers are encouraged to include this documentation. For those without
191 the ability to build the docs locally, text versions of each are kept in
192 CVS. HTML versions are also now being kept in CVS under
199 > Formal documents are built with the Makefile targets of
201 CLASS="COMPUTEROUTPUT"
205 CLASS="COMPUTEROUTPUT"
207 >. If you have problems,
208 try both. The build process uses the document SGML sources in
210 CLASS="COMPUTEROUTPUT"
212 > to update all text files in
214 CLASS="COMPUTEROUTPUT"
216 > and to update all HTML
218 CLASS="COMPUTEROUTPUT"
223 > Documentation writers should please make sure documents build
224 successfully before committing to CVS, if possible.
227 > How do you update the webserver (i.e. the pages on privoxy.org)?
235 > First, build the docs by running <TT
236 CLASS="COMPUTEROUTPUT"
239 > (or alternately <TT
240 CLASS="COMPUTEROUTPUT"
243 >). For PDF docs, do <TT
244 CLASS="COMPUTEROUTPUT"
253 CLASS="COMPUTEROUTPUT"
257 CLASS="COMPUTEROUTPUT"
260 sourceforge webserver via scp.
267 > Finished docs should be occasionally submitted to CVS
270 >doc/webserver/*/*.html</TT
271 >) so that those without
272 the ability to build them locally, have access to them if needed.
273 This is especially important just prior to a new release! Please
284 other release specific data in <TT
288 updated (this is done just prior to a new release).
295 NAME="SGML">3.1. Quickstart to Docbook and SGML</H2
297 > If you are not familiar with SGML, it is a markup language similar to HTML.
298 Actually, not a mark up language per se, but a language used to define
299 markup languages. In fact, HTML is an SGML application. Both will use
303 > to format text and other content. SGML tags can be much
304 more varied, and flexible, but do much of the same kinds of things. The tags,
308 >, are definable in SGML. There is no set
312 >. Since we are using
316 >, our tags are those that are defined by
320 >. Much of how the finish document is
321 rendered is determined by the <SPAN
325 The stylesheets determine how each tag gets translated to HTML, or other
328 > Tags in Docbook SGML need to be always <SPAN
332 will likely generate errors. Example: <TT
335 Title</title></TT
336 >. They are also case-insensitive, but we
337 strongly suggest using all lower case. This keeps compatibility with
343 > Our documents use <SPAN
346 > for the most part. Sections
347 will be processed into HTML headers (e.g. <TT
358 will use these to also generate the Table of Contents for each doc. Our
359 TOC's are set to a depth of three. Meaning <TT
373 > will not. Each section requires
377 > element, and at least one
381 >. There is a limit of five section
382 levels in Docbook, but generally three should be sufficient for our
385 > Some common elements that you likely will use: </P
398 ><para></para></I
400 >, paragraph delimiter. Most
401 text needs to be within paragraph elements (there are some exceptions).
410 ><emphasis></emphasis></I
422 ><filename></filename></I
424 >, files and directories.
433 ><command></command></I
444 ><literallayout></literallayout></I
459 ><itemizedlist></itemizedlist></I
461 >, list with bullets.
470 ><listitem></listitem></I
472 >, member of the above.
481 ><screen></screen></I
483 >, screen output, implies
486 ><literallayout></TT
496 ><ulink url="example.com"></ulink></I
511 ><quote></quote></I
513 >, for, doh, quoting text.
522 > Look at any of the existing docs for examples of all these and more.</P
524 > You might also find <SPAN
527 HREF="http://www.bureau-cornavin.com/opensource/crash-course/"
529 >Writing Documentation
530 Using DocBook - A Crash Course</A
539 NAME="DOCSTYLE">3.2. <SPAN
542 > Documentation Style</H2
544 > It will be easier if everyone follows a similar writing style. This
545 just makes it easier to read what someone else has written if it
546 is all done in a similar fashion.
557 > All tags should be lower case.
562 > Tags delimiting a <SPAN
568 > of text (even small
569 blocks) should be on their own line. Like:
571 CLASS="LITERALLAYOUT"
572 > <para><br>
573 Some text goes here.<br>
574 </para><br>
575 </P
577 Tags marking individual words, or few words, should be in-line:
579 CLASS="LITERALLAYOUT"
580 > Just to <emphasis>emphasize</emphasis>, some text goes here.<br>
581 </P
587 > Tags should be nested and step indented for block text like: (except
590 CLASS="LITERALLAYOUT"
591 > <para><br>
592 <itemizedlist><br>
593 <para><br>
594 <listitem><br>
595 Some text goes here in our list example.<br>
596 </listitem><br>
597 </para><br>
598 </itemizedlist><br>
599 </para><br>
600 </P
602 This makes it easier to find the text amongst the tags ;-)
607 > Use white space to separate logical divisions within a document,
608 like between sections. Running everything together consistently
609 makes it harder to read and work on.
614 > Do not hesitate to make comments. Comments can either use the
615 <comment> element, or the <!-- --> style comment
616 familiar from HTML. (Note in Docbook v4.x <comment> is
617 replaced by <remark>.)
622 > We have an international audience. Refrain from slang, or English
623 idiosyncrasies (too many to list :). Humor also does not translate
629 > Try to keep overall line lengths in source files to 80 characters or less
630 for obvious reasons. This is not always possible, with lengthy URLs for
636 > Our documents are available in differing formats. Right now, they
637 are just plain text, TML, and PDF, but others are always a
638 future possibility. Be careful with URLs (<ulink>), and avoid
642 > My favorite site is <ulink url="http://example.com">here</ulink>.
645 > This will render as <SPAN
647 >"My favorite site is here"</SPAN
649 not real helpful in a text doc. Better like this:
652 > My favorite site is <ulink url="http://example.com">example.com</ulink>.
657 > All documents should be spell checked occasionally.
661 > can check SGML with the
681 NAME="AEN233">3.3. Privoxy Custom Entities</H2
686 > documentation is using
687 a number of customized <SPAN
691 documentation maintenance.
694 > We are using a set of <SPAN
697 > files with generic text,
698 that is used by multiple docs. This way we can write something once, and use
699 it repeatedly without having to re-write the same content over and over again.
700 If editing such a file, keep in mind that it should be
707 >. That is the purpose; so it can be used in varying
708 contexts without additional modifications.
711 > We are also using what <SPAN
717 >"internal entities"</SPAN
718 >. These are like variables in
719 programming. Well, sort of. For instance, we have the
723 > entity that contains the current
727 > version string. You are strongly
728 encouraged to use these where possible. Some of these obviously
729 require re-setting with each release (done by the Makefile). A sampling of
730 custom entities are listed below. See any of the main docs for examples.
741 > text entities are defined like:
746 ><!entity supported SYSTEM "supported.sgml"></TT
750 > In this example, the contents of the file,
754 > is available for inclusion anywhere
755 in the doc. To make this happen, just reference the now defined
759 > (starts with an ampersand
760 and ends with a semi-colon), and the contents will be dumped into
761 the finished doc at that point.
766 > Commonly used <SPAN
768 >"internal entities"</SPAN
788 version string, e.g. <SPAN
802 >: the project status, either
823 >: use to conditionally include
827 > releases (e.g. <SPAN
841 >: just the opposite.
852 >: this doc is only generated as text.
864 > There are others in various places that are defined for a specific
865 purpose. Read the source!
874 SUMMARY="Footer navigation table"
913 >The CVS Repository</TD
923 >Coding Guidelines</TD