Making Your Teaching Easier With L^{A}TEX: The Class Setup

Andrew D. Lewis andrew@mast.queensu.ca 06 March 1997

1 Introduction

What I call the “Class Setup” is a way to use some special L^{A}TEX document classes within a specified directory structure to organise and automate some of your administrative duties as a teacher. When used in affiliation with my Grader program with its attendant L^{A}TEX class files, you also have the capability of easily computing grades when the quarter or semester is over. Also in this group of programs is the Histogram program which uses Grader output to make histograms which may be processed by L^{A}TEX.

This all does presume that you are using L^{A}TEX 2ε. If you are not now, then you soon will be probably. If L^{A}TEX 2ε is not available to you, you are pretty much out of luck as far as a quick fix goes. It would be easier to get and install L^{A}TEX 2ε than it would be to modify all these programs to work with the old version of L^{A}TEX. Talk to your system administrator.

This documentation assumes that you are a UNIX user. If you have been able to install all these programs on other machines, then it should be clear which statements need to be modified to be true for the machine you are using.

2 What You Should Have

You should unpack what you receive with the Class Setup into a directory called class. The setup should have the following directories and files:

1. The file COPYRIGHT saying the usual stuff about free software. It is there — you have been told.

2. The file Changes which logs the evolution of Class.

3. The file README which will explain to anyone who has no clue what they have found, the contents of the directory. Since you are reading this documentation, you probably already know these things.

4. The directory bin which contains some binaries you may find useful when using the Class Setup. These executables should be installed somewhere where they can be accessed.

5. The directory demo which contains a sample of a semester so you can use it as a template for what you will do.

6. The directory doc which contains the file used to produce what you are now reading. To produce this file you must use L^{A}TEX 2ε.

7. The directory grader which contains the code and documentation for the Grader program.

8. The directory histogram which contains the code and documentation for the Histogram program.

9. The directory sty which contains all the necessary L^{A}TEX document class and style files. These will probably have to be processed as indicated in 00readme.txt and the style files put in a place where TEX can read them.

3 How to Not Read This Documentation

Now that you have things unpacked, you may want to see what the Class Setup can do, and how it does it. You have two options open to you: 1) You can proceed to read the rest of this documentation, or 2) You can probe and let logic take over, referring to this documentation when you have questions. The first alternative is a bit on the tedious side since this documentation is detailed and is intended more for debugging than for actually figuring out what is going on. So here are a few guides for a quick probe through the demo directory so you can figure out what is happening.

1. Go to the demo directory and type ls -a. This will give a list of all the directories contained there. There is a .exams directory which is why you need the -a flag.

2. Go to the assignments directory. There will be three numbered subdirectories each containing files assignment.tex (the TEX source for the assignment and its solutions) and grades.tex (the TEX source for the grade list).

3. You may L^{A}TEX the assignment.tex files. These are intended to provide a demonstration of the features of the class document class as well as provide a template for designing your own assignments.

4. For a full description of what to do with the file grades.tex, see the documentation for Grader. If you are curious, you can do no harm by processing these files with L^{A}TEX.

5. In the demo directory you will see a subdirectory recitations. This contains notes for a weekly tutorial class. You can go in here and look around to see what it does. Here the class document class is used to make a recitation. See how the modifications are made.

6. You can now check out the .exams directory. It should be clear what to do after you have performed the above steps.

7. You will also notice the subdirectory grades in demo. This directory is for use with Grader. See the documentation for that program to figure out what to do there.

8. For more detail on any of the above read the rest of the documentation.

9. Finally, let me mention that you cannot go too far wrong by just using the given demo directory as a template for one semesters worth of work.

4 The Directory Tree

Your life will be made much easier if you use Grader to its full capacities. This requires you to have a very structured directory tree. It is also desirable for organisational purposes to have a structured directory tree. If you use Grader you are simply forced into a specific directory structure. Please read the documentation for Grader to see how this all goes and to see what exactly it is that Grader does.

