LaTeX class for lecture notes

Written on December 29, 2008

In the last post I wrote about how to take notes with LaTeX; that post focused on speed, and there were a sty file with the macros defined for that purpose. Here I won’t speak about speed, but style.

To begin, LaTeX class file for lecture notes you can find the class file I wrote for my notes. Just put it in you LaTeX tree (or in the directory of your document), with the sty file, and write a document with the following structure.

\documentclass[OPTIONS]{Notes}

\title{TITLE}
\subject{SUBJECT}
\author{AUTHOR}
\email{EMAIL}
\speaker{SPEAKER}
\date{DD}{MM}{YYYY}
\dateend{DD}{MM}{YYYY}
\place{PLACE}

\begin{document}

\end{document}

Obviously you have to replace the values, or, when appropriate, delete some line. Note that “author” and “email” are name and e-mail of the notes taker. The options (see the first line) are these:

  • english or italian: the document’s language;
  • course, seminar or talk: a course is a medium-length document structured in sections, subsections and paragraphs; a seminar is a short document without structure or with subsections; a talk is the sheets you take with you when you give a seminar.

The second option defines the style of the document; if you want to tweak some parameters, there are also these fine-tuning options:

  • headertitle, headersection, headersubsection or headerno: what to display on the top of the pages;
  • theoremnosection, theoremsection or theoremsubsection: numbering of theorems, definitions, etc.;
  • cleardoublepage or nocleardoublepage: whether we want empty double pages after a section ending;
  • oneside or twoside: margins and headers optimized for one-sided or two-sided printing;
  • onecolumn or twocolumn: how many columns per page.

The class defines also some commands:

  • for course, the command \lecture{duration}{dd}{mm}{yyyy} which writes on the margin information about the lesson’s number, duration and date;
  • for talk, the commands \separator, which simply draws a horizontal line, and \tosay{message} which prints the message inside a box (useful to remember things you don’t have to write on the blackboard);
  • \mymarginpar{message}, which behaves like a regular \marginpar but with a custom style.

Two words on what you get with this class file: the main difference is the font (Palatino instead of Computer Modern); the second main difference is the use of small-caps instead of boldface. I have to say I needed these modifications because I was very tired of the standard, omnipresent LaTeX style. Other small notable differences are the centered titles — because I’m not writing a book — and the theorem numbers placed before the word “theorem” — to make easier searching for them. If you want to see an example, download a recent document from my lecture notes page.

Let’s give a look on the packages this class requires, at least the ones you should use in your everyday documents.

  • hyperref: many PDF on the web doesn’t have hyperlinks, from the table of contents to the sections, to an equation from where they refer to it, etc. With this package you can have automatically all these links and also tweak PDF metadatas.
  • mathtools: enhancements of the standard AMS-LaTeX packages; the documentation is an inspiring source of tips for beautiful typesetting.
  • booktabs: standard LaTeX tables look poorer than they should; learn why reading booktabs’ documentation.
  • multirow: tables with cells spanning multiple rows.
  • fancyhdr: to customize the content of headers and footers.
  • mparhack: workaround for a bug on LaTeX \marginpar.
  • tikz: it’s a high-level drawing language, designed by Till Tantau (you can remember him for software like latex-beamer); you can see a gallery with examples here.
  • mathdots: redefines \dots and its friends so that they change size when appropriate.
  • xfrac: to typeset nice inline fractions, as in ½.
  • faktor: same as before, but without shrinking denominator’s and numerator’s size; useful for quotients.
  • cancel: to draw diagonal bars above terms in an equation.

Please note that my class is not licensed in any way. If you want to use it, you’re free to do anything you want with them. Anyway, I will be happy if you just drop me a line telling me you’re using it.


See also

  1. How to take lecture notes with LaTeX
  2. Suboptimal LaTeX #1: intro
  3. Suboptimal LaTeX #2: spacing
  4. Suboptimal LaTeX #3: mathematical environments
  5. Suboptimal LaTeX #4: mathematics
  6. Suboptimal LaTeX #5: miscellanea
If you liked this post, please share it with your friends: