Index of /web/knit

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]demo.ch122-Sep-1992 23:00 261  
[   ]demo.ch222-Sep-1992 23:00 219  
[   ]demo.ch322-Sep-1992 23:00 375  
[TXT]demo.web22-Sep-1992 23:00 673  
[TXT]knit.ch22-Sep-1992 23:00 34K 
[TXT]origin22-Sep-1992 23:00 578  
[TXT]readme22-Sep-1992 23:00 3.5K 
[TXT]twist.ch22-Sep-1992 23: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
   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   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 giving you tangle.p:
      tangle tangle.web

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 (after
   you have saved the original version). All the necessary modifications
   should be found in your local Then start at step 2 again.
   (You should record all changes to in a separate changefile
    which you might call If you have successfully installed
    knit and twist later on, you can reproduce knit from tangle with
    the original (system-independent) and your (system-dependent), e.g.,
       knit tangle.web
   For obvious reasons, the orinal 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
      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
      mv Pascalfile demo.p; pc -o demo demo.p
   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:
      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
   which implement the parsing of the arguments in the command line.
      ln tangle.web webfile
      ln chfile1
      ln chfile2
      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
Schlo\ss Birlinghoven
Postfach 1240
D-5205 Sankt Augustin
Germany FR

19 October 1988