However, there are some other things that you may wish to add, and here are some suggestions as to where they should go. As you can see in the demo directory, there is a subdirectory recitations as well as the directories assignments, grades, and .exams as recommended by Grader. The class I was the teaching assistant for when I developed all this stuff had a weekly recitation class. The recitation notes were L^{A}TEX’d up and put in the library for the students to copy. This is what the recitation directory is for. In it you will find subdirectories, each containing a week’s recitation notes.

In the documentation for Grader you are shown how to use the assignments directory along with its subdirectories, each containing a file of grades, to compute grades. Also in these directories you may put the L^{A}TEX source for the assignments. You can see how this is done in the demo directory. Similar remarks hold for the .exams directory. See the documentation for Grader to see how the subdirectory structure should look for .exams.

5 The L^{A}TEX Class Files

There are two basic types of L^{A}TEX files you can have in the Class Setup: “classes,” and “grade lists.” Thus there are two basic document classes available for each of these types: class and gradelist. You will use class for assignments, recitations, exams, and like objects. Of course, gradelist is used for grades, whatever they be for. Both of these document classes are based on the standard article class and have all the functionality of that class. They also have additional features. The best way to see what these class files do is to go to the appropriate directories in demo and go crazy with L^{A}TEX. However, we make some notes here:

1. Both document classes support commands \title, \num, \course, \instructor, and \year. These are used as follows:

(a) \title: This is the “title” of what you are writing: “Final Exam” if it is a final exam; “Assignment” if it is an assignment, etc.

(b) \num: If what you are writing has a number, specify it with num. For example, you might type

             \title{Assignment}
             \num{2}

(c) \course: If the course has a number or title, use course to specify it.

(d) \instructor: to name the instructor.

(e) \year: ok, you have to figure this one out yourself…

All of these are optional. However, you should type \maketitle very near the beginning of your document to save errors later.

2. The class document class comes equipped with the problems, subproblems and subsubproblems environments. These are the basic environments for writing problems. To start a new problem type \problem (just like \item in a list environment). To start a new sub(sub)problem within the sub(sub)problems environment, use \sub(sub)problem.

(a) Sometimes one wants to denote problems which may be especially challenging. This you can do by typing \problem* for a hard problem, or by typing \problem** for an especially hard problem. Only two *s will be processed :-).

(b) If you want to include point values for the problem (or subproblem or subsubproblem) as you often will with exam questions, do this by typing \problem[xxx] where xxx indicates the point value.

(c) You can label a problem for future reference to it’s number. To refer to it, the macro \probref is available and will format the reference properly.

3. The class document class has the options solutions and nosolutions which may be set to indicate whether you want the solutions displayed (if this is applicable — it may not be for recitations, for example, in which case it is irrelevant which option you use). If you set neither of these options then solutions will not be displayed. Solutions must be enclosed in the solution environment. You may start a solution environment anywhere in the assignment. Within the solution environment you may use

the problems, subproblems, and subsubproblems environments. This

suggests various possibilities for writing solutions to problems with multiple parts. Experiment and see what you like best. Some possibilities are demonstrated in the demo directory. At times you may want to do something or not, depending on whether the solutions will be present. This may be accomplished by

\solutiontest{thing to do when solutions are printed}{thing to do when solutions are not present}

Use a blank argument (or \relax) in either of the entries if you need to. To facilitate the solutions and nosolutions options, the package comment is loaded.

4. Each of the Class document classes does load the lastpage package. This is used for the headers which give the current page number as well as the total number of pages.

5. Because of the above remark, each file will have to be run through L^{A}TEX at least twice to resolve the references. Again, you can see how this works in the demo directory.

6. The class document class makes available the commands \dategiven and \datedue available. To see how these work, see the files in demo. If you don’t want this information printed on the assignment or exam, simply don’t use these commands in the preamble. This is done, for example, in the exams in demo. It is also possible to supply just one of these commands if that’s all you want.

6 Usage Notes

Here are some comments.

1. It is hoped that the Class Setup is flexible enough to allow you to adapt it to your needs which may include some “nonstandard” organisation methodologies.

2. The software is not very idiot-proof so you may have to use some ingenuity to get it to do what you want.

Please send any comments and errors to: andrew@mast.queensu.ca.