Specifying Customizations for Schedule Viewing

Recall that the available typefaces, sizes, and colors are indicated in the customization generalities. Following are five samples of different customizations and how to achieve them. One is Sample 1 from the initial output description, but we'll come back to that one after looking at some simpler samples. As one goes through the examples here, they become increasingly complex, and the naive user may not wish to slog through this. Several predefined customizations are available from the submission page, and, most likely, I can easily write anything else that you may desire. I will be glad to respond to requests for particular customizations that you may like if you just email me (rig at cs.luc.edu) to indicate what you desire.

Sample 2

The easiest thing to do is to just submit an empty customizations file; in that case everything will be in black roman type. In the listing, you will get the "small" (9pt) typesize, and in the plot, you will get "tiny" (5pt). In the plot, each distinct row in your course data will generate a separate box, and each box in the plot will contain the entire input line for your course except the entries in the Code, Days, Beg, End, and Link columns. (The time information will be used to determine the box position, and the link information will be used to draw gray arrows.) Here we use the same course data as in Sample 1 and the same grid data but an empty file for customization settings: The Sample 2 results follow: empty2004fa Schedule

The following views of the "empty2004fa" schedule were produced using this course data, this grid data, and these customization settings:




 

 You may notice that in this example, some of the courses have too
much data to fit comfortably within the corresponding box.  Even
worse, there are two boxes for different courses (330-001 and 101-002
on Tuesday) that are on top of one another.  That's because the input
data includes more than four courses meeting at the same time on
Tuesday, and I've only allowed space in the plot for four.  The latter
problem can be alleviated by consolidating course sections that have
mostly the same information, e.g., plotting the two 271 lecture
sections (271-001 and 271-002) in the same box.  In the next sample,
such consolidations are done, and the amount of data printed in each
box is toned down to respond to the first problem.



Sample 3

This sample is intended to illustrate a toning down of the amount of data per course and consolidation of similar courses in the plot so that the plot is a little less busy. Also, by using fewer output columns in the PS and PDF listings, it facilitates use of a larger type size, which will allow a nice illustration of how headings are done when the listing goes over 1 page. (This example could be done with a simpler customization file than we are about to show by just removing some columns from the input; then you would also get narrower plain text listings. But we show here how to use the same input file as before and just restrict the PS and PDF output.)

For the following results, we use the same grid data that was used for all prior samples and also the same course data. We also used this tiny customization file.

The first line of the customization file contains a comment. Any line or portion of a line beginning with "#" is a comment. Once comments are stripped out, there are three possible types of lines that one may use in the customization file, depending on the number of colon-separated fields in the line.

