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"></HEAD
31 SUMMARY="Header navigation table"
40 >Privoxy Developer Manual</TH
77 >3. Documentation Guidelines</A
80 > All formal documents are maintained in Docbook SGML and located in the
82 CLASS="COMPUTEROUTPUT"
84 > directory. You will need
86 HREF="http://www.docbook.org"
90 DTD's and the Docbook modular stylesheets (or comparable alternatives),
98 > (recommended) installed in order to
99 build docs from source. Currently there is <A
100 HREF="../user-manual/index.html"
108 HREF="../faq/index.html"
137 > files are also now maintained as Docbook
138 SGML. These files, when built, in the top-level source directory are
139 generated files! Also, the <SPAN
146 variation on this file, <TT
148 >privoxy-index.html</TT
150 meant for inclusion with doc packages), are maintained as SGML as well.
155 >DO NOT edit these directly</I
157 >. Edit the SGML source, or
158 contact someone involved in the documentation.
164 > requires some special handling. The reason it
165 is maintained this way is so that the extensive comments in the file
169 >. But the conversion
170 process requires going from SGML to HTML to text to special formatting
171 required for the embedded comments. Some of this does not survive so
172 well. Especially some of the examples that are longer than 80 characters.
173 The build process for this file outputs to <TT
177 which should be reviewed for errors and mis-formatting. Once satisfied
178 that it is correct, then it should be hand copied to
185 > Other, less formal documents (e.g. <TT
189 maintained as plain text files in the top-level source directory.
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 being kept in CVS under
198 >. And PDF version are kept in
205 > Formal documents are built with the Makefile targets of
207 CLASS="COMPUTEROUTPUT"
211 CLASS="COMPUTEROUTPUT"
212 >make redhat-dok</SAMP
213 >. If you have problems,
214 try both. The build process uses the document SGML sources in
216 CLASS="COMPUTEROUTPUT"
217 >doc/source/*/*</SAMP
218 > to update all text files in
220 CLASS="COMPUTEROUTPUT"
222 > and to update all HTML
224 CLASS="COMPUTEROUTPUT"
225 >doc/webserver/</SAMP
229 > Documentation writers should please make sure documents build
230 successfully before committing to CVS, if possible.
233 > How do you update the webserver (i.e. the pages on privoxy.org)?
241 > First, build the docs by running <SAMP
242 CLASS="COMPUTEROUTPUT"
245 > (or alternately <SAMP
246 CLASS="COMPUTEROUTPUT"
249 >). For PDF docs, do <SAMP
250 CLASS="COMPUTEROUTPUT"
259 CLASS="COMPUTEROUTPUT"
260 >make webserver</SAMP
263 CLASS="COMPUTEROUTPUT"
266 sourceforge webserver via scp.
273 > Finished docs should be occasionally submitted to CVS
276 >doc/webserver/*/*.html</TT
277 >) so that those without
278 the ability to build them locally, have access to them if needed.
279 This is especially important just prior to a new release! Please
290 other release specific data in <TT
294 updated (this is done just prior to a new release).
302 >3.1. Quickstart to Docbook and SGML</A
305 > If you are not familiar with SGML, it is a markup language similar to HTML.
306 Actually, not a mark up language per se, but a language used to define
307 markup languages. In fact, HTML is an SGML application. Both will use
311 > to format text and other content. SGML tags can be much
312 more varied, and flexible, but do much of the same kinds of things. The tags,
316 >, are definable in SGML. There is no set
320 >. Since we are using
324 >, our tags are those that are defined by
328 >. Much of how the finish document is
329 rendered is determined by the <SPAN
333 The stylesheets determine how each tag gets translated to HTML, or other
336 > Tags in Docbook SGML need to be always <SPAN
340 will likely generate errors. Example: <TT
343 Title</title></TT
344 >. They are also case-insensitive, but we
345 strongly suggest using all lower case. This keeps compatibility with
351 > Our documents use <SPAN
354 > for the most part. Sections
355 will be processed into HTML headers (e.g. <TT
366 will use these to also generate the Table of Contents for each doc. Our
367 TOC's are set to a depth of three. Meaning <TT
381 > will not. Each section requires
385 > element, and at least one
389 >. There is a limit of five section
390 levels in Docbook, but generally three should be sufficient for our
393 > Some common elements that you likely will use: </P
406 ><para></para></I
408 >, paragraph delimiter. Most
409 text needs to be within paragraph elements (there are some exceptions).
418 ><emphasis></emphasis></I
430 ><filename></filename></I
432 >, files and directories.
441 ><command></command></I
452 ><literallayout></literallayout></I
467 ><itemizedlist></itemizedlist></I
469 >, list with bullets.
478 ><listitem></listitem></I
480 >, member of the above.
489 ><screen></screen></I
491 >, screen output, implies
494 ><literallayout></TT
504 ><ulink url="example.com"></ulink></I
519 ><quote></quote></I
521 >, for, doh, quoting text.
530 > Look at any of the existing docs for examples of all these and more.</P
532 > You might also find <SPAN
535 HREF="http://opensource.bureau-cornavin.com/crash-course/index.html"
537 >Writing Documentation
538 Using DocBook - A Crash Course</A
551 > Documentation Style</A
554 > It will be easier if everyone follows a similar writing style. This
555 just makes it easier to read what someone else has written if it
556 is all done in a similar fashion.
567 > All tags should be lower case.
572 > Tags delimiting a <SPAN
578 > of text (even small
579 blocks) should be on their own line. Like:
581 CLASS="LITERALLAYOUT"
582 > <para><br>
583 Some text goes here.<br>
584 </para><br>
585 </P
587 Tags marking individual words, or few words, should be in-line:
589 CLASS="LITERALLAYOUT"
590 > Just to <emphasis>emphasize</emphasis>, some text goes here.<br>
591 </P
597 > Tags should be nested and step indented for block text like: (except
600 CLASS="LITERALLAYOUT"
601 > <para><br>
602 <itemizedlist><br>
603 <para><br>
604 <listitem><br>
605 Some text goes here in our list example.<br>
606 </listitem><br>
607 </para><br>
608 </itemizedlist><br>
609 </para><br>
610 </P
612 This makes it easier to find the text amongst the tags ;-)
617 > Use white space to separate logical divisions within a document,
618 like between sections. Running everything together consistently
619 makes it harder to read and work on.
624 > Do not hesitate to make comments. Comments can either use the
625 <comment> element, or the <!-- --> style comment
626 familiar from HTML. (Note in Docbook v4.x <comment> is
627 replaced by <remark>.)
632 > We have an international audience. Refrain from slang, or English
633 idiosyncrasies (too many to list :). Humor also does not translate
639 > Try to keep overall line lengths in source files to 80 characters or less
640 for obvious reasons. This is not always possible, with lengthy URLs for
646 > Our documents are available in differing formats. Right now, they
647 are just plain text, HTML, and PDF, but others are always a
648 future possibility. Be careful with URLs (<ulink>), and avoid
652 > My favorite site is <ulink url="http://example.com">here</ulink>.
655 > This will render as <SPAN
657 >"My favorite site is here"</SPAN
659 not real helpful in a text doc. Better like this:
662 > My favorite site is <ulink url="http://example.com">example.com</ulink>.
667 > All documents should be spell checked occasionally.
671 > can check SGML with the
692 >3.3. Privoxy Custom Entities</A
698 > documentation is using
699 a number of customized <SPAN
703 documentation maintenance.
706 > We are using a set of <SPAN
709 > files with generic text,
710 that is used by multiple docs. This way we can write something once, and use
711 it repeatedly without having to re-write the same content over and over again.
712 If editing such a file, keep in mind that it should be
719 >. That is the purpose; so it can be used in varying
720 contexts without additional modifications.
723 > We are also using what <SPAN
729 >"internal entities"</SPAN
730 >. These are like variables in
731 programming. Well, sort of. For instance, we have the
735 > entity that contains the current
739 > version string. You are strongly
740 encouraged to use these where possible. Some of these obviously
741 require re-setting with each release (done by the Makefile). A sampling of
742 custom entities are listed below. See any of the main docs for examples.
753 > text entities are defined like:
758 ><!entity supported SYSTEM "supported.sgml"></TT
762 > In this example, the contents of the file,
766 > is available for inclusion anywhere
767 in the doc. To make this happen, just reference the now defined
771 > (starts with an ampersand
772 and ends with a semi-colon), and the contents will be dumped into
773 the finished doc at that point.
778 > Commonly used <SPAN
780 >"internal entities"</SPAN
800 version string, e.g. <SPAN
814 >: the project status, either
835 >: use to conditionally include
839 > releases (e.g. <SPAN
853 >: just the opposite.
864 >: this doc is only generated as text.
876 > There are others in various places that are defined for a specific
877 purpose. Read the source!
886 SUMMARY="Footer navigation table"
925 >The CVS Repository</TD
935 >Coding Guidelines</TD