Skip to content

Typeset assignments and problem sets using LaTeX; typographically optimized for online submission

License

Notifications You must be signed in to change notification settings

jstrieb/homework-template

Repository files navigation

LaTeX Template for Homework Problem Sets

This simple LaTeX class file and shortcut package contain document style settings and shortcut commands (respectively). Designed specifically for typesetting solutions to math and computer science problem sets, this homework template is intended to make typing solutions as quick, painless, and visually consistent as possible.

In particular, the class is designed to be consistent with best-practices from the authoritative Elements of Typographic Style by Robert Bringhurst. By default, the text is set in the Palatino typeface, created by the late Hermann Zapf (who worked with Don Knuth to create some of the first digital typefaces for setting mathematics). Palatino (via the mathpazo package with the osf option) was chosen specifically because it uses old-style figures for numbers outside of math mode, as opposed to the typical—improper—lining figures, which should ideally be exclusively reserved for setting math. It also contains tasteful small caps for setting the section headers that title each problem. Moreover, Palatino is a splendid face in general.

Minimal Example

The included example.tex utilizes some of the macros included in the class. The generated example.pdf provides a sample of what a multi-page typeset assignment might look like. An additional example is included below: Single-page example

Local Installation

  1. Clone the repository and navigate to the proper directory.
git clone https://github.com/jstrieb/homework-template.git && cd homework-template
  1. Use the builtin Makefile target to try and install the class in a folder accessible to the local TeX distribution.
make install
  1. If the previous steps did not work, consult the sage wisdom of Stack Exchange for where to install the .cls file. In particular, this answer may be helpful.

Usage & Notes

Once the installed, using the template is as simple as invoking homework as the designated document class and including some additional options. For example:

\documentclass[name=Jacob\ Strieb, andrewid=jstrieb, course=69-420, num=8]{homework}

\begin{document}
    Content...
\end{document}

Document Class Options

The following key-value parameters are accepted by the document class at declaration.

  • name (required) – name of the student typing the assignment
  • num (required) – homework assignment number
  • course (required) – course identifier
  • andrewid (required) – Andrew ID
  • type (optional) – assignment type; defaults to "Homework"
  • emaildomain (optional) – email address domain to be used with Andrew ID; defaults to cmu.edu

Math Shortcuts

To use the custom math shortcuts, use the hw-shortcuts package. This package does not take any parameters. The contents of the shortcuts package will likely change significantly over time as I add macros based on what is required for my homework.

\usepackage{hw-shortcuts}

About

Typeset assignments and problem sets using LaTeX; typographically optimized for online submission

Topics

Resources

License

Stars

Watchers

Forks