-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathglosshtml.m4
76 lines (72 loc) · 1.84 KB
/
glosshtml.m4
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
dnl Copyright(2000): Albert van der Horst, HCC FIG Holland by GNU Public License
dnl $Id: glosshtml.m4,v 5.5 2023/10/18 11:53:49 albert Exp $
divert(-1)
define({forall}, {ifelse(len({$2}),0,,
{$1}({{{$2}}})
{forall({$1},{$3},{$4},{$5},{$6},{$7},{$8},{$9},{$10})}
)})dnl
dnl Define a word definition on channel 9
dnl the corresponding menu item on channel 6
dnl and a definition for the second pass on channel 0
define({forthvar}, {<B>$1</B>})
define({forthdefi}, {<I>$1</I>})
define({forthdefin}, {<I>$1</I>})
define({forthsamp}, {<B>$1</B>})
define({forthemph}, {<B>$1</B>})
define({forthkey}, {<B>$1</B>})
define({forthfile}, {``$1''})
define({forthexample},<P><B>$1</B><P>)
define({forthcode}, <A HREF="#$1">$1</A>)
define({forthxref}, <A HREF="#$1">See also $1</A>)
define({forthpxref}, <A HREF="#$1">See also $1</A>)
dnl ----------------------- worddoc ------------------------------------
define({worddoc},{
divert(9)dnl
<P>
<HR><A NAME="$2"></A>
<H2>
$2</H2>
<P>
STACKEFFECT: $4
<P>
DESCRIPTION: [$5]
<P>
$6
<P>
<A HREF="#GLOSSARY_INDEX">GLOSSARY INDEX</A>
<P>
SEE ALSO: forthcode($1) forall({forthcode},$7)
divert(6)dnl
<LI>
<A HREF="#$2">$2</A></LI>
divert(9)dnl
})dnl
dnl ----------------------- worddocchapter -----------------------------
define({worddocchapter},{
divert(9)dnl
<P>
<HR><A NAME="$1"></A>
<H1>
$1</H1>
<P>
OVERVIEW:
<P>
$3
ifelse(len({$7}),0,,{
<P>
SEE ALSO: forall({forthcode},$7)})
divert(6)dnl
<P>
<A NAME="$1INDEX"></A>
<H4>WORDSET $1</H4>
<LI>
<A HREF="#$1">OVERVIEW OF $1</A></LI>
divert(9)dnl
})dnl
dnl ----------------------- worddocchapterend -----------------------------
define({worddocchapterend},{dnl})dnl
dnl ----------------------- get rid of test doc markers ------------------
divert(-1)undivert(2,4)
divert(0)dnl
dnl Normal description comes after the definitions but before the menu's
dnl and contents.