Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

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
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

Files

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
knit.ch 34437 1992-09-23 01:00
origin 578 1992-09-23 01:00
readme 3577 1992-09-23 01:00
twist.ch 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
Ver­sion2.7
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