Index of /archives/text/CTAN/web/knit
Name Last modified Size Description
Parent Directory -
README 1992-09-23 08:00 3.5K
demo.ch1 1992-09-23 08:00 261
demo.ch2 1992-09-23 08:00 219
demo.ch3 1992-09-23 08:00 375
demo.web 1992-09-23 08:00 673
knit.ch 1992-09-23 08:00 34K
origin 1992-09-23 08:00 578
twist.ch 1992-09-23 08:00 42K
% This is README
The PATCHWORK system consists of two programs
KNIT a version of TANGLE that can handle multiple changefiles
TWIST a version of WEAVE that can handle multiple changefile
and
PATHCHMAC.TEX a modified version of WEBMAC.TEX which must be used
for TeX'ing the output of TWIST.
To install the system you should proceed as follows. (The description
is for SUN UNIX but an implementation on other UNIX systems or even
non-UNIX systems should be possible without major problems.)
1. Make a new directory with the files
knit.ch twist.ch patchmac.tex
demo.web demo.ch1 demo.ch2 demo.ch3
and copy (temporarily) also
tangle.web weave.web
which you will surely have already.
2. Tangle tangle.web with knit.ch giving you tangle.p:
tangle tangle.web knit.ch
3. Rename tangle.p to knit.p and compile it.
mv tangle.p. knit.p; pc -o knit knit.p
4. If your compiler complains you should modify knit.ch (after
you have saved the original version). All the necessary modifications
should be found in your local tangle.ch. Then start at step 2 again.
(You should record all changes to knit.ch in a separate changefile
which you might call knit.ch.local. If you have successfully installed
knit and twist later on, you can reproduce knit from tangle with
the original (system-independent) knit.ch and your (system-dependent)
knit.ch.local, e.g.,
knit tangle.web knit.ch knit.ch.local
For obvious reasons, the orinal knit.ch is not completely system-
independent, but it is a version with works for SUN UNIX. However,
the system-dependencies are rather small.)
5. Repeat steps 2 to 4 correspondingly for weave and twist:
tangle weave.web twist.ch
mv weave.p twist.p; pc -o twist twist.p
6. You now have a first version of the PATCHMAC system and might want
to test how it works:
ln demo.web webfile
ln demo.ch1 chfile1
ln demo.ch2 chfile2
ln demo.ch3 chfile3
knit
mv Pascalfile demo.p; pc -o demo demo.p
demo
and you should see on your terminal
I am line1 from changefile1
I am line2 from changefile1
I am line3 from changefile1
I am line4 from changefile1
I am line3
I am line2 from changefile3
I am line3 from changefile3
I am line7
I am line8
I am line9
I am line2 from changefile2
I am line3 from changefile2
I am line4 from changefile3
I am line12
Afterwards you could run twist and TeX it's output:
twist
mv texfile demo.tex; tex demo [print or preview it]
7. As you will have noticed in step 6, these versions of twist
and knit are rather simple and do not allow the usual parsing
of the command line as your tangle and weave will probably do,
i.e., the file names for twist and knit have to be
webfile chfile1 chfile2 chfile3
Since you will probably not like this you could write, as a first
exercise, two changefiles, say
knit.ch.args twist.ch.args
which implement the parsing of the arguments in the command line.
With
ln tangle.web webfile
ln knit.ch chfile1
ln knit.ch.args chfile2
knit
mv Pascalfile knit.p
pc -o knit knit.p
(and a similar procedure for twist) you then will get a version
of knit (and twist) which allows the usual usuage:
knit name_of_webfile name_of_first_cf name_of_second_cf ...
Wolfgang Appelt
GMD
Schlo\ss Birlinghoven
Postfach 1240
D-5205 Sankt Augustin
Germany FR
19 October 1988