Experiences and Lessons Learned Teaching L TEX To University Students
Experiences and Lessons Learned Teaching L TEX To University Students
Gary L. Gray
Associate Professor
Department of Engineering Science and Mechanics
The Pennsylvania State University
212 Earth & Engineering Sciences Building
University Park, PA 16802
USA
[email protected]
http://www.esm.psu.edu/faculty/gray/
Francesco Costanzo
Associate Professor
Department of Engineering Science and Mechanics
The Pennsylvania State University
212 Earth & Engineering Sciences Building
University Park, PA 16802
USA
[email protected]
http://www.esm.psu.edu/faculty/costanzo/
Abstract
This paper will describe our experiences and lessons learned while teaching LATEX
to a class of students (undergraduate and graduate students) during the fall 2001
semester at The Pennsylvania State University. This was a one-credit course
taken by 9 undergraduate students (all were juniors or seniors) and 15 graduate
students. We will discuss what material was covered in class, what resources were
used in preparing the material, and what assignments were given to the students.
In addition, we will discuss those materials and assignments that proved to be
useful and those that were not so useful. We will discuss the lessons (both peda-
gogical and LATEX-related) learned by us. In addition, based on our experiences
and feedback provided by the students, we will present those lessons learned by
the students and their recommendations for improving the class in the future.
Finally, we will give our wisdom and recommendations to those instructors who
might wish to teach a similar class at their institution.
∗ When we use the term technical document, we mean a † Amazingly, they even use Word to draw figures, but that
document with many equations and figures. is a topic for a different paper.
124 TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting
Experiences and lessons learned teaching LATEX to university students
Word into LATEX. In addition, our (rather exten- both CMacTEX (Kiffe, 2002) and OzTEX (Trevor-
sive) experience with Word has been that it does row, 2002), and since, at the time, CMacTEX was
not handle long documents (such as dissertations) available for both Mac OS 9 and Mac OS X, we de-
well, does not handle floats well, is prone to file cor- cided to go with CMacTEX.
ruption, and frequently exhibits behavior that can Penn State has an extensive system of public
only be explained by postulating the existence of su- computing labs and we would estimate that approx-
pernatural forces. Therefore, we have a substantial imately 20% of the computers are Mac OS-based and
incentive to teach our students how to use LATEX in the remainder are Windows-based machines. Since
their work. neither author had extensive experience with the in-
In addition, we are frequently asked by students stallation or use of TEX under Windows, we chose
who are taking our classes and who see the rather not to ask CAC to install TEX under Windows since
nice-looking course handouts that we generate us- neither of us was likely to be able to answer any
ing LATEX, what we used to create the handouts. questions that might come up. We ended up demon-
When they hear about LATEX and the facility with strating CMacTEX on the first day of class and told
which it handles technical documents, many are in- the students that they are, of course, free to install
trigued to learn more. These students have asked LATEX on their home or lab computer. We told them
us many times if we would teach a course on how to that installations are available for virtually every op-
use LATEX. erating system, though we only had experience with
With all of these motivating factors in mind, TEX on Macs, so if they needed help with another
the stars finally aligned in the fall 2001 semester OS, they would have to see our web site for a list of
and we had the opportunity to teach a course about resources.
LATEX entitled Technical Documents with LATEX to Administrative Details In the advertisement for
a group of graduate and upper level undergraduate the class and on the first day of class, we told stu-
students. In what follows, we will attempt to convey dents that we would:
not only what we taught in the course, but how we
made the decisions to do what we did with the hope • Give them an introduction to the typesetting
that this may be useful to anyone wanting to teach language LATEX through the use of tutorials, ex-
a similar course elsewhere. ample documents, and homework assignments.
• Show them how to easily write a professional-
Class Structure and Organization looking dissertation, conference paper, and/or
journal paper. We emphasized the word “look-
The course we taught in the fall 2001 semester was a
ing” because the content is up to them.
one-credit course that met once per week for 75 min-
• Show them how to create a professional-looking
utes.∗ We met in a classroom in which each student
presentation (such as this) with LATEX.
had a laptop computer with (LA)TEX and with access
to the web. The required text for the course was the When we taught the class, we had a combined 19
3rd edition of Kopka and Daly’s excellent book on years of experience with LATEX so it was clear that
LATEX (Kopka and Daly, 1999), though we also sug- we could not teach the students everything we knew
gested that each student obtain a copy of Grätzer’s about it. In addition, our experience was almost en-
book that nicely covers AMS-LATEX (Grätzer, 2000). tirely as LATEX users and not as LATEX programmers
The course met 7 weeks of our full 15 week semester. (though this course turned out to be a good excuse
to learn a little about programming in LATEX — more
TEX Resources at Penn State At the time the on that later), so the knowledge we would convey
course was offered, we had recently switched to Mac to the students was going to be of a very practical
OS X as our primary operating system, but our uni- nature. Our goal for the course was to get the stu-
versity computing labs had not yet done so and were dents started and to point them to the numerous
still running Mac OS 9. We used, and very much other resources that are available for help with and
liked, the combination of TEXShop (Koch, 2003) as information about LATEX.
a front-end and Wierda’s TEX distribution (Wierda, There were weekly homework assignments and
2003), so we had to make the decision on what im- all homework was to be handed in electronically. In
plementation of TEX to have our Center for Aca- addition, the students certainly needed to be com-
demic Computing (CAC) install in our computing fortable with a computer.† Therefore, we told the
labs. One of the authors had a little experience with students that they needed to be able to:
∗ The vast majority of courses at PSU are 3-credit courses † Contrary to what many of us “old timers” think, many of
that meet 2–3 times per week for a total of 150 minutes/week. today’s undergraduates only know how to surf the web, send
TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting 125
Gary L. Gray and Francesco Costanzo
• move files between computers (i.e., either by file Finally, we wanted students to take the course
sharing, ftp, email, or the web); seriously and didn’t want students looking for an
• download, install, and launch applications (for easy one credit. We told the students that they had
those students wanting to install and use TEX to want to be there to learn LATEX and if they were
on their personal or lab machines); looking for an easy one credit, then they might like
• use a text editor. to find another course.
Grades are a necessary evil in every course, and Class Content
this course was no different. The grade for each stu-
dent was entirely based on their homework, which In creating the course material to be presented, we
was 75% of their grade, and their class attendance, spent some time looking around on the web to see if
which was 25% of their grade. No exams were given. anyone had created a similar course. While there
We chose to make attendance a significant portion of were several courses that had been created, they
their grade because we knew that a lot of the learn- were either in a language other than English or did
ing would be done in the classroom and we didn’t not cover as much material as we hoped to do. In
want students to miss out on that. There was weekly addition, it is generally the case that it is hard to
homework and the students always found the next take someone else’s course notes and use them as
assignment at the end of the current week’s lecture your own. So, we decided to create the course from
(more on the lecture format later). We tried to cre- scratch, using experience, Kopka and Daly (1999),
ate homework assignments such that each one would and Grätzer (2000) as our guides.
not take more than 2–3 hours to complete. We told Largely following the order of presentation in
the students that if an assignment was taking them Kopka and Daly, the seven lectures we created were
more time than that, then they were probably head- entitled:
ing in the wrong direction and that they should see 1. Introduction & Basic LATEX
us. Despite this, when turning in an assignment, 2. Displayed Text
we would have some students tell us that they had 3. Typing Mathematics in LATEX
spent 9 hours on the assignment and they still had
4. Multiline Equations in AMS-LATEX
not finished. We can’t emphasize enough that this
behavior seems to be rather common and is, most 5. Graphics & Floats
certainly, counterproductive. Therefore, it is impor- 6. User Customization & Bibliographies
tant to stress to the students that they should not 7. The PSU Thesis Package
“beat their head against the wall” trying to get these
things done — they should seek assistance. Introduction & Basic LATEX In the first lecture,
We created a rather simple web site for the we outlined the course objectives, discussed what
course where students could: LATEX is and why it is useful for students to know
it, and told the students our expectations of them.
• find course announcements;
We then covered a section entitled Getting Started
• download the course information as either a with LATEX, in which we discussed:
PDF file or the .tex course file;
• the overall structure of a LATEX document;
• download the lectures as either a PDF file or
the .tex course file; • the general structure of LATEX commands;
• download the .tex source of a number of sam- • environments and declarations;
ple documents with some some reasonably com- • characters, words, sentences, and paragraphs;
plex formatting (e.g., the ad for the course, • quotes, hyphens, and dashes;
the course information, an equation sheet for • classes, class options, and packages;
a sophomore-level course, etc.); and
• page layout (e.g., headers, footers, margins).
• find links to TEX-related resources on the web.
The last part of the first lecture was entitled Putting
The web site can be found at:
it All Together, in which we demonstrated how to
hhttp://www.esm.psu.edu/courses/latex-course/i. put all the elements discussed previously together
Taking a cue from an old Chicago voting motto, we in order to create a typesettable document. Finally,
told students to “visit it early and visit it often”. we demonstrated how to typeset a document and
and receive email, and send and receive instant messages.
view the resulting output using CMacTEX. The first
Even seemingly mundane things like files attached to email homework assignment consisted of exercises out of
messages will perplex some students. Chapters 2 and 3 of Kopka and Daly.
126 TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting
Experiences and lessons learned teaching LATEX to university students
Displayed Text In the second lecture we talked Multiline Equations in AMS-LATEX Again rely-
about: ing on Grätzer (2000) for source material, we then
• understanding and changing font characteris- presented an entire lecture on displayed multiline
tics (i.e., \emph, font sizing commands, families, equations using AMS-LATEX. We covered the philos-
shapes, and series); ophy behind AMS-LATEX’s multiline equation struc-
• centering and quoting text; tures and then went on to cover each new environ-
ment introduced by AMS-LATEX. We covered:
• lists;
• typewriter-like tabs, the tabbing environment; • grouping formulas and gather;
• boxes (i.e., how TEX defines boxes, \parbox, • splitting long formulas and multline;
\rule); • breaking and aligning formulas;
• tables (we did not cover the booktabs pack- • numbering of formulas, equation tags, and the
age (Fear, 2000) as it has been a recent discov- subequations environment;
ery, but we will do so in the future). • organization of equations into multiple columns
The second homework assignment consisted of exer- via the align environment, the flalign envi-
cises out of Chapter 4 of Kopka and Daly. ronment, and the alignat environment;
Typing Mathematics in LATEX The first two lec- • subsidiary math environments, that is, split,
tures were largely based on material from Kopka and aligned, alignedat, and gathered;
Daly (1999), but Lectures 3 and 4 were largely based • adjusted, multi-column math environments, for
on Grätzer (2000). We use AMS-LATEX exclusively, example, matrix, cases, and pmatrix
so we began by telling the students that everything The fourth homework assignment consisted of two
we would be covering would assume that they had handouts: the first was two pages from a 1963 pa-
loaded the following AMS-LATEX packages and op- per from a Russian mathematical journal (Melnikov,
tions (American Mathematical Society, 2000). 1963) and the second was Section 8.5.1 from a book
\usepackage{amsmath} on numerical linear algebra (Golub and Van Loan,
\usepackage{amssymb} 1989). We asked the students to typeset the pages
\usepackage{exscale} we had given them. In the case of the paper from
\usepackage[mathscr]{eucal} the mathematical journal, we wanted students to
We then discussed features of LATEX and AMS- improve the typesetting of the text and equations
LAT EX that are relevant for inline mathematics and and in the case of the pages from the book on nu-
single-line displayed mathematics. We emphasized merical linear algebra, we wanted the students to
to the students that the mathematics in a document simply replicate the layout.
is part of the narrative and should be punctuated as
Graphics & Floats The fifth lecture covered the
such. In addition, we discussed:
inclusion of graphics in LATEX via its float mecha-
• equation numbering; nism. We covered the:
• arithmetic operations;
• graphicx package (Carlisle and Rahtz, 1999)
• superscripts and subscripts; with its includegraphics command and op-
• resources for typesetting mathematics (Swan- tions such as:
son, 1999; Higham, 1998);
– scale
• ellipses, integrals, roots;
– width, height, keepaspectratio
• text within mathematics;
– angle
• delimiters;
• operators; – bb
• math accents; • lscape package (Carlisle, 2000);
• spacing with mathematics; • importing of graphics and troubleshooting;
• math alphabets and symbols (e.g., bold math- • color package (Carlisle, 1999), including the
ematics); and monochrome, dvipsnames, and usenames op-
• generalized fractions. tions, and setting the color of a page and text;
The third homework assignment consisted of exer- • float environments: figure and table.
cises out of Chapter 5 of Kopka and Daly, but with The fifth homework assignment asked the stu-
the requirement that AMS-LATEX structures be used dents to create a one-page flyer conveying any mes-
when available. sages or advertising anything they liked. We told
TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting 127
Gary L. Gray and Francesco Costanzo
them that they had learned a fair bit about LATEX, We also briefly discussed the natbib package (Daly,
so they should try and make it interesting and cre- 2000) for author-year citations and the use of End-
ative. We also told them that the flyer had to in- NoteTM (ISI ResearchSoft, 2002) with BibTEX.
clude some mathematics. In addition to this, the The sixth homework assignment consisted of
flyers were to include: exercises out of Chapters 4 and 7 of Kopka and Daly.
• the use of a background color for the page;
The PSU Thesis Package As preparation for this
• the tasteful and artistic use of a number of col- seventh and final lecture, the authors chose to under-
ors for the text; take their first major LATEX customization/program-
• the use of at least three different JPEG images ming project by creating a document class conform-
(.jpg), at least one of which must be scaled and ing to the Thesis Guide: Requirements and Guide-
one of which must be rotated. lines for the Preparation of Masters and Doctoral
User Customization & Bibliographies Mate- Theses (The Pennsylvania State University, 2002),
rial for this lecture came out of various sections which is published by Penn State’s Graduate School.
of Kopka and Daly (1999); in particular, we asked Among many other things, this guide specifies the
the students to read Chapter 7, Sections 4.3.6, 8.3.3, detailed technical requirements that each thesis or
and Appendix B. In regard to customizing LATEX, dissertation must satisfy. These requirements in-
we discussed: clude, among other things, the specification of: line
• counters: how to set and reset them, and how spacing, font size, front matter, chapter formatting,
to define new counters; margins, page number location, etc. All of these re-
quirements can be rather overwhelming for students
• how LATEX uses lengths and how to: set a length
who, while trying to implement them, are also des-
using either \settowidth or \setlength, de-
perately trying to actually write their thesis. In ad-
fine a new length using \newlength, and add
dition, as we are all aware, LATEX can do a wonder-
to a length using \addtolength;
ful job of removing the tedium of assembling a Title
• the creation of user-defined commands, both Page, Table of Contents, List of Figures, List of Ta-
with and without arguments, as well as the re- bles, Signature Page, and all the other little things
definition of commands; that must go into a thesis. The class we created,
• the use of the \input command to read in “boil- psuthesis.cls, is heavily documented, should be
erplate”; relatively easy for individuals at other institutions
• the scope of commands and environments de- to modify, and can be found on one of the pages at
fined in the preamble versus the scope of those the course web site (Gray and Costanzo, 2002).
defined within environments. Our lecture gave an overview of the thesis class
With regard to bibliographies, we began by dis- and an example thesis template illustrating the use
cussing the basic and simple environment for gener- of the thesis class. There was no homework associ-
ating a bibliography via the thebibliography en- ated with this lecture.
vironment. In addition, we talked about how one
can change the title of the bibliography using either Lecture Format and Creation
\refname or \bibname, depending on the class used. We estimate that each 60–75 minute lecture took us
We also discussed the limitations and disadvantages anywhere from 4–6 hours to prepare. The first two
of using the thebibliography environment without lectures were prepared as slides, presented as PDF
the aid of BibTEX. We emphasized that BibTEX files, using FoilTEX (Hafner, 1998). We both found
provides a way to use a database of references (via a this to be awkward since we had to worry so much
.bib file), along with a bibliography style definition about the amount that went on each slide. It was
(found in .bst files), to automatically generate bib- also more difficult to show the “natural” behavior
liographies. This is useful for the following reasons: of LATEX since, by their very nature, slides or foils
• one can maintain any number of reference data- are heavily modified to use larger fonts, landscape
bases and BibTEX will only use those references orientation, etc. Finally, the slide format impeded
it needs; this is especially nice when one uses us from adding little tidbits and changing the LATEX
many of the same references in several different source during a lecture since, often times, the ad-
documents; dition or deletion of one or two words would com-
• one can use the same databases of references pletely alter the formatting of a slide. Therefore,
and the chosen .bst file will format them au- we decided to use the standard article class and
tomatically. create lectures that simply looked like a standard
128 TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting
Experiences and lessons learned teaching LATEX to university students
LATEX article. Before each lecture (sometimes only • that the course assumed no prior knowledge of
a few minutes before, but always before) we would LATEX;
post the .tex source for the lecture as well as the • that LATEX provided an alternative to Microsoft
corresponding .pdf typeset output on the class web Word; and
site. After each lecture, we would re-post the lecture • that they were happy to be learning a skill that
(source and output), thus incorporating any changes would be useful in their careers.
to the document that took place during the lecture.
Each lecture was presented by connecting a laptop Question 2 To the second question, we found the
to an LCD projector and using TEXShop to show the following themes among the student responses:
source and preview. • there was no instruction on how to use partic-
We tried our best not to take the entire class ular software packages for LATEX;
time to talk about LATEX since 75 minutes is a long • there was too much work for a 1-credit course;
time to try and focus on someone standing at a com- • some of the homework took them much too long
puter and showing LATEX source and output. On to do;
the other hand, as most instructors will testify, it
• there were numerous problems with CAC com-
is nearly impossible not to have one’s lecture ex-
puter labs that prevented them from doing their
pand to fill the available time. Therefore, with only
homework; and
two or three exceptions, our lectures took the entire
75 minute time period. When we teach this class in • the course felt rushed.
the future, we will unquestionably leave more time Question 3 To the third question, we overwhelm-
to work with the students in the classroom. ingly heard that:
Finally, our experience in other classes in which
• we should spread the course out for at least 12
we used this same computing environment, that is,
weeks, if not the entire semester;
an environment in which each student is at a laptop
that is connected to the Internet, has been that it • the homework should be graded more leniently;
was terribly tempting for students to surf the web, • the class should meet more often so that each
check their email, and/or instant message with their lecture is shorter;
friends rather than listen to what we had to say. • the homework should be shorter or spread out
Therefore, we made it clear from the first day of class more; and
that students were welcome to do all of these things • we should provide help to people with Windows
at the computers, they simply were not allowed to machines.
do it during our class. We found that the students So, what conclusions can we draw from these
generally respected our request. comments that would allow us to improve the course
Student Response to the Class the next time we teach it? Well, the responses to the
first question tell us that we should: continue to pro-
At the end of each semester, it is the policy of our vide resources and information via the class web site,
department to have students anonymously evaluate continue to teach using a myriad of examples, and
the course they are about to complete. In addition teach the course at a very introductory level. The
to generic questions about the instructor and the responses to the second and third questions indicate
course requiring numerical evaluations, three addi- that:
tional questions are asked for which the students • too much was taught in too little time and the
give written answers. These questions are: course should be spread out over a larger part
Q1. What did you like best about this course? of the semester;
Q2. What did you like least about this course? • classes should be shorter and meet more often
Q3. What suggestions do you have for improving (this would also allow us to make each home-
this course? work assignment shorter); and
• we should provide additional support for those
Question 1 Ignoring responses such as “LATEX was students who are having trouble getting TEX to
explained well by the instructors”, which, while nice, work on either their own computer or a public
doesn’t really tell us much, student response to the computer.
first question emphasized:
On the other hand, it has been our experience, that
• the utility of the web site; in all courses that involve computers and program-
• the teaching of LATEX through examples; ming, students almost invariably find them to be
TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting 129
Gary L. Gray and Francesco Costanzo
130 TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting
Experiences and lessons learned teaching LATEX to university students
Swanson, Ellen. Mathematics into Type. American Trevorrow, Andrew. “OzTEX”. Available from
Mathematical Society, Providence, RI, updated http://www.trevorrow.com/oztex/, 2002.
edition, 1999. Updated by Arlene Ann O’Sean Wierda, Gerben. “teTEX-TEXLive Distribution”.
and Antoinette Tingley Schleyer. Available from http://www.rna.nl/ii.html,
The Pennsylvania State University, Graduate 2003.
School. “Thesis Guide: Requirements and
Guidelines for the Preparation of Masters and
Doctoral Theses”. Available from http://www.
gradsch.psu.edu/enroll/thesisguide.html,
2002.
TUGboat, Volume 24 (2003), No. 1 — Proceedings of the 2003 Annual Meeting 131