PREREX(5)
π PREREX(5) π
okay bestie, welcome to prerex_format β the format for prerequisite-chart descriptions. section 5 of the manual, and honestly? it's giving "niche but iconic". let's get into it π
β¨ NAME β¨
prerex_format β a format for prerequisite-chart descriptions. yes that's the whole thing, she's concise π
πΈ DESCRIPTION πΈ
so like, 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 literally any conventional text editor, no gatekeeping here π«Ά).
π¦ TERMINOLOGY π¦
a prerequisite chart is made of a bunch of course boxes, linked by arrows. that's the whole vibe.
courses are either half or full, and may be required or optional (or neither β she's just existing, main character energy).
each course box can contain:
- a course code β upper left corner
- a course title β lower half
- timetable information β upper right corner
and an arrow can be one of three things:
- a prerequisite β solid
- a corequisite β dotted
- recommended β dashed
when a conventional arrow would be inappropriate, you can use a mini course just above a target box instead. little baby course. adorable. π₯Ί
β STRUCTURE β
the file should contain exactly one instance of a LaTeX environment:
\begin{chart} instruction ... \end{chart}
with at most one instruction per line. periodt.
not me reminding you that a program like prerex(1) analyzes prerex-format files without using TeX β so macro definitions get ignored and macro calls do not get expanded. iykyk π
instructions may be preceded by white space. lines that start with % are treated as comments and ignored (ghosted, blocked, uninvited π).
the order of instructions is not significant, except for one tiny thing: the instruction for the source and target box of an arrow should come before the instruction for the arrow. chronologically correct, bestie.
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}
where x,y are the coordinates of the centerpoint of the box, relative to the origin of the coordinate system at the lower-left corner of the diagram. the code, title, and timetable arguments are arbitrary (well-bracketed) text, possibly with LaTeX markup. yes you can be extra with it β¨
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}
color? custom?? obsessed. π
π§ 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}
heads up: the maximum allowed length of a course-code may be smaller than the maximum allowed for a line of text. so like, don't come for me when your code gets cut off π
π₯ 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:
these produce, respectively, solid, dotted, and dashed arrows from the course box (or mini) centered at coordinates x0,y0 to the course box centered at coordinates x1,y1. point A to point B, we love a journey π«
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:
where c is an integer in the range -100:100 specifying the desired curvature. for example, c=0 will produce a straight arrow. to change the default curvature, the user program may redefine the \DefaultCurvature command. bendy arrows are highkey a personality trait π
π COORDINATE GRID π
the following instruction produces a coordinate grid, which is useful for editing a diagram:
\grid
this is normally placed before all the other instructions so that grid lines are in the background, covered by course boxes, minis, and arrows. layering, but make it LaTeX. β¨
π 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 coordinate of the box, mini, or textline
- the y coordinate of the box, mini, or textline
- the
codeargument of the course box
for example:
\renewcommand{\CourseURL}[3]{http://www.cs.queensu.ca/undergraduate/courses/#3.html}
is appropriate for courses at the School of Computing, Queen's University. the first two arguments can be used to display the coordinates of a box, mini, or textline in some PDF viewers while the mouse hovers over it when the source file is being edited. hover-to-see-coordinates is such a serve, no cap π±οΈπ
π AUTHOR π
R. D. Tennent (rdt@cs.queensu.ca)
π SEE ALSO π
prerex(1)prerex.sty(7)
and that's the whole page, bestie!! π this was prerex_format, from 2019-11-15 β go forth and chart those prerequisites, you absolute icon πβ¨π¦
π¦ where this page comes from
- arch rolling: texlive-doc 2026.1-1 Β· GPL
- debian bookworm: prerex 6.8.0-1
- debian trixie: prerex 6.8.0-1
- fedora 43: texlive-prerex 11:svn54512-80.fc43 Β· GPL-1.0-or-later
- fedora 44: texlive-prerex 12:svn54512-1.fc44 Β· GPL-2.0-only AND LPPL-1.3c
- fedora 44: texlive-prerex 12:svn54512-3.fc44 Β· GPL-2.0-only AND LPPL-1.3c
- opensuse-leap 16.0: texlive-prerex-doc 2025.221.svn54512-160000.3.1 Β· GPL-2.0-or-later
- ubuntu jammy: prerex 6.8.0-1
- ubuntu noble: prerex 6.8.0-1
- ubuntu resolute: prerex 6.8.0-2 Β· GPL-2.0-or-later
- ubuntu stonking: prerex 6.8.0-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms