4 >Documentation Guidelines</TITLE
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64
10 TITLE="Privoxy Developer Manual"
11 HREF="index.html"><LINK
13 TITLE="Quickstart to Privoxy Development"
14 HREF="quickstart.html"><LINK
16 TITLE="Coding Guidelines"
17 HREF="coding.html"><LINK
20 HREF="../p_doc.css"></HEAD
39 >Privoxy Developer Manual</TH
47 HREF="quickstart.html"
74 >4. Documentation Guidelines</A
77 > All formal documents are maintained in docbook SGML and located in the
79 CLASS="COMPUTEROUTPUT"
81 > directory. You will need
83 HREF="http://www.docbook.org"
87 DTD's and the Docbook modular stylesheets (or comparable alternatives),
95 > (recommended) installed in order to
96 build docs from source. Currently there is <A
97 HREF="../user-manual/index.html"
105 HREF="../faq/index.html"
126 > (man page) files are also now maintained
127 as Docbook SGML. The finished files are all in the top-level source
128 directory are generated files! Also, <TT
135 > home page, is maintained as SGML.
138 >DO NOT edit these directly</I
139 >. Edit the SGML source, or
140 contact someone involved in the documentation (at present Stefan and
144 > Other, less formal documents (e.g. <TT
151 >) are maintained as plain text files in the
152 toplevel source directory. At least for the time being.
155 > Packagers are encouraged to include this documentation. For those without
156 the ability to build the docs locally, text versions of each are kept in
157 CVS. HTML versions are also now being kept in CVS under
164 > Formal documents are built with the Makefile targets of
166 CLASS="COMPUTEROUTPUT"
170 CLASS="COMPUTEROUTPUT"
172 >. If you have problems,
173 try both. The build process uses the document SGML sources in
175 CLASS="COMPUTEROUTPUT"
177 > to update all text files in
179 CLASS="COMPUTEROUTPUT"
181 > and to update all HTML
183 CLASS="COMPUTEROUTPUT"
188 > Documentation writers should please make sure documents build
189 successfully before committing to CVS.
192 > How do you update the webserver (i.e. the pages on privoxy.org)?
200 > First, build the docs by running <TT
201 CLASS="COMPUTEROUTPUT"
204 > (or alternately <TT
205 CLASS="COMPUTEROUTPUT"
214 CLASS="COMPUTEROUTPUT"
218 CLASS="COMPUTEROUTPUT"
221 sourceforge webserver via scp.
233 >4.1. Quickstart to Docbook and SGML</A
236 > If you are not familiar with SGML, it is a markup language similar to HTML.
237 Actually, not a mark up language per se, but a language used to define
238 markup languages. In fact, HTML is an SGML application. Both will use
242 > to format text and other content. SGML tags can be much
243 more varied, and flexible, but do much of the same kinds of things. The tags,
247 >, are definable in SGML. There is no set
251 >. Since we are using
255 >, our tags are those that are defined by
259 >. Much of how the finish document is
260 rendered is determined by the <SPAN
264 The stylesheets determine how each tag gets translated to HTML, or other
267 > Tags in Docbook SGML need to be always <SPAN
271 will likely generate errors. Example: <TT
274 Title</title></TT
275 >. They are also case-insensitive, but we
276 strongly suggest using all lower case. This keeps compatibility with
282 > Our documents use <SPAN
285 > for the most part. Sections
286 will be processed into HTML headers (e.g. <TT
297 will use these to also generate the Table of Contents for each doc. Our
298 TOC's are set to a depth of three. Meaning <TT
312 > will not. Each section requires
316 > element, and at least one
320 >. There is a limit of five section
321 levels in Docbook, but generally three should be sufficient for our
324 > Some common elements that you likely will use: </P
334 ><para></para></I
335 >, paragraph delimiter. Most
336 text needs to be within paragraph elements (there are some exceptions).
343 ><emphasis></emphasis></I
344 >, the stylesheets make this
352 ><filename></filename></I
353 >, files and directories.
360 ><command></command></I
368 ><literallayout></literllayout></I
380 ><itemizedlist></itemizdelist></I
381 >, list with bullets.
388 ><listitem></listitem></I
389 >, member of the above.
396 ><screen></screen></I
397 >, screen output, implies
400 ><literallayout></TT
408 ><ulink url="example.com"></ulink></I
420 ><quote></quote></I
421 >, for, doh, quoting text.
429 > Look at any of the existing docs for examples of all these and more.</P
440 > Documentation Style</A
443 > It will be easier if everyone follows a similar writing style. This
444 just makes it easier to read what someone else has written if it
445 is all done in a similar fashion.
456 > All tags should be lower case.
461 > Tags delimiting a <I
464 > of text (even small
465 blocks) should be on their own line. Like:
467 CLASS="LITERALLAYOUT"
468 > <para><br>
469 Some text goes here.<br>
470 </para><br>
471 </P
473 Tags marking individual words, or few words, should be in-line:
475 CLASS="LITERALLAYOUT"
476 > Just to <emphasis>emphasize</emphasis>, some text goes here.<br>
477 </P
483 > Tags should be nested and step indented for block text like: (except
486 CLASS="LITERALLAYOUT"
487 > <para><br>
488 <itemizedlist><br>
489 <para><br>
490 <listitem><br>
491 Some text goes here in our list example.<br>
492 </listitem><br>
493 </para><br>
494 </itemizedlist><br>
495 </para><br>
496 </P
498 This makes it easier to find the text amongst the tags ;-)
503 > Use white space to separate logical divisions within a document,
504 like between sections. Running everything together consistently
505 makes it harder to read and work on.
510 > Do not hesitate to make comments. Comments can either use the
511 <comment> element, or the <!-- --> style comment
512 familiar from HTML. (Note in Docbook v4.x <comment> is
513 replaced by <remark>.)
518 > We have an international audience. Refrain from slang, or English
519 idiosyncrasies (too many to list :).
524 > Try to keep overall line lengths in source files to 80 characters or less
525 for obvious reasons. This is not always possible, with lenghty URLs for
531 > Our documents are available in differing formats. Right now, they
532 are just plain text, and HTML, but PDF, and others is always a
533 future possibility. Be careful with URLs (<ulink>), and avoid
537 > My favorite site is <ulink url="http://example.com">here</ulink>.
540 > This will render as <SPAN
542 >"My favorite site is here"</SPAN
544 not real helpful in a text doc. Better like this:
547 > My favorite site is <ulink url="http://example.com">example.com</ulink>.
552 > All documents should be spell checked occasionally.
556 > can check SGML with the
577 >4.3. Privoxy Custom Entities</A
583 > documentation is using
584 a number of customized <SPAN
588 documentation maintenance.
591 > We are using a set of <SPAN
594 > files with generic text,
595 that is used by multiple docs. This way we can write something once, and use
596 it repeatedly without having to re-write the same content over and over again.
597 If editing such a file, keep in mind that it should be
601 >. That is the purpose; so it can be used in varying
602 contexts without additional modifications.
605 > We are also using what <SPAN
611 >"internal entities"</SPAN
612 >. These are like variables in
613 programming. Well, sort of. For instance, we have the
617 > entity that contains the current
621 > version string. You are strongly
622 encouraged to use these where possible. Some of these obviously
623 require re-setting with each release (done by the Makefile). A sampling of
624 custom entities are listed below. See any of the main docs for examples.
635 > text entities are defined like:
640 ><!entity supported SYSTEM "supported.sgml"></TT
644 > In this example, the contents of the file,
648 > is available for inclusion anywhere
649 in the doc. To make this happen, just reference the now defined
653 > (starts with an ampersand
654 and ends with a semi-colon), and the contents will be dumped into
655 the finished doc at that point.
660 > Commonly used <SPAN
662 >"internal entities"</SPAN
679 version string, e.g. <SPAN
690 >: the project status, either
708 >: use to conditionally include
712 > releases (e.g. <SPAN
723 >: just the opposite.
731 >: this doc is only generated as text.
743 > There are others in various places that are defined for a specific
744 purpose. Read the source!
763 HREF="quickstart.html"
788 >Quickstart to Privoxy Development</TD
798 >Coding Guidelines</TD