From 90f6268df576cc5fc8d12b01bcea26fb5a11b666 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 24 May 2009 00:21:06 +0000 Subject: plweb update git-svn-id: svn://tug.org/texlive/trunk@13438 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/plweb/README | 84 ++++++++++++++++++++++++++++ Master/texmf-dist/doc/latex/plweb/pl.dvi | Bin 44588 -> 0 bytes Master/texmf-dist/doc/latex/plweb/pl.pdf | Bin 0 -> 123846 bytes Master/texmf-dist/doc/latex/plweb/sample.pl | 40 +++++++++++++ 4 files changed, 124 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/plweb/README delete mode 100644 Master/texmf-dist/doc/latex/plweb/pl.dvi create mode 100644 Master/texmf-dist/doc/latex/plweb/pl.pdf create mode 100644 Master/texmf-dist/doc/latex/plweb/sample.pl (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/plweb/README b/Master/texmf-dist/doc/latex/plweb/README new file mode 100644 index 00000000000..5a293eb0e43 --- /dev/null +++ b/Master/texmf-dist/doc/latex/plweb/README @@ -0,0 +1,84 @@ + + Literate Programming for Prolog with LaTeX. + + Gerd Neugebauer + FB Informatik, Universität Koblenz-Landau + gerd@informatik.uni-koblenz.de + + +This file describes the installation procedure of the style options pl +and pcode. The documentation will be produced during this process. + +Files +===== + +The distribution of pl.sty contains at least the following files: + +README This file. +pl.doc The documented style file. +pl.ins The docstrip program to produce pl.sty. +pl.tex The driver file to produce the documentation. +pl.cfg The documentation configuration file. +sample.pl A sample Prolog file. +Makefile A makefile for UN*X (or whoever can use it) + + + +Prerequisites +============= + +(1) You need to have installed LaTeX. + LaTeX 2.09 is ok. + +(2) You need the style option doc.sty and the file docstrip.tex on + your TeX search path. (To put them in the current directory should + also work) + You need a version distributed with LaTeX2e --- even if you still + use LaTeX 2.09. + +(3) You need multicol.sty. At least a file named multicol.sty should + be on your TeX search path if you use LaTeX 2.09. + +(4) You should have the program makeindex to generate the index for the full + documentation. + + +Installation +============ + +(1) If you have a working make (e.g. on UNIX) you can just type + + make + + This performs the following steps which can also be started + manually: + + (1.1) Run LaTeX on the file pl.ins like in + + latex pl.ins + + This should produce the files pl.sty and pcode.sty + (and as a side effect the file pl.log) + + (1.2) Run LaTeX on the file pl.tex like in + + latex pl.tex + + This will produce the documentation file pl.dvi + +(2) Place the file pl.sty and maybe pcode.sty in a place where TeX + searches for it. + +(3) Print the documentation pl.dvi and READ it! + + +PROBLEMS +======== + +* If you do not get your hands on the appropriate version of + docstrip then you can just rename pl.doc into pl.sty. This + should work even if the startup time might be slightly higher. + +* If you get an error during the processing of pl.tex, most + likely your version of doc.sty or multicol.sty is out of date. + diff --git a/Master/texmf-dist/doc/latex/plweb/pl.dvi b/Master/texmf-dist/doc/latex/plweb/pl.dvi deleted file mode 100644 index 1d08cc619df..00000000000 Binary files a/Master/texmf-dist/doc/latex/plweb/pl.dvi and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/plweb/pl.pdf b/Master/texmf-dist/doc/latex/plweb/pl.pdf new file mode 100644 index 00000000000..54a807060b7 Binary files /dev/null and b/Master/texmf-dist/doc/latex/plweb/pl.pdf differ diff --git a/Master/texmf-dist/doc/latex/plweb/sample.pl b/Master/texmf-dist/doc/latex/plweb/sample.pl new file mode 100644 index 00000000000..bbd94d15d7c --- /dev/null +++ b/Master/texmf-dist/doc/latex/plweb/sample.pl @@ -0,0 +1,40 @@ +%%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%^^A This is a sample file to demonstrate the use of the \LaTeX style option +%%^^A pl.sty. +%%^^A +%%^^A The ^^A is just used to make it printable with the documentation. +%%^^A doc.sty insists on it. Otherwise a single % would have been enough. +%%^^A +%%^^A written by gene 11/94 +%%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +:- module(sample). /* + +This is a dummy module to show the possibilities of the \LaTeX{} style +option pl. +We define a predicate. It looks like + +\Predicate select/3(Member, List, Rest). + +This predicate describes the relation of the three arguments which fulfill +$\mbox{\it Member}\in\mbox{\it List}$\/ and $\mbox{\it Rest}=\mbox{\it +List}\backslash\mbox{\it Member}$. + +And here comes the implementation: +\PL*/ +select(Member,[Member|Rest],Rest). +select(Member,[Head|List],[Head|Rest]) :- + select(Member,List,Rest). +/*PL + +\Predicate in/2(Member, List). + +This predicate is a reimplementation of the predicate \verb|member/2| +using the \verb|select/3| predicate. + +\PL*/ +in(Member,List) :- + select(Member,List,_). +/*PL +Now we are done with the example. +\EndProlog*/ -- cgit v1.2.3