diff --git a/books/Makefile.pamphlet b/books/Makefile.pamphlet index 033d52a..b79072f 100644 --- a/books/Makefile.pamphlet +++ b/books/Makefile.pamphlet @@ -29,7 +29,6 @@ PS2PDF=ps2pdf RM=rm -f BOOKS=${PDF}/bookvol0.pdf ${PDF}/bookvol1.pdf \ - ${PDF}/bookvol4.pdf \ ${PDF}/bookvol7.1.pdf \ ${PDF}/bookvol8.pdf ${PDF}/bookvol8.1.pdf ${PDF}/bookvol10.pdf \ ${PDF}/bookvol10.1.pdf ${PDF}/bookvol10.2.pdf ${PDF}/bookvol10.3.pdf \ @@ -37,6 +36,7 @@ BOOKS=${PDF}/bookvol0.pdf ${PDF}/bookvol1.pdf \ ${PDF}/bookvol11.pdf ${PDF}/bookvolbib.pdf BUUKS=${PDF}/bookvol2.pdf ${PDF}/bookvol3.pdf \ + ${PDF}/bookvol4.pdf \ ${PDF}/bookvol5.pdf ${PDF}/bookvol6.pdf ${PDF}/bookvol7.pdf \ ${PDF}/bookvol9.pdf ${PDF}/bookvol12.pdf @@ -94,6 +94,32 @@ ${PDF}/bookvol3.pdf: ${IN}/bookvol3.pamphlet ${RM} bookvol3.ilg bookvol3.ind ; \ fi ) +${PDF}/bookvol4.pdf: ${IN}/bookvol4.pamphlet + @echo books/1 making ${PDF}/bookvol4.pdf from ${IN}/bookvol4.pamphlet + @(cd ${PDF} ; \ + cp ${IN}/bookvol4.pamphlet ${PDF}/bookvol4.tex ; \ + cp -pr ${IN}/ps ${PDF} ; \ + if [ -z "${NOISE}" ] ; then \ + ${RM} bookvol4.toc ; \ + ${LATEX} bookvol4.tex ; \ + ${MAKEINDEX} bookvol4.idx >/dev/null ; \ + ${LATEX} bookvol4.tex >/dev/null ; \ + ${DVIPDFM} bookvol4.dvi 2>/dev/null ; \ + ${RM} bookvol4.aux bookvol4.dvi bookvol4.log bookvol4.ps ; \ + ${RM} bookvol4.idx bookvol4.tex bookvol4.pamphlet ; \ + ${RM} bookvol4.ilg bookvol4.ind ; \ + else \ + ${RM} bookvol4.toc ; \ + ${LATEX} bookvol4.tex >${TMP}/trace ; \ + echo ...first latex complete ; \ + ${MAKEINDEX} bookvol4.idx >${TMP}/trace ; \ + ${LATEX} bookvol4.tex >${TMP}/trace ; \ + ${DVIPDFM} bookvol4.dvi 2>${TMP}/trace ; \ + ${RM} bookvol4.aux bookvol4.dvi bookvol4.log bookvol4.ps ; \ + ${RM} bookvol4.idx bookvol4.tex bookvol4.pamphlet ; \ + ${RM} bookvol4.ilg bookvol4.ind ; \ + fi ) + ${PDF}/bookvol5.pdf: ${IN}/bookvol5.pamphlet @echo books/1 making ${PDF}/bookvol5.pdf from ${IN}/bookvol5.pamphlet @(cd ${PDF} ; \ diff --git a/books/bookvol4.pamphlet b/books/bookvol4.pamphlet index c7ac326..7d5ed83 100644 --- a/books/bookvol4.pamphlet +++ b/books/bookvol4.pamphlet @@ -2501,43 +2501,21 @@ Axiom was written in a variety of languages, such as C and Lisp, and used tools such as Makefiles which have their own syntax. Thus Web could not be used directly. -Norman Ramsey had the insight to realize that there was no reason -why the ``tangle'' command had to know anything about the programming -language. If you remove the prettyprinting feature but kept the code -extraction idea then ``tangle'' could be generic. - -Ramsey wrote a program called ``noweb'' that was similar in spirit -to Knuth's Web. It has two commands ``notangle'' and ``noweave'' -which perform the extractions but do so in a language neutral manner. - -The language neutral feature of noweb made it ideal for Axiom. Using -noweb every file in the system could be rewritten into literate form. - -The noweb program is not a perfect match, however. Axiom does not -``understand'' pamphlet files using noweb so it cannot extract the -code directly using the )compile command. This could be addressed by -writing lisp code which would be able to extract the code chunks -from a pamphlet and collect them into a file. The src/interp/gclweb.lisp -program does this. - -Axiom pamphlets need an additional step to weave them into standard latex. -This step is just a syntax question. The noweb program used a syntax -similar to Knuth and defined chunks between delimiters, thus: -\begin{verbatim} - <>= - your code - @ -\end{verbatim} -but this is just a syntactic convention. If the syntax followed the -rules of latex then the pamphlet files would be pure latex files. - -The alternate syntax defines a new latex environment called chunk. +Axiom defines a new latex environment called chunk. This chunk environment makes the pamphlet file a pure latex file. This eliminates the need for the weave operation. The tangle operation only needs to occur while manipulating code, either during system build or end user interaction. At both of these times the tangle operation can be built into the system and hidden. +To support extracting chunks from pamphlet files Axiom now has a +new top level command. At the top level one can write: +\begin{verbatim} + )tangle filename +\end{verbatim} +This will look for ``filename.pamphlet'' and extract the top level +chunk which has the name ``*''. + The latest changeset introduces two related changes, gclweb and axiom.sty. Together these changes allow optional syntactic changes to pamphlets. These changes will completely eliminate the need to weave @@ -2552,17 +2530,7 @@ gclweb will now automatically distinguish the type of chunk style understanding of pamphlet files. Future work involves integrating it into commands like )compile and adding commands like )tangle. -To tangle a file from within Axiom: -\begin{verbatim} - )lisp (tangle "filename.pamphlet" "<>") -\end{verbatim} -which is noweb syntax. Output goes to the console. You can direct the -output to a file with the optional third argument: -\begin{verbatim} - )lisp (tangle "filename.pamphlet" "<>" "filename.spad") -\end{verbatim} - -If you use the new latex chunk environment the syntax is: +Tangle can also be called directly from lisp on a file from within Axiom: \begin{verbatim} )lisp (tangle "filename.pamphlet" "chunkname") )lisp (tangle "filename.pamphlet" "chunkname" "filename.spad") @@ -2577,21 +2545,13 @@ pamphlets. The new syntax makes pamphlet files = tex files so there is no need to use weave. The gclweb change has a compatible tangle function which can be invoked from inside Axiom. -Noweb syntax of: -\begin{verbatim} - <>= - your code goes here - @ -\end{verbatim} - -can also be written as: \begin{verbatim} \begin{chunk}{chunkname} your code goes here \end{chunk} \end{verbatim} -One new feature of the latex chunk style is that latex commands +One feature of the latex chunk style is that latex commands work within the chunk. To get typeset mathematics use \verb|\(| and \verb|\)| @@ -2788,22 +2748,22 @@ The help documentation for algebra files lives within the algebra pamphlet. The help chunk contains the name of the domain, thus: \begin{verbatim} -<>= -==================================================================== -thisdomain examples -==================================================================== - - (documentation for this domain) - - examplefunction foo - output - Type: thetype - -See Also: -o )show thisdomain -o $AXIOM/bin/src/doc/algebra/thisfile.spad.dvi - -@ + \begin{chunk}{thisdomain.help} + ==================================================================== + thisdomain examples + ==================================================================== + + (documentation for this domain) + + examplefunction foo + output + Type: thetype + + See Also: + o )show thisdomain + o $AXIOM/bin/src/doc/algebra/thisfile.spad.dvi + + \end{chunk} \end{verbatim} The documentation starts off with the domain enclosed in two lines @@ -5807,7 +5767,7 @@ We've already explained most of the sections. Now we insert a chunk for our algebra. The name of this chunk is important because the Makefile will look for this exact chunk name. In our example case it looks like: \begin{verbatim} -@<>= + \begin{chunk}{package INTERGB InterfaceGroebnerPackage} \end{verbatim} which is followed immediately by the algebra starting with the ``abbrev'' command. @@ -5886,11 +5846,11 @@ file will be, and the scale factor to use to display the file (1.00). We copy the body of the pic file to the book so we can easily recreate the graphs: \begin{verbatim} -@<>= -"INTERGB" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INTERGB"] -"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] -"INTERGB" -> "PFECAT" -@ + \begin{chunk}{INTERGB.dotabb} + "INTERGB" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INTERGB"] + "PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] + "INTERGB" -> "PFECAT" + \end{chunk} \end{verbatim} Next we return to the command line and get explicit information about @@ -6123,7 +6083,7 @@ This book is actually a literate program\cite{2} and can contain executable source code. In particular, the Makefile for this book is part of the source of the book and is included below. Axiom uses the ``noweb'' literate programming system by Norman Ramsey\cite{6}. -<<*>>= +\begin{chunk}{*} PROJECT=bookvol4 TANGLE=/usr/local/bin/NOTANGLE WEAVE=/usr/local/bin/NOWEAVE @@ -6136,7 +6096,7 @@ all: ${MAKEINDEX} ${PROJECT}.idx ${LATEX} ${PROJECT}.tex 2>/dev/null 1>/dev/null -@ +\end{chunk} \eject \begin{thebibliography}{99} \bibitem{1} Jenks, R.J. and Sutor, R.S. diff --git a/changelog b/changelog index 7683038..357b00d 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20130124 tpd src/axiom-website/patches.html 20130124.06.tpd.patch +20120124 tpd books/Makefile remove noweb from vol4 +20130124 tpd books/bookvol4 remove noweb 20130124 tpd src/axiom-website/patches.html 20130124.05.tpd.patch 20120124 tpd books/Makefile remove noweb from vol2 20120124 tpd books/bookvol2 remove noweb diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index d01c8e0..c785eca 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3965,5 +3965,7 @@ src/input/trigtests.input test new hyperbolic identities books/Makefile, bookvol3, bookvol12 remove noweb 20130124.05.tpd.patch books/Makefile, bookvol2 remove noweb +20130124.06.tpd.patch +books/Makefile, bookvol4 remove noweb