The first line of this customization file is a type of setting recognized by the presence of two colon-separated fields; the first field is a test, and the second is a setting to be applied to all parts of the course data. (The customizations are applied line by line to each course to be listed or plotted.) In the example here, the test is of a special implementation variable ploT, which is set to 1 when performing customizations for a plot and 0 when performing customizations for a listing. (Note the unusual use of lower-case and upper-case letters in the variable name.) The "!=" is an inequality test. Thus, this line sets all parts of the course data in "Large" (14pt) type when not processing a plot. The double backslash before "Large" and the quotes are due to implementation details regarding use of the AWK programming language and LaTeX document formatting program. (Don't worry; you do not need to know either of these languages, since it should generally be easy for you to copy or emulate the what you see. For example, to obtain a different typesize or typeface, you can just replace "Large" with anything from the list of size and face names --- PS, PDF. You can also use both a size and a face by typing, e.g., "\\huge\\bf".) The backslash is a special character in AWK, so the doubled version is used to produce just one backslash in the output. The reason there is even one backslash is that backslash is also special for LaTeX; it introduces a LaTeX command.

The next section in the customization file is used to restrict the columns that appear in the heading and data rows of the PS and PDF listings and make the headings come out in "Large" type. These lines would be unnecessary if one simply limited the input data to what one wants to print. But with the bigger input that is trimmed down in the PS and PDF output, we use here two special variables heaD and outpuT (with unusual case as before) that define the content of the header and data rows in the PS and PDF listings. The settings of these variables may look rather strange, because they are based on details of AWK and LaTeX, but you can just mimic the style.

The next section in the customization file defines the conditions under which courses are consolidated into a single box in the plot, the format of data that may be gathered from different input lines in the course data for consolidation into a single box, and the choice of other data printed in the box. All these lines (after the comment) are a different type of setting than what we saw before; they are recognized by the presence of just one (colon-separated) field. Each such line is used directly as an "action" in the AWK programming language. (Again, don't worry about fully understanding AWK, because you should be able to emulate emulate customization examples provided through this page.)

The first line of this consolidation section sets a special variable keY; note the unusual case. The value of keY is what courses must have in common in order to be consolidated into a single box. You pretty much need to you start the value of keY with "$daY$Beg$End" to be doing something sensible. Note that the first thing in the keY value is a column name daY with unusual case. This is not the Days column that is expected to be present in the input data; rather it is a new column added by the implementation to the course data that was provided. (The new column is not modified by the general customization settings that appeared above.) This new column is utilized because courses are actually split into separate entries for each day of the week on which they meet before they are processed further for plotting, and $daY denotes the single meeting day for the item currently under consideration. In this example, courses that have the same time, location, and title are consolidated; these courses may differ in other columns, e.g., course number and section number. (Recall that Beg and End are required input columns; a special implementation trick is used so that if the course data lacks a Loc or Title column, it will be harmless, but if you write your own keY setting, you should generally be careful that any new column names you introduce actually appear in your input.)

(You may have noticed by now that when the underlying software automatically creates a new column name or a variable assignment, it uses a name that is all lower-case except the last letter. The user can create his own temporary variables in the customization file; to avoid conflicts with other names, it is safest for the user to introduce only new variables that do not begin or end with an upper-case letter and to use column names that have a single upper-case letter at the beginning.)

Skipping down to the third line of the consolidation section, we find the format for non-common data that must be joined from each of the courses being consolidated. In this example, the visible representation is the course number followed by an underscore (preceded by one backslash in LaTeX since it is a special character and, thus, two backslashes inside the AWK string) and the section number, but the "\node" command of the LaTeX tree-dvips package is used to label the section number so that it can be the source and/or target of a link (gray arrow in the plot). This line uses the special variable codeplaiN to recover the original input value in the Code column before its modification by other lines in the customization file. Such a variable setting is automatically provided for each column in the input data. (These node labels are attached automatically to courses that are not consolidated with something else, but if consolidation is occuring, the customization file is responsible for deciding how to attach these labels.)

Going back to the second line of the consolidation section, we find the key logic to effect the consolidation. You will almost certainly not want to modify this line, but if you understand LaTeX, you could change the terminal "\\\\" to end up with something other than "\\" (which is the LaTeX new line command) as the separator between the non-common data fragments from different courses.

The remaining lines of the customization section are all designed to manipulate a special variable corE. This variable is initially set by the processing software to contain all the original input fields for the course (separated by spaces) except for Code, Days, Beg, End, and Link. (That is corE contains all the course data that won't already be shown in the plot by way of positioning and arrows.) But in our consolidation of similar courses, we have determined that the contents of the Num and Sec columns may differ among items that are consolidated, and we have defined a print format (in joiN) for the non-common Num and Sec data that is joined together. Thus we wish to exclude the Num and Sec data from the remaining print content of the box. We do this by emptying the content of corE so that the processing software will recompute it later, and we add directives to omit the Num and Sec columns. (Note that a reference to column content is, e.g., "$Num", but the form needed to exclude $Num from corE is "corexclude[Num]=1" with no "$".) We also further tone down the amount of data to print in the boxes (as we had indicated we would do) by excluding the Type, Cred, Lim, and Link columns. This is consistent with the way we toned down the amount of data in the PS and PDF listings. (We wouldn't need to do this if we had just put fewer columns in the input.)

You may be wondering how we managed in Sample 2 to omit the consolidation section completely. Such an omission is fine if you do not want any different input lines from the course data to be consolidated in the plot; you will get a default value of keY containing "$daY$Beg$End" and then all input data for the course, starting from the first column, and then columns added automatically when courses are processed for plotting:

The results for Sample 3 follow: fewcols2004fa Schedule

The following views of the "fewcols2004fa" schedule were produced using this course data, this grid data, and these customization settings:




 




Sample 4

In this sample we return to the exact same course data as in Sample 1 and Sample 2 and the same grid data but with this customization file. This customization file illustrates some new features.

The first two lines of this customization file are in the format of two (colon-separated) fields specifying a test and then a setting. The first of these two lines assigns the color Blue to all parts of a course's data as long as the course number (in the Num column) contains a three digit number beginning with a digit in the range 0 to 3. The ~ character and the slashes around the specification of the digits are part of the AWK syntax for pattern matching. (This is a safer way to do the test than a numeric "<400" test in case the Num column is actually not present or in case some preceding manipulation has already added non-numeric content to the field (e.g., a color, size, or typeface).) The second of the two lines assigns the color BrickRed to courses in which the Num contains a three digit number of 400 or greater. (It should be apparent how to change the number of digits in course numbers or the cutoff between undergraduate and graduate.) These two lines show the detailed syntax for a color setting with the string "\\color" and the curly braces around the color name; to use a different color it is only necessary to change the color name.

The next three non-blank lines of the customization file determine a typeface for each course according to it's location. These lines again use the format of test and then setting. The third line in this section uses the test "1", meaning that the condition is always satisfied. Thus every course gets a setting of the sans serif typeface, but this is applied after the possible application of boldface for courses at WTC or roman for courses at LSC, and the first typeface overrides any later typeface setting. The result, then, is that courses at WTC are in boldface, those at LSC are in roman, and other courses are in sans serif. (The rule that the first setting overrides later settings also applies to typesizes; similarly it applies to colors. But settings of typeface are independent of typesize settings, and similarly for any two different categories of settings.)

Next comes the section for consolidation of similar courses in the plot. This section introduces no new concepts as compared to Sample 3, but it changes the values of keY and coreE. In this example, courses that have the same time, location, type, credits, and instructor are consolidated; these courses may differ in other columns, e.g., course number, section number, and title. (One may note that the input data we are working with does have crosslisted courses with slightly different titles; they won't consolidate here, because they are not at the same level (undergraduate versus graduate), so they'll have different colors in the fields in keY, but in the next sample, they will consolidate.) Unlike the prior example, we do not make corexcludE settings and leave the redefinition of corE to the underlying software; instead here we explicitly define the format for the core data to print in each box in the plot.

Finally, the customization file specifies one more detail for plots; the typesize is set to "scriptsize" (7pt) by using the "==" test for equality. Note the doubled equal sign for the equality test; a single equal sign is an assignment.

The settings for Sample 4 can be summarized as follows:

The results for Sample 4 follow: simplest2004fa Schedule

The following views of the "simplest2004fa" schedule were produced using this course data, this grid data, and these customization settings:




 




Sample 5

In this sample we again use the exact same course data as in Sample 1, Sample 2, and Sample 4, and the same grid data but with this customization file.

The customization here differs only a little from that of Sample 4. The first change is that the initial color customization by course number is not applied to all fields of the course data; rather it is only applied to the course number and section number. This is done with two lines of a slightly different form than we have seen before. These lines in the customization file. have more than two (whitespace separated) fields; they are thus interpreted as specifying a test, then a setting, and then a list of the course data fields to which the setting should be applied. After this initial color customization, we do the same consolidation of courses for the plot as we did in Sample 4, but now there is nothing to impede consolidation of courses that have the same time, location, type, credits, and instructor, even if one is undergraduate and one is graduate. Before, they would not consolidate, because different colors had been applied to there common data; now the initial color customization has not been applied to any of the fields in the keY variable that controls consolidation.

The second new feature of the customization file is that we do a test after consolidation for courses that are crosslisted undergraduate and graduate courses. We use our knowledge of the format used for consolidating the non-common information from consolidated courses to search for appropriate patterns indicating a three-digit course number of 400 or greater and a three-digit course number of 399 or less. Understanding this statement in detail does require some understanding of the AWK programming language, but one should be able to see how to do simple modifications such as changing the form of numbers indicating undergraduate versus graduate. The setting applied here to courses that are crosslisted undergraduate/graduate is to color them Magenta (chosen because it is the additive combination of Red and Blue). The previous settings of Blue and Red for course/section numbers of undergraduate and graduate courses, respectively, take precedence, but now any remaining fields of crosslisted undergraduate/graduate courses are colored Magenta.

Next, this customization file applies the earlier Blue and Red colorings for undergaduate and graduate course/section numbers, respectively to the remaining fields of these courses. For crosslisted undergraduate/graduate courses, the Magenta setting for these other fields will take precedence, but courses that are solely undergraduate or graduate will now be totally colored Blue or Red, respectively. This coloring of all fields was deferred to avoid interfering with consolidation in the plot of crosslisted undergradate/graduate courses. (An alternative way to write these two lines would be:

 $Num~/Red/ "\\color{Red}"
 $Num~/Blue/ "\\color{Blue}"
 
)

The settings for Sample 5 can be summarized as follows:

The results for Sample 5 follow: simpler2004fa Schedule

The following views of the "simpler2004fa" schedule were produced using this course data, this grid data, and these customization settings:




 




Sample 1

Now we return to Sample 1, which was presented in the initial output description. Sample 1 differs from Sample 5, that we just looked at only in using a slightly more complicated customization file.

The customization here differs from that of Sample 5 only in that course level (undergraduate versus graduate) is coded by tpeface rather than color, and colors are used to code course location and type (e.g., lab versus lecture) rather than level. The substitution of typefaces for colors with the level tests should be immediately comprehensible. The color-coding by level and type is just a bit more subtle, because the order is significant. We do more specific tests first (e.g., coloring a WTC Lab CornflowerBlue) before a more inclusive test (e.g., coloring all WTC courses Blue). The first setting of CornflowerBlue will take precedence for a WTC Lab, while all other WTC courses will be colored Blue.

The settings for Sample 1 can be summarized as follows:

The results for Sample 1 are repeated here: 2004fa Schedule

The following views of the "2004fa" schedule were produced using this course data, this grid data, and these customization settings:




 







Last updated on 29-Jan-08 at 11:30 CST by Ronald I. Greenberg (rig at cs.luc.edu)