File: prerex.1

package info (click to toggle)
prerex 6.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 548 kB
  • sloc: ansic: 2,750; sh: 865; makefile: 14
file content (460 lines) | stat: -rw-r--r-- 10,970 bytes parent folder | download | duplicates (2)
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
.TH PREREX 1 2019-11-15 "prerex-6.8.0" ""
.SH NAME
prerex \- interactive editor of prerequisite-chart descriptions 
.SH SYNOPSIS
.BR prerex 
[
.IR options
]  [ 
.IR basefile [ .tex ] 
[ 
.IR chartfile [ .tex ] 
] 
]
.SH DESCRIPTION
.B prerex
is an interactive program
for editing prerequisite-chart descriptions in the
.BR prerex (5)
format.
The user does not normally have to
be familiar with details of the format.  
The editor supports add, remove, cut-and-paste, and edit operations
on diagram elements, and vertical or horizontal shifts of a list of specified elements, all the
elements in a rectangular region, or the entire diagram.  The edited diagram 
may be saved, re-processed, and viewed in a PDF 
viewer, without exiting the editor. Alternatively,
.BR vprerex (1) 
will open a 
.BR prerex (1)
window and display the corresponding PDF file alongside.
.SH TERMINOLOGY
A prerequisite chart consists of several
.I course boxes,
linked by 
.I arrows.
Courses are either
.I half
or
.I full,
and may be
.I required 
or
.I optional 
(or neither).
Each course box contains a course
.I code
(upper left corner),
a course 
.I title
(lower half),
and
.I timetable
information
(upper right corner).
An arrow is either a
.I prerequisite 
(solid),
a
.I corequisite 
(dotted),
or 
.I recommended 
(dashed).
When a conventional arrow would be inappropriate,
a
.I mini 
course just above a target box may be used.
A line of text may have been placed anywhere in the chart.
.PP
In some implementations of the
.BR prerex (5)
format,
(some) arrows may be curved and by default have non-zero curvature.
The curvature of individual arrows may be edited
using the
.BR prerex (1)
editor.
Negative curvatures are supported.
To modify the default curvature
(or set it to zero),
see
.BR prerex.sty (7).
.SH COORDINATE SYSTEM
A conventional two-dimensional
coordinate system is used to specify the locations of
diagram elements;
the
origin (where
.I x = 0
and
.IR "y = 0" )
is at the lower-left corner of the diagram.
For convenience, a coordinate grid is normally displayed in the background while a diagram is
being edited.
.PP
The coordinates of a
.I box,
.I mini,
or
.I text-line
are those of its centre point.  
An
.I arrow 
is described by the
coordinates of the centre points of its source and target boxes/minis/text-lines. 

