summaryrefslogtreecommitdiff
path: root/web/latexspider/spider.ltx
blob: 6e26a5304e43eb8c3b9ee3b259dc8a521fa45d6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
% this is spider.ch $Header: /home/users0/fx/ltxspiderweb/master/spider.ltx,v 1.3 91/03/22 11:19:54 fx Exp $
% for a LaTeX version of spider
% d.love@daresbury.ac.uk

l 5 (don't want batchmode for debugging;  only print changes; for
    LaTeX: want \documentstyle and fix use of \. and \title)
#x
\message{OK, entering \string\batchmode...}
\batchmode
#y
\ifx\enddocument\undefined \else % check for LaTeX
  \documentstyle[web]{article}
  \let\maybe\iffalse
  \let\.=\str
  \def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\fi
#z

l 13 (change title page stuff)
#x
\def\title{SPIDER}

\def\topofcontents{\null\vfill
  \titlefalse % include headline on the contents page
  \def\rheader{\hfil}
  \centerline{\titlefont The {\ttitlefont SPIDER} processor}
  \vfill}
#y
\ifx\enddocument\undefined	% check for LaTeX
\def\title{SPIDER}

\def\topofcontents{\null\vfill
  \titlefalse % include headline on the contents page
  \def\rheader{\hfil}
  \centerline{\titlefont The {\ttitlefont SPIDER} processor}
  \vfill}
\else
  \title{The {\tt SPIDER} processor} \date{}
\fi
#z

l 39
#x
The unusual lexical requirements of FORTRAN are probably beyond it, at 
least until the lexical analysis is modernized.)
#y
The unusual lexical requirements of FORTRAN are probably beyond it, at 
least until the lexical analysis is modernized.)

This version of Spider has been changed to be able to produce a
\.{WEAVE} suitable for use with \LaTeX{} rather than plain \TeX{}.
The changes are minor and can be found by looking up ``LaTeX'' in the
index.  You get the \LaTeX{} version by defining |LaTeX=1| or
something (the variable |LaTeX| should be non-null) on
the \.{awk} command line when you run Spider.  The limbo part will sort
itself out for \LaTeX{} or plain when you weave this file.
#z

l 188 (bug fix)
#x
#<Set init...#>=
	scrapfile = "scraps.web"
	print "@*Scrap code generated by {\tt SPIDER}." > scrapfile
	ttokfile = "outtoks.web"
	print "@*Token code generated by {\tt SPIDER}." > scrapfile
#y
#<Set init...#>=
	scrapfile = "scraps.web"
	print "@*Scrap code generated by {\\tt SPIDER}." > scrapfile
	ttokfile = "outtoks.web"
	print "@*Token code generated by {\\tt SPIDER}." > scrapfile
#z

l 211 (bug fix)
#x
	grammarfile = "grammar.web"
	print "@*Grammar code generated by {\tt SPIDER}." > grammarfile
#y
	grammarfile = "grammar.web"
	print "@*Grammar code generated by {\\tt SPIDER}." > grammarfile
#z
 
l 2108 (change for LaTeX)
#x
	printf "*out_ptr='x'; tex_printf(\"\\\\input %sweb.te\");\n", \
		extension > wlang
#y
	if (LaTeX=="") { #^LaTeX#>
	printf "*out_ptr='x'; tex_printf(\"\\\\input %sweb.te\");\n", \
		extension > wlang
	}else{
	printf "*out_ptr='}'; tex_printf(\"\\\\def\\\\webmacs{%sweb.tex\");\n", \
		extension > wlang
	}
#z

l 2121 (change for LaTeX)
#x
#<Write the first line of the macro file#>=
	macrofile = extension "web.tex"
	print "\\input webkernel.tex" > macrofile
#y
#<Write the first line of the macro file#>=
	macrofile = extension "web.tex"
	if (LaTeX=="") print "\\input webkernel.tex" > macrofile #^LaTeX#>
#z