njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 1 | |
sewardj | 8bc09dc | 2005-07-25 17:54:06 +0000 | [diff] [blame] | 2 | New notes, JRS 20050727 |
| 3 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 4 | * I had to install zillions of packages on SuSE 9.2 in order to |
| 5 | build the print docs (make print-docs), including |
| 6 | |
| 7 | passivetex |
| 8 | xpdf (for pdftops) |
| 9 | |
| 10 | It's possible to use pdf2ps instead, but that seems to generate |
| 11 | huge and almost-unreadable .ps. pdftops does a much nicer job. |
| 12 | |
| 13 | |
| 14 | * Even then, pdfxmltex eventually dies with "TeX capacity exceeded, |
| 15 | sorry [pool size = 67555]" or some such. To fix this, I edited |
| 16 | /etc/texmf/texmf.cnf and changed |
| 17 | |
| 18 | pool_size.pdfxmltex = 500000 |
| 19 | |
| 20 | to 1500000 and that fixed it. |
| 21 | |
| 22 | |
| 23 | Old notes |
| 24 | ~~~~~~~~~ |
sewardj | 49fbe60 | 2005-07-25 17:58:48 +0000 | [diff] [blame^] | 25 | Valgrind Documentation |
| 26 | ---------------------- |
| 27 | This text assumes the following directory structure: |
| 28 | |
| 29 | Distribution text files (eg. README): |
| 30 | valgrind/ |
| 31 | |
| 32 | Main /docs/ dir: |
| 33 | valgrind/docs/ |
| 34 | |
| 35 | Top-level XML files: |
| 36 | valgrind/docs/xml/ |
| 37 | |
| 38 | Tool specific XML docs: |
| 39 | valgrind/<toolname>/docs/ |
| 40 | |
| 41 | All images used in the docs: |
| 42 | valgrind/docs/images/ |
| 43 | |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 44 | Stylesheets, catalogs, parsing/formatting scripts: |
| 45 | valgrind/docs/lib/ |
| 46 | |
| 47 | Some files of note: |
| 48 | docs/xml/index.xml: Top-level book-set wrapper |
| 49 | docs/xml/FAQ.xml: The FAQ |
| 50 | docs/xml/vg-entities.xml: Various strings, dates etc. used all over |
| 51 | docs/xml/xml_help.txt: Basic guide to common XML tags. |
| 52 | |
njn | f7c00b1 | 2005-07-19 21:46:19 +0000 | [diff] [blame] | 53 | The docs/internals directory contains some useful high-level stuff about |
| 54 | Valgrind's internals. It's not relevant for the rest of this discussion. |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 55 | |
| 56 | Overview |
| 57 | --------- |
| 58 | The Documentation Set contains all books, articles, |
| 59 | etc. pertaining to Valgrind, and is designed to be built as: |
| 60 | - chunked html files |
| 61 | - PDF file |
| 62 | - PS file |
| 63 | |
| 64 | The whole thing is a "book set", made up of multiple books (the user |
| 65 | manual, the FAQ, the tech-docs, the licenses). Each book could be |
| 66 | made individually, but the build system doesn't do that. |
| 67 | |
| 68 | CSS: the style-sheet used by the docs is the same as that used by the |
| 69 | website (consistency is king). It might be worth doing a pre-build diff |
| 70 | to check whether the website stylesheet has changed. |
| 71 | |
| 72 | |
| 73 | The build process |
| 74 | ----------------- |
| 75 | It's not obvious exactly when things get built, and so on. Here's an |
| 76 | overview: |
| 77 | |
| 78 | - The HTML docs can be built manually by running 'make html-docs' in |
| 79 | valgrind/docs/. (Don't use 'make html'; that is a valid built-in |
| 80 | automake target, but does nothing.) Likewise for PDF/PS with 'make |
| 81 | print-docs'. |
| 82 | |
sewardj | 8bc09dc | 2005-07-25 17:54:06 +0000 | [diff] [blame] | 83 | - 'make dist' (nb: at the top level, not in docs/) puts the XML files |
| 84 | into the tarball. It also builds the HTML docs and puts them in too, |
| 85 | in valgrind/docs/html/ (including style sheets, images, etc). |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 86 | |
| 87 | - 'make install' installs the HTML docs in |
| 88 | $(install)/share/doc/valgrind/html/, if they are present. (They will |
| 89 | be present if you are installing from the result of a 'make dist'. |
| 90 | They might not be present if you are developing in a Subversion |
| 91 | workspace and have not built them.) It doesn't install the XML docs, |
| 92 | as they're not useful installed. |
| 93 | |
| 94 | If the XML processing tools ever mature enough to become standard, we |
| 95 | could just build the docs from XML when doing 'make install', which |
| 96 | would be simpler. |
| 97 | |
| 98 | |
| 99 | The XML Toolchain |
| 100 | ------------------ |
| 101 | I spent some time on the docbook-apps list in order to ascertain |
| 102 | the most-useful / widely-available / least-fragile / advanced |
| 103 | toolchain. Basically, everything has problems of one sort or |
| 104 | another, so I ended up going with what I felt was the |
| 105 | least-problematical of the various options. |
| 106 | |
| 107 | The maintainer is responsible for ensure the following tools are |
| 108 | present on his system: |
| 109 | - xmllint: using libxml version 20607 |
| 110 | - xsltproc: using libxml 20607, libxslt 10102 and libexslt 802 |
| 111 | (Nb:be sure to use a version based on libxml2 |
| 112 | version 2.6.11 or later. There was a bug in |
| 113 | xml:base processing in versions before that.) |
| 114 | - pdfxmltex: pdfTeX (Web2C 7.4.5) 3.14159-1.10b |
| 115 | - pdftops: version 3.00 |
| 116 | - DocBook: version 4.2 |
| 117 | - bzip2 |
| 118 | - lynx |
| 119 | |
| 120 | A big problem is latency. Norman Walsh is constantly updating |
| 121 | DocBook, but the tools tend to lag behind somewhat. It is |
| 122 | important that the versions get on with each other. If you |
| 123 | decide to upgrade something, then it is your responsibility to |
| 124 | ascertain whether things still work nicely - this *cannot* be |
| 125 | assumed. |
| 126 | |
| 127 | Print output: if make expires with an error, cat output. |
| 128 | If you see something like this: |
| 129 | ! TeX capacity exceeded, sorry [pool size=436070] |
| 130 | |
| 131 | then look at this: |
| 132 | http://lists.debian.org/debian-doc/2003/12/msg00020.html |
| 133 | and modify your texmf files accordingly. |
| 134 | |
| 135 | |
| 136 | Catalog Locations |
| 137 | ------------------ |
| 138 | oasis: |
| 139 | http://www.oasis-open.org/docbook/xml/4.2/catalog.xml |
| 140 | http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd |
| 141 | |
| 142 | Suse 9.1: |
| 143 | /usr/share/xml/docbook/ stylesheet/nwalsh/1.64.1/html/docbook.xsl |
| 144 | /usr/share/xml/docbook/ schema/dtd/4.2/docbookx.dtd |
| 145 | /usr/share/xml/docbook/ schema/dtd/4.2/catalog.xml |
| 146 | |
| 147 | |
| 148 | Notes: |
| 149 | ------ |
| 150 | - the end of file.xml must have only ONE newline after the last tag: |
| 151 | </book> |
| 152 | |
| 153 | - pdfxmltex barfs if given a filename with an underscore in it |
| 154 | |
| 155 | |
| 156 | References: |
| 157 | ---------- |
| 158 | - samba have got all the stuff |
| 159 | http://websvn.samba.org/listing.php?rep=4&path=/trunk/&opt=dir&sc=1 |
| 160 | |
| 161 | excellent on-line howto reference: |
| 162 | - http://www.cogent.ca/ |
| 163 | |
| 164 | using automake with docbook: |
| 165 | - http://www.movement.uklinux.net/docs/docbook-autotools/index.html |
| 166 | |
| 167 | Debugging catalog processing: |
| 168 | - http://xmlsoft.org/catalog.html#Declaring |
| 169 | xmlcatalog -v <catalog-file> |
| 170 | |
| 171 | shell script to generate xml catalogs for docbook 4.1.2: |
| 172 | - http://xmlsoft.org/XSLT/docbook.html |
| 173 | |
| 174 | configure.in re pdfxmltex |
| 175 | - http://cvs.sourceforge.net/viewcvs.py/logreport/service/configure.in?rev=1.325 |
| 176 | |
| 177 | some useful xls stylesheets in cvs: |
| 178 | - http://cvs.sourceforge.net/viewcvs.py/perl-xml/perl-xml-faq/ |
| 179 | |
| 180 | |
njn | 0ce9da2 | 2004-11-30 14:08:24 +0000 | [diff] [blame] | 181 | TODO CRUCIAL: |
| 182 | ------------- |
| 183 | - PS/PDF doesn't work because Latex runs out of memory |
| 184 | - Need to generate text FAQ from the valgrind/docs/xml/FAQ.xml (done at 'make |
| 185 | dist' time along with the HTML docs using the "dist-hook"), and remove the |
| 186 | old text FAQ which is in valgrind/. |
| 187 | |
| 188 | TODO LESS CRUCIAL: |
| 189 | ------------------ |
njn | 2777d93 | 2004-11-30 14:10:13 +0000 | [diff] [blame] | 190 | - add the HOWTO doc? |
njn | 12bb6d4 | 2004-11-30 14:09:22 +0000 | [diff] [blame] | 191 | - writing-tools.xml refers to vg-catalog.xml but it's not in the repo... should |
| 192 | it be, and if so, how should it be used? |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 193 | - get rid of blank pages in fo output |
| 194 | - concat titlepage + subtitle page in fo output |
| 195 | - generate an index for the user manual (??) |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 196 | - run through and check for not-linked hrefs: grep on 'http' |
| 197 | - run through and check for bad email addresses: grep on '@' etc. |
| 198 | - when we move to svn, change all refs to sourceforge.cvs |
| 199 | - go through and wrap refs+addresses in '<address>' tags |
| 200 | |
| 201 | |