blob: e7be50a385558ffbb7c93b99ac32bd2f726a30af [file] [log] [blame]
njn3e986b22004-11-30 10:43:45 +00001
sewardj8bc09dc2005-07-25 17:54:06 +00002New 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
23Old notes
24~~~~~~~~~
sewardj49fbe602005-07-25 17:58:48 +000025Valgrind Documentation
26----------------------
27This text assumes the following directory structure:
28
29Distribution text files (eg. README):
30 valgrind/
31
32Main /docs/ dir:
33 valgrind/docs/
34
35Top-level XML files:
36 valgrind/docs/xml/
37
38Tool specific XML docs:
39 valgrind/<toolname>/docs/
40
41All images used in the docs:
42 valgrind/docs/images/
43
njn3e986b22004-11-30 10:43:45 +000044Stylesheets, catalogs, parsing/formatting scripts:
45 valgrind/docs/lib/
46
47Some 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
njnf7c00b12005-07-19 21:46:19 +000053The docs/internals directory contains some useful high-level stuff about
54Valgrind's internals. It's not relevant for the rest of this discussion.
njn3e986b22004-11-30 10:43:45 +000055
56Overview
57---------
58The Documentation Set contains all books, articles,
59etc. pertaining to Valgrind, and is designed to be built as:
60- chunked html files
61- PDF file
62- PS file
63
64The whole thing is a "book set", made up of multiple books (the user
65manual, the FAQ, the tech-docs, the licenses). Each book could be
66made individually, but the build system doesn't do that.
67
68CSS: the style-sheet used by the docs is the same as that used by the
69website (consistency is king). It might be worth doing a pre-build diff
70to check whether the website stylesheet has changed.
71
72
73The build process
74-----------------
75It's not obvious exactly when things get built, and so on. Here's an
76overview:
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
sewardj8bc09dc2005-07-25 17:54:06 +000083- '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).
njn3e986b22004-11-30 10:43:45 +000086
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
94If the XML processing tools ever mature enough to become standard, we
95could just build the docs from XML when doing 'make install', which
96would be simpler.
97
98
99The XML Toolchain
100------------------
101I spent some time on the docbook-apps list in order to ascertain
102the most-useful / widely-available / least-fragile / advanced
103toolchain. Basically, everything has problems of one sort or
104another, so I ended up going with what I felt was the
105least-problematical of the various options.
106
107The maintainer is responsible for ensure the following tools are
108present 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
120A big problem is latency. Norman Walsh is constantly updating
121DocBook, but the tools tend to lag behind somewhat. It is
122important that the versions get on with each other. If you
123decide to upgrade something, then it is your responsibility to
124ascertain whether things still work nicely - this *cannot* be
125assumed.
126
127Print output: if make expires with an error, cat output.
128If you see something like this:
129 ! TeX capacity exceeded, sorry [pool size=436070]
130
131then look at this:
132 http://lists.debian.org/debian-doc/2003/12/msg00020.html
133and modify your texmf files accordingly.
134
135
136Catalog Locations
137------------------
138oasis:
139http://www.oasis-open.org/docbook/xml/4.2/catalog.xml
140http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
141
142Suse 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
148Notes:
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
156References:
157----------
158- samba have got all the stuff
159http://websvn.samba.org/listing.php?rep=4&path=/trunk/&opt=dir&sc=1
160
161excellent on-line howto reference:
162- http://www.cogent.ca/
163
164using automake with docbook:
165- http://www.movement.uklinux.net/docs/docbook-autotools/index.html
166
167Debugging catalog processing:
168- http://xmlsoft.org/catalog.html#Declaring
169 xmlcatalog -v <catalog-file>
170
171shell script to generate xml catalogs for docbook 4.1.2:
172- http://xmlsoft.org/XSLT/docbook.html
173
174configure.in re pdfxmltex
175- http://cvs.sourceforge.net/viewcvs.py/logreport/service/configure.in?rev=1.325
176
177some useful xls stylesheets in cvs:
178- http://cvs.sourceforge.net/viewcvs.py/perl-xml/perl-xml-faq/
179
180
njn0ce9da22004-11-30 14:08:24 +0000181TODO 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
188TODO LESS CRUCIAL:
189------------------
njn2777d932004-11-30 14:10:13 +0000190- add the HOWTO doc?
njn12bb6d42004-11-30 14:09:22 +0000191- 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?
njn3e986b22004-11-30 10:43:45 +0000193- get rid of blank pages in fo output
194- concat titlepage + subtitle page in fo output
195- generate an index for the user manual (??)
njn3e986b22004-11-30 10:43:45 +0000196- 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