1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
5 >Documentation Guidelines</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
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"><META
21 HTTP-EQUIV="Content-Type"
23 charset=ISO-8859-1"></HEAD
34 SUMMARY="Header navigation table"
43 >Privoxy Developer Manual</TH
80 >3. Documentation Guidelines</A
83 > All formal documents are maintained in Docbook SGML and located in the
85 CLASS="COMPUTEROUTPUT"
87 > directory. You will need
89 HREF="http://www.docbook.org"
93 DTD's and the Docbook modular stylesheets (or comparable alternatives),
101 > (recommended) installed in order to
102 build docs from source. Currently there is <A
103 HREF="../user-manual/index.html"
111 HREF="../faq/index.html"
140 > files are also now maintained as Docbook
141 SGML. These files, when built, in the top-level source directory are
142 generated files! Also, the <SPAN
149 variation on this file, <TT
151 >privoxy-index.html</TT
153 meant for inclusion with doc packages), are maintained as SGML as well.
158 >DO NOT edit these directly</I
160 >. Edit the SGML source, or
161 contact someone involved in the documentation.
167 > requires some special handling. The reason it
168 is maintained this way is so that the extensive comments in the file
172 >. But the conversion
173 process requires going from SGML to HTML to text to special formatting
174 required for the embedded comments. Some of this does not survive so
175 well. Especially some of the examples that are longer than 80 characters.
176 The build process for this file outputs to <TT
180 which should be reviewed for errors and mis-formatting. Once satisfied
181 that it is correct, then it should be hand copied to
188 > Other, less formal documents (e.g. <TT
192 maintained as plain text files in the top-level source directory.
195 > Packagers are encouraged to include this documentation. For those without
196 the ability to build the docs locally, text versions of each are kept in
197 CVS. HTML versions are also being kept in CVS under
201 >. And PDF version are kept in
208 > Formal documents are built with the Makefile targets of
210 CLASS="COMPUTEROUTPUT"
214 CLASS="COMPUTEROUTPUT"
215 >make redhat-dok</SAMP
216 >. If you have problems,
217 try both. The build process uses the document SGML sources in
219 CLASS="COMPUTEROUTPUT"
220 >doc/source/*/*</SAMP
221 > to update all text files in
223 CLASS="COMPUTEROUTPUT"
225 > and to update all HTML
227 CLASS="COMPUTEROUTPUT"
228 >doc/webserver/</SAMP
232 > Documentation writers should please make sure documents build
233 successfully before committing to CVS, if possible.
236 > How do you update the webserver (i.e. the pages on privoxy.org)?
244 > First, build the docs by running <SAMP
245 CLASS="COMPUTEROUTPUT"
248 > (or alternately <SAMP
249 CLASS="COMPUTEROUTPUT"
252 >). For PDF docs, do <SAMP
253 CLASS="COMPUTEROUTPUT"
262 CLASS="COMPUTEROUTPUT"
263 >make webserver</SAMP
266 CLASS="COMPUTEROUTPUT"
269 sourceforge webserver via scp.
276 > Finished docs should be occasionally submitted to CVS
279 >doc/webserver/*/*.html</TT
280 >) so that those without
281 the ability to build them locally, have access to them if needed.
282 This is especially important just prior to a new release! Please
293 other release specific data in <TT
297 updated (this is done just prior to a new release).
305 >3.1. Quickstart to Docbook and SGML</A
308 > If you are not familiar with SGML, it is a markup language similar to HTML.
309 Actually, not a mark up language per se, but a language used to define
310 markup languages. In fact, HTML is an SGML application. Both will use
314 > to format text and other content. SGML tags can be much
315 more varied, and flexible, but do much of the same kinds of things. The tags,
319 >, are definable in SGML. There is no set
323 >. Since we are using
327 >, our tags are those that are defined by
331 >. Much of how the finish document is
332 rendered is determined by the <SPAN
336 The stylesheets determine how each tag gets translated to HTML, or other
339 > Tags in Docbook SGML need to be always <SPAN
343 will likely generate errors. Example: <TT
346 Title</title></TT
347 >. They are also case-insensitive, but we
348 strongly suggest using all lower case. This keeps compatibility with
354 > Our documents use <SPAN
357 > for the most part. Sections
358 will be processed into HTML headers (e.g. <TT
369 will use these to also generate the Table of Contents for each doc. Our
370 TOC's are set to a depth of three. Meaning <TT
384 > will not. Each section requires
388 > element, and at least one
392 >. There is a limit of five section
393 levels in Docbook, but generally three should be sufficient for our
396 > Some common elements that you likely will use: </P
409 ><para></para></I
411 >, paragraph delimiter. Most
412 text needs to be within paragraph elements (there are some exceptions).
421 ><emphasis></emphasis></I
433 ><filename></filename></I
435 >, files and directories.
444 ><command></command></I
455 ><literallayout></literallayout></I
470 ><itemizedlist></itemizedlist></I
472 >, list with bullets.
481 ><listitem></listitem></I
483 >, member of the above.
492 ><screen></screen></I
494 >, screen output, implies
497 ><literallayout></TT
507 ><ulink url="example.com"></ulink></I
522 ><quote></quote></I
524 >, for, doh, quoting text.
533 > Look at any of the existing docs for examples of all these and more.</P
535 > You might also find <SPAN
538 HREF="http://opensource.bureau-cornavin.com/crash-course/index.html"
540 >Writing Documentation
541 Using DocBook - A Crash Course</A
554 > Documentation Style</A
557 > It will be easier if everyone follows a similar writing style. This
558 just makes it easier to read what someone else has written if it
559 is all done in a similar fashion.
570 > All tags should be lower case.
575 > Tags delimiting a <SPAN
581 > of text (even small
582 blocks) should be on their own line. Like:
584 CLASS="LITERALLAYOUT"
585 > <para><br>
586 Some text goes here.<br>
587 </para><br>
588 </P
590 Tags marking individual words, or few words, should be in-line:
592 CLASS="LITERALLAYOUT"
593 > Just to <emphasis>emphasize</emphasis>, some text goes here.<br>
594 </P
600 > Tags should be nested and step indented for block text like: (except
603 CLASS="LITERALLAYOUT"
604 > <para><br>
605 <itemizedlist><br>
606 <para><br>
607 <listitem><br>
608 Some text goes here in our list example.<br>
609 </listitem><br>
610 </para><br>
611 </itemizedlist><br>
612 </para><br>
613 </P
615 This makes it easier to find the text amongst the tags ;-)
620 > Use white space to separate logical divisions within a document,
621 like between sections. Running everything together consistently
622 makes it harder to read and work on.
627 > Do not hesitate to make comments. Comments can either use the
628 <comment> element, or the <!-- --> style comment
629 familiar from HTML. (Note in Docbook v4.x <comment> is
630 replaced by <remark>.)
635 > We have an international audience. Refrain from slang, or English
636 idiosyncrasies (too many to list :). Humor also does not translate
642 > Try to keep overall line lengths in source files to 80 characters or less
643 for obvious reasons. This is not always possible, with lengthy URLs for
649 > Our documents are available in differing formats. Right now, they
650 are just plain text, HTML, and PDF, but others are always a
651 future possibility. Be careful with URLs (<ulink>), and avoid
655 > My favorite site is <ulink url="http://example.com">here</ulink>.
658 > This will render as <SPAN
660 >"My favorite site is here"</SPAN
662 not real helpful in a text doc. Better like this:
665 > My favorite site is <ulink url="http://example.com">example.com</ulink>.
670 > All documents should be spell checked occasionally.
674 > can check SGML with the
695 >3.3. Privoxy Custom Entities</A
701 > documentation is using
702 a number of customized <SPAN
706 documentation maintenance.
709 > We are using a set of <SPAN
712 > files with generic text,
713 that is used by multiple docs. This way we can write something once, and use
714 it repeatedly without having to re-write the same content over and over again.
715 If editing such a file, keep in mind that it should be
722 >. That is the purpose; so it can be used in varying
723 contexts without additional modifications.
726 > We are also using what <SPAN
732 >"internal entities"</SPAN
733 >. These are like variables in
734 programming. Well, sort of. For instance, we have the
738 > entity that contains the current
742 > version string. You are strongly
743 encouraged to use these where possible. Some of these obviously
744 require re-setting with each release (done by the Makefile). A sampling of
745 custom entities are listed below. See any of the main docs for examples.
756 > text entities are defined like:
761 ><!entity supported SYSTEM "supported.sgml"></TT
765 > In this example, the contents of the file,
769 > is available for inclusion anywhere
770 in the doc. To make this happen, just reference the now defined
774 > (starts with an ampersand
775 and ends with a semi-colon), and the contents will be dumped into
776 the finished doc at that point.
781 > Commonly used <SPAN
783 >"internal entities"</SPAN
803 version string, e.g. <SPAN
817 >: the project status, either
838 >: use to conditionally include
842 > releases (e.g. <SPAN
856 >: just the opposite.
867 >: this doc is only generated as text.
879 > There are others in various places that are defined for a specific
880 purpose. Read the source!
889 SUMMARY="Footer navigation table"
928 >The CVS Repository</TD
938 >Coding Guidelines</TD