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 Stefan and
159 > requires some special handling. The reason it
160 is maintained this way is so that the extensive comments in the file
164 >. But the conversion
165 process requires going from SGML to HTML to text to special formatting
166 required for the embedded comments. Some of this does not survive so
167 well. Especially some of the examples that are longer than 80 characters.
168 The build process for this file outputs to <TT
172 which should be reviewed for errors and mis-formatting. Once satisfied
173 that it is correct, then it should be hand copied to
181 > Other, less formal documents (e.g. <TT
188 >) are maintained as plain text files in the
189 top-level source directory. At least for the time being.
192 > Packagers are encouraged to include this documentation. For those without
193 the ability to build the docs locally, text versions of each are kept in
194 CVS. HTML versions are also now being kept in CVS under
201 > Formal documents are built with the Makefile targets of
203 CLASS="COMPUTEROUTPUT"
207 CLASS="COMPUTEROUTPUT"
209 >. If you have problems,
210 try both. The build process uses the document SGML sources in
212 CLASS="COMPUTEROUTPUT"
214 > to update all text files in
216 CLASS="COMPUTEROUTPUT"
218 > and to update all HTML
220 CLASS="COMPUTEROUTPUT"
225 > Documentation writers should please make sure documents build
226 successfully before committing to CVS, if possible.
229 > How do you update the webserver (i.e. the pages on privoxy.org)?
237 > First, build the docs by running <TT
238 CLASS="COMPUTEROUTPUT"
241 > (or alternately <TT
242 CLASS="COMPUTEROUTPUT"
251 CLASS="COMPUTEROUTPUT"
255 CLASS="COMPUTEROUTPUT"
258 sourceforge webserver via scp.
265 > Finished docs should be occasionally submitted to CVS
268 >doc/webserver/*/*.html</TT
269 >) so that those without
270 the ability to build them locally, have access to them if needed.
271 This is especially important just prior to a new release! Please
282 other release specific data in <TT
286 updated (this is done just prior to a new release).
293 NAME="SGML">3.1. Quickstart to Docbook and SGML</H2
295 > If you are not familiar with SGML, it is a markup language similar to HTML.
296 Actually, not a mark up language per se, but a language used to define
297 markup languages. In fact, HTML is an SGML application. Both will use
301 > to format text and other content. SGML tags can be much
302 more varied, and flexible, but do much of the same kinds of things. The tags,
306 >, are definable in SGML. There is no set
310 >. Since we are using
314 >, our tags are those that are defined by
318 >. Much of how the finish document is
319 rendered is determined by the <SPAN
323 The stylesheets determine how each tag gets translated to HTML, or other
326 > Tags in Docbook SGML need to be always <SPAN
330 will likely generate errors. Example: <TT
333 Title</title></TT
334 >. They are also case-insensitive, but we
335 strongly suggest using all lower case. This keeps compatibility with
341 > Our documents use <SPAN
344 > for the most part. Sections
345 will be processed into HTML headers (e.g. <TT
356 will use these to also generate the Table of Contents for each doc. Our
357 TOC's are set to a depth of three. Meaning <TT
371 > will not. Each section requires
375 > element, and at least one
379 >. There is a limit of five section
380 levels in Docbook, but generally three should be sufficient for our
383 > Some common elements that you likely will use: </P
396 ><para></para></I
398 >, paragraph delimiter. Most
399 text needs to be within paragraph elements (there are some exceptions).
408 ><emphasis></emphasis></I
420 ><filename></filename></I
422 >, files and directories.
431 ><command></command></I
442 ><literallayout></literallayout></I
457 ><itemizedlist></itemizedlist></I
459 >, list with bullets.
468 ><listitem></listitem></I
470 >, member of the above.
479 ><screen></screen></I
481 >, screen output, implies
484 ><literallayout></TT
494 ><ulink url="example.com"></ulink></I
509 ><quote></quote></I
511 >, for, doh, quoting text.
520 > Look at any of the existing docs for examples of all these and more.</P
522 > You might also find <SPAN
525 HREF="http://www.bureau-cornavin.com/opensource/crash-course/"
527 >Writing Documentation
528 Using DocBook - A Crash Course</A
537 NAME="DOCSTYLE">3.2. <SPAN
540 > Documentation Style</H2
542 > It will be easier if everyone follows a similar writing style. This
543 just makes it easier to read what someone else has written if it
544 is all done in a similar fashion.
555 > All tags should be lower case.
560 > Tags delimiting a <SPAN
566 > of text (even small
567 blocks) should be on their own line. Like:
569 CLASS="LITERALLAYOUT"
570 > <para><br>
571 Some text goes here.<br>
572 </para><br>
573 </P
575 Tags marking individual words, or few words, should be in-line:
577 CLASS="LITERALLAYOUT"
578 > Just to <emphasis>emphasize</emphasis>, some text goes here.<br>
579 </P
585 > Tags should be nested and step indented for block text like: (except
588 CLASS="LITERALLAYOUT"
589 > <para><br>
590 <itemizedlist><br>
591 <para><br>
592 <listitem><br>
593 Some text goes here in our list example.<br>
594 </listitem><br>
595 </para><br>
596 </itemizedlist><br>
597 </para><br>
598 </P
600 This makes it easier to find the text amongst the tags ;-)
605 > Use white space to separate logical divisions within a document,
606 like between sections. Running everything together consistently
607 makes it harder to read and work on.
612 > Do not hesitate to make comments. Comments can either use the
613 <comment> element, or the <!-- --> style comment
614 familiar from HTML. (Note in Docbook v4.x <comment> is
615 replaced by <remark>.)
620 > We have an international audience. Refrain from slang, or English
621 idiosyncrasies (too many to list :). Humor also does not translate
627 > Try to keep overall line lengths in source files to 80 characters or less
628 for obvious reasons. This is not always possible, with lengthy URLs for
634 > Our documents are available in differing formats. Right now, they
635 are just plain text, and HTML, but PDF, and others is always a
636 future possibility. Be careful with URLs (<ulink>), and avoid
640 > My favorite site is <ulink url="http://example.com">here</ulink>.
643 > This will render as <SPAN
645 >"My favorite site is here"</SPAN
647 not real helpful in a text doc. Better like this:
650 > My favorite site is <ulink url="http://example.com">example.com</ulink>.
655 > All documents should be spell checked occasionally.
659 > can check SGML with the
679 NAME="AEN217">3.3. Privoxy Custom Entities</H2
684 > documentation is using
685 a number of customized <SPAN
689 documentation maintenance.
692 > We are using a set of <SPAN
695 > files with generic text,
696 that is used by multiple docs. This way we can write something once, and use
697 it repeatedly without having to re-write the same content over and over again.
698 If editing such a file, keep in mind that it should be
705 >. That is the purpose; so it can be used in varying
706 contexts without additional modifications.
709 > We are also using what <SPAN
715 >"internal entities"</SPAN
716 >. These are like variables in
717 programming. Well, sort of. For instance, we have the
721 > entity that contains the current
725 > version string. You are strongly
726 encouraged to use these where possible. Some of these obviously
727 require re-setting with each release (done by the Makefile). A sampling of
728 custom entities are listed below. See any of the main docs for examples.
739 > text entities are defined like:
744 ><!entity supported SYSTEM "supported.sgml"></TT
748 > In this example, the contents of the file,
752 > is available for inclusion anywhere
753 in the doc. To make this happen, just reference the now defined
757 > (starts with an ampersand
758 and ends with a semi-colon), and the contents will be dumped into
759 the finished doc at that point.
764 > Commonly used <SPAN
766 >"internal entities"</SPAN
786 version string, e.g. <SPAN
800 >: the project status, either
821 >: use to conditionally include
825 > releases (e.g. <SPAN
839 >: just the opposite.
850 >: this doc is only generated as text.
862 > There are others in various places that are defined for a specific
863 purpose. Read the source!
872 SUMMARY="Footer navigation table"
911 >The CVS Repository</TD
921 >Coding Guidelines</TD