DESCRIPTION
This manual describes the format of prerequisite-chart descriptions that can be processed by [pdf]latex (normally using a suitable prerex.sty(7) style file) and edited using the prerex(1) interactive editor (or by any conventional text editor).TERMINOLOGY
A prerequisite chart consists of a number of course boxes, linked by arrows. Courses are either half or full, and may be required or optional (or neither). Each course box can contain a course code (upper left corner), a course title (lower half), and timetable information (upper right corner). An arrow can be either a prerequisite (solid), a corequisite (dotted), or recommended (dashed). When a conventional arrow would be inappropriate, a mini course just above a target box can be used.STRUCTURE
The file should contain exactly one instance of a LaTeX environment\begin{chart} instruction ... \end{chart}
with at most one instruction per line. Note that a program such as prerex(1) analyzes prerex-format files without using TeX; for example, macro definitions will be ignored and macro calls will not be expanded.
Instructions may be preceded by white space. Lines that start with % are treated as comments and ignored. The order of instructions is not significant except that the instruction for the source and target box o an arrow should precede the instruction for the arrow. The instruction formats are described in the following sections.
COURSE BOXES
The instructions producing course boxes have the following forms:-
\halfcourse x,y:{code}{title}{timetable}
- \fullcourse x,y:{code}{title}{timetable}
- \reqhalfcourse x,y:{code}{title}{timetable}
- \reqfullcourse x,y:{code}{title}{timetable}
- \opthalfcourse x,y:{code}{title}{timetable}
- \optfullcourse x,y:{code}{title}{timetable}
- \fullcourse x,y:{code}{title}{timetable}
The following are similar but take an additional argument to specify the (non-default) background color of the course box:
- \halfcoursec x,y:{code}{title}{timetable}{color}
- \fullcoursec x,y:{code}{title}{timetable}{color}
- \reqhalfcoursec x,y:{code}{title}{timetable}{color}
- \reqfullcoursec x,y:{code}{title}{timetable}{color}
- \opthalfcoursec x,y:{code}{title}{timetable}{color}
- \optfullcoursec x,y:{code}{title}{timetable}{color}
MINI COURSE BOXES AND TEXT
A mini course is produced by an instruction of the form-
\mini x,y:{code}
- A text line is inserted into the chart by an instruction of the form
-
\text x,y:{line-of-text}
- The maximum allowed length of a course-code may be smaller that the maximum allowed for a line of text.
ARROWS
Arrows between course boxes (or from a mini to a course box) are produced by instructions of the form-
\prereq x0,y0,x1,y1:
- \coreq x0,y0,x1,y1:
- \recomm x0,y0,x1,y1:
- \coreq x0,y0,x1,y1:
In some implementations, certain arrows by default have a non-zero curvature. It is possible to override the default curvature for a particular arrow by using the instructions
-
\prereqc x0,y0,x1,y1;c:
- \coreqc x0,y0,x1,y1;c:
- \recommc x0,y0,x1,y1;c:
- \coreqc x0,y0,x1,y1;c:
COORDINATE GRID
The following instruction produces a coordinate grid, which is useful for editing a diagram:- \grid
WEB LINKS
Course boxes may be linked to web addresses. The URL for course boxes may be set by the user by redefining the \CourseURL command; when called for a course box, it is supplied with three arguments, the x and y coordinates of the box, mini, or textline, and the code argument of the course box. For example,- \renewcommand{\CourseURL}[3]{http://www.cs.queensu.ca/undergraduate/courses/#3.html}