summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/pphlp/hlp.lse
blob: cec5b545f5721f51bdca9f781f8e59ef2f371afa (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
!======================================================================
! @LSE-command-file{
!    filename        = "hlp.lse",
!    version         = "1.0",
!    date            = "17 July 1992",
!    time            = "17:54:02.50 ",
!    author          = "Norman Gray",
!    address         = "Department of Physics
!                       Open University
!                       Milton Keynes
!                       MK7 6AA, UK",
!    e-mail          = "N.O.Gray@open.ac.uk (Internet)",
!    telephone       = "+44 908 652279",
!    FAX             = "+44 908 653744",
!    archived        = "Aston, SHSU",
!    keywords        = "hlp-files, VMS, help",
!    abstract        = "This file is part of the PPHLP package, which
!                       allows both printed manuals and VMS help library
!                       modules to be prepared from a single file.",
!    codetable       = "ISO/Ascii",
!    checksum        = "53005 155 537 5704",
!    docstring       = "This file will tell LSE about the .hlp `language'
!                       - the margins, wrap-mode, and so on.  It
!                       additionally defines a series of `adjustments', so
!                       that the code-elision feature of LSE is more
!                       effective.
!                       
!                       To use this file, enter LSE and read in this file,
!                       and then go to the command line (by pressing ^Z). 
!                       Give the command DO to define the language, and
!                       then the command SAVE ENVIRONMENT if you wish LSE
!                       to recognise the file-type .hlp in future.
!                       
!                       The checksum field above contains a CRC-16
!                       checksum as the first value, followed by the
!                       equivalent of the standard UNIX wc (word 
!                       count) utility output of lines, words, and
!                       characters.  This is produced by Robert 
!                       Solovay's checksum utility."
!}
!======================================================================

!delete language hlp
define language hlp -
	/capabilities=nodiagnostics -
	/file_types=(.hlp,.help) -
	/initial_string="%<title>%" -
	/placeholder=( -
	    optional = ("%{", "}%"), -
	    optional_list = ("%{", "}%..."), -
	    required = ("%<", ">%"), -
	    required_list = ("%<", ">%..."), -
	    pseudocode=("[ ", " ]")) -
	/identifier_characters= -
	    "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"-
	/punctuation_characters=",.;:?%{}[]<>" -
	/overview=minimum=3 -
	/left_margin=context_dependent -
	/right_margin=65 -
	/wrap -
	/tab=4

!delete adjustment/lang=hlp "$(column=1)1"
!delete adjustment/lang=hlp "$(column=1)2"
!delete adjustment/lang=hlp "$(column=1)3"
!delete adjustment/lang=hlp "$(column=1)4"
!delete adjustment/lang=hlp "$(column=1)5"
!delete adjustment/lang=hlp "$(column=1)/"
!delete adjustment/lang=hlp "$(column=1)!helpsection"  
!delete adjustment/lang=hlp "$(column=1)!title"
!delete adjustment/lang=hlp "$(column=1)!verbatimline"
!delete adjustment/lang=hlp "$(column=1)!begin{verbatim}"
!delete adjustment/lang=hlp "$(column=1)!end{verbatim}"  
!delete adjustment/lang=hlp "$(column=1)!begin{TeXtext}"
!delete adjustment/lang=hlp "$(column=1)!begin"
!delete adjustment/lang=hlp "$(column=1)!end"
!delete adjustment/lang=hlp "$(column=1)!index"

define adjustment/lang=hlp "$(column=1)1" /current=-10
define adjustment/lang=hlp "$(column=1)2" /current=-8
define adjustment/lang=hlp "$(column=1)3" /current=-6
define adjustment/lang=hlp "$(column=1)4" /current=-4
define adjustment/lang=hlp "$(column=1)5" /current=-2
define adjustment/lang=hlp "$(column=1)/" /current=-1
define adjustment/lang=hlp "$(column=1)!helpsection" -
    /inherit=next/current=-1/nooverview
define adjustment/lang=hlp "$(column=1)!title" /current=-1
define adjustment/lang=hlp "$(column=1)!verbatimline" /nooverview
define adjustment/lang=hlp "$(column=1)!begin{verbatim}" -
    /subsequent=1/nooverview
define adjustment/lang=hlp "$(column=1)!end{verbatim}" -
    /subsequent=-1
define adjustment/lang=hlp "$(column=1)!begin{TeXtext}" -
    /nooverview		! rather than following, as TeXtext isn't ended by !end
define adjustment/lang=hlp "$(column=1)!begin" /subsequent=1
define adjustment/lang=hlp "$(column=1)!end"   /subsequent=-1
define adjustment/lang=hlp "$(line_end)" /inherit=minimum/nocount/unit
define adjustment/lang=hlp "$(column=1)!index" /inherit=previous

!delete placeholder "title" /language=hlp
define placeholder "title" -
    /language=hlp
    "!title{%<text>%}"
    "!pagetitle{%<text>%}"
    "!author{%<text>%}"
    "!authorext{%<text>%}"
    "!userguide{%<text>%}"
    "!maketitle"
end define

!delete token "textext" /language=hlp
define token "textext" -
    /language=hlp
    "!begin{TeXtext}"
    "!   %{rtext}%..."
    "!\end{TeXtext}"
end define

!delete token "hlptext" /language=hlp
define token "hlptext" -
    /language=hlp
    "!beginhlptext"
    "%{rtext}%..."
    "!endhlptext
end define

!delete token "verbatim" /language=hlp
define token "verbatim" -
    /language=hlp
    "!begin{verbatim}"
    "%{rtext}%..."
    "!end{verbatim}"
end define

!delete token "<" /language=hlp
define token "<" -
    /language=hlp -
    /description="LaTeX text | hlp text"
    "!<%{text}%|%{text}%>"
end define

!delete placeholder "text" /language=hlp
define placeholder "text" -
    /language=hlp -
    /type=terminal
    "Text"
end define

!delete placeholder "rtext" /language=hlp
define placeholder "rtext" -
    /language=hlp -
    /duplication=vertical -
    /type=terminal
    "Running text"
end define