Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/web/knit

% 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


Name Size Date Notes
3577 1992-09-23 01:00 ==> /web/knit/readme
demo.ch1 261 1992-09-23 01:00
demo.ch2 219 1992-09-23 01:00
demo.ch3 375 1992-09-23 01:00
demo.web 673 1992-09-23 01:00 34437 1992-09-23 01:00
origin 578 1992-09-23 01:00
readme 3577 1992-09-23 01:00 42500 1992-09-23 01:00

Down­load the con­tents of this pack­age in one zip archive (22.9k).

knit – Tan­gle and weave with mul­ti­ple change files

Knit and twist are rep­re­sented as change files from tan­gle and weave (re­spec­tively). In each case, they act in the same way as the par­ent pro­gram, but can pro­cess more than one change file at the same time.

Pack­age De­tailsknit
Li­censeUn­known Sta­tus, No In­for­ma­tion Avail­able
Main­tainerWolf­gang Ap­pelt
Topics lit­er­ate pro­gram­ming tools
Guest Book Sitemap Contact