The notation
.IB "x0,y0" : "x1,y1"
denotes all the nodes (course boxes, minis, texts) in the rectangle whose northwest and southeast corners are at
coordinates
.IR "x0,y0 " and " x1,y1."
.SH USAGE
If 
.B prerex
is invoked on one existing file, a back-up copy is made of it, the 
.I x,y
coordinate grid is turned on, the file is processed by using
a system call to
.BR pdflatex (1),
and
then the user gets 
a command summary and an interactive prompt 
of the form
.IP
.I file.tex>
.LP
If no file argument is given on the command line, the user is prompted to supply a
file name.
In either case, 
if the file name provided does not have a 
.I .tex 
extension, 
.I .tex
is appended to it.
.PP
If the 
.I file.tex 
file named does 
.I not 
already exist, 
a new "empty" chart file with that name is
created, and then it is processed as above. 
.PP
If a 
.I second 
filename is provided, the first filename is treated as the base file of a
LaTeX document and the second as an included file that contains the 
.I chart 
environment to be edited.  This allows more than
one document to share an included chart file and allows more than one
chart to be included in a single document.
.PP
The user may enter commands at the interactive command prompt as follows:
.TP 18
.BI   box   " x,y"
edit a course box at
.I x,y, 
if necessary, creating a new course box there 
.TP
.BI  mini   " x,y"   
edit a mini at
.I x,y,
if necessary, creating a new mini there 
.TP
.BI text   " x,y"
edit a text-line at
.I x,y,
if necessary, creating a new text-line there 
.TP
.BI  arrow  " x0,y0,x1,y1" 
edit an arrow from
.I x0,y0 
to 
.I x1,y1,
if necessary, creating a new such arrow 
.TP
.BI  cut    " xi,yi ... "          
(temporarily) remove the box, mini, or text at 
.I xi,yi                         
(including arrows into/out of the box/mini/text)
.TP
.BI  "paste [" x,y "]"          
re-insert most recently cut but not yet pasted box, mini, or text at 
.I x,y                  
(including arrows into/out of the box/mini/text), or at the original coordinates if 
.I " x,y"
omitted
.TP
.BI  xchange " x0,y0 x1,y1"
exchange the box, mini or text at 
.I x0,y0
with that at
.I x1,y1.
This is implemented as a sequence of two cuts followed by two pastes to the same points.
.TP
.BI  "delete [ " x,y "  | " x0,y0,x1,y1 "  | " x0,y0 : x1,y1 " ] "  ...          
remove the specified boxes, minis, texts, or arrows 
(including automatically all arrows into/out of each box/mini/text)
.TP
.B undo
undo the most recent editing command (not already undone)
.TP
.BI  "shift  [\-]"  s  "  [ " x,y " | " x0,y0 : x1,y1 " ] " ...         
move specified diagram elements 
.I x 
units right [left]; if no elements are specified, the whole diagram is shifted
.TP
.BI  "raise [\-]" r   " [ " x,y " | " x0,y0 : x1,y1 " ] " ...
move specified diagram elements 
.I y 
units up [down]; if no elements are specified, the whole diagram is raised 
.TP
.B   "write, !"                   
save to the current
.I chartfile.tex
and process the chart by calling
.BR pdflatex (1)
on the base file.
.TP
.B  "quit, exit, x, ^D"                  
turn off the coordinate grid, restore write-access, save to the current
.I chartfile.tex,
process the base file and exit.  
.TP
.BI  ! cmd            
restore write access to 
.I chartfile.tex, 
execute shell command
.I cmd,
re-load and re-process 
the base file
(in case the command changed anything),
and remove write-access.  
.TP
.B "Backup"
copy the current
.I chartfile.tex
to the back-up file
.IR .chartfile.tex; 
equivalent to
.BI !cp " chartfile.tex .chartfile.tex"
.TP
.B "Restore"
delete the current 
.I chartfile.tex 
and editing buffer, and replace them using the current back-up
in
.I .chartfile.tex.
.TP 
.BR grid  " [y/n]"
turn on/off coordinate-grid background         
.TP
.BR  "help, ?"
print a command summary                             
.LP
After most editing commands, the editing buffer is automatically
saved to
.I chartfile.tex
and the basefile is processed; the 
.B cut
and
.B paste
commands are exceptions: saving and processing
take place only when all outstanding cuts have been pasted.  
Saving
and processing
can be 
.I forced 
by using the
.B write 
(or 
.BR ! ) 
command,
or 
.I suppressed 
for 
all commands (except
.BR write 
and
.BR ! )
by appending a ";" to the command immediately prior to entering it.
To exit the editor
.I without
saving to the current
.IR chartfile.tex ,
use 
.B quit; 
(.i.e., 
.B quit
followed by a semi-colon) or a similar combination.
Starting in Version 3.8,
.B ^C
and other interrupts
result in the editing buffer being saved to
.I chartfile.tex
before the editor is exited.
.SH OPTIONS
.TP 8
.BR -v 
output program name and version number, and quit
.TP
.BR -h
output usage summary and quit
.SH NOTES
The main difference between 
.B mini 
and 
.B text 
is in the maximum lengths for the text displayed; the latter allows a full line of text, not 
merely a course code. Also a text-line does not have an associated URI (when
the grid is off). The text "line" may actually
be displayed as a paragraph by using a LaTeX \\parbox.
.PP
To save the current state of 
.I chartfile.tex, 
use 
.B Backup
or a comparable shell command.
A history list
of interpreted commands
is maintained and is accessible using the up-arrow key.
.PP
If 
processing of the chart fails, 
.B prerex
will attempt to display the LaTeX error message from the log file. 
The chart file 
can be fixed using a conventional text editor or LaTeX-oriented  editor.
LaTeX processing should fail only if there is an initial problem
or if ill-formed LaTeX markup has been inserted into a text field.
.PP
Any (non-empty) prefix of a command suffices; for example,
.BR q ,
.BR qu ,
or
.B qui 
may
be used instead of
.BR quit .
Some of the commands will begin a dialogue with the user in
order to fill in or modify
properties; the prompts should be self-explanatory.  
.PP
Since version 5.5,
.B prerex
no longer automatically calls a PDF viewer (because it may be embedded in an
instance of
.BR vprerex (1)
which already provides a PDF display). If 
.B prerex 
is being used by itself, a PDF viewer may be invoked using the
.BI ! cmd
shell-escape
mechanism.
Also,
.B prerex
no longer interacts with the user until a PDF file is available; this is for use
with
.BR vprerex (1).  
For example, if the .tex file is initially read-only, 
.B prerex
aborts.
.SH FILES
A LaTeX style file 
.BR prerex.sty (7) 
that implements
the macro calls defined by the 
.BR prerex (5)
format must be available to
.BR [pdf]latex (1)
to
process the chart file.
Before any editing is allowed, 
.I chartfile.tex
is copied to 
.I .chartfile.tex
as a backup.
.SH ENVIRONMENT
.PP
The most convenient viewing program to use with
.B prerex
is one like
.BR gv (1),
.BR gsview (1), 
.BR kghostview(1),
.BR kpdf (1)
or
.BR okular (1)
that may be configured to "watch" the pdf file and re-load the display automatically when the file changes.
.BR evince (1)
has a Reload button and
.BR xpdf (1)
supports re-loading using the keystroke "R", but 
re-loading is much less convenient with
.BR acroread (1)
and
.BR gpdf (1),
which
may have to be re-started.
.PP
Recent versions of some PDF viewers show the URIs of hyperlinks in a tooltip or in the status bar;
this mechanism is
used by some implementations of 
.BR prerex.sty (7)
to allow display of the coordinates of a box, mini, text-line, or arrow when the mouse hovers over it
(while the coordinate grid is on and the relevant chart file is presumably being edited).
.PP
The 
.B prerex
package at 
.B http://www.ctan.org/tex-archive/graphics/prerex/
has source code for
.BR vprerex (1),
a GUI front-end for 
.B prerex
which is prerex-enabled.
.SH BUGS
.B prerex 
analyzes chart files without using TeX; thus,
macro calls are 
.I not
expanded, and
anything in the chart file before or after the (first)
.B "\ebegin{chart} ... \eend{chart}" 
environment
is ignored (but preserved) by the editor.
Lines that begin with "%" within the chart environment are 
preserved but other comments within the chart environment are
.I not
preserved and may interfere with command parsing.
.PP
From  version 5.6,
.B prerex
no longer supports the latex -> dvips -> ps2pdf toolchain as an option.
.SH AUTHOR
R. D. Tennent (rdt@cs.queensu.ca)
.SH DEPENDENCIES
.B prerex
uses the  
.BR editline (3)
library if available and the GNU
.BR readline (3)
and
.BR history (3)
libraries otherwise.
.SH SEE ALSO
.BR acroread (1), 
.BR evince (1), 
.BR gpdf (1),
.BR gsview (1), 
.BR gv (1), 
.BR kghostview (1),
.BR kpdf (1), 
.BR okular (1),
.BR pdflatex (1),
.BR prerex (5),
.BR prerex.sty (7),
.BR previewer (1),
.BR vprerex (1),
.BR xpdf (1).