Skip to content

Commit

Permalink
Improve template (more comprehensive overview) and README
Browse files Browse the repository at this point in the history
  • Loading branch information
gijs-pennings committed Feb 19, 2021
1 parent 05ea841 commit c89b7a7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# homework.cls

A template for homework assignments, especially suitable for mathematics and computer science. Using a different font, your homework assignments have a distinct look. The class provides many useful macros, making it easy to produce beautifully typeset documents.
A functionally unopinionated but aesthetically distinctive document class, especially well-suited to homework assignments on mathematics and computer science. Using different fonts, your work has a fresh but professional look. The class provides many useful macros, making it easy to produce beautifully typeset documents.

A [template](main.tex) ([pdf](main.pdf)) is provided, containing some examples. It's also available on [Overleaf](https://www.overleaf.com/latex/templates/gijss-homework-template/xrhhfgqcfbft) (often outdated).
A [template](main.tex) ([pdf](main.pdf)) is provided, containing some examples. It's also available on [Overleaf](https://www.overleaf.com/latex/templates/gijss-homework-template/xrhhfgqcfbft) (although often outdated).

This project is licensed under the [ISC license](LICENSE.txt).
Binary file modified main.pdf
Binary file not shown.
35 changes: 26 additions & 9 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,38 @@
\maketitle

\exercise
The exercises are automatically numbered, starting from one. Packages such as \texttt{amsmath} and \texttt{hyperref} are included by default.
Exercises are automatically numbered, starting from one. Essential packages such as \texttt{amsmath} and \texttt{hyperref} are included by default.

Paragraphs are not indented, but are instead separated by some vertical space.
Instead of being indented, paragraphs are separated by some white space.

\exercise*
Each exercise (except the first) starts on a new page. You can disable this behavior using the starred version of the command: \verb|\exercise*|.

Now, let's consider a mathematical example.

\begin{definition}
The \emph{standard inner product} of two vectors $\vec x, \vec y \in \R^n$ is defined as
\[
\vec x * \vec y \coloneqq x_1 y_1 + \dots + x_n y_n.
\]
\end{definition}

Next to definitions, environments for theorems and lemmas are included as well. Furthermore, you can easily define your own with the \verb|\NewTheorem| command.

As an example: the \emph{standard inner product} on $\R^n$ is defined as
\[\vec a * \vec b \coloneqq a_1 b_1 + \dots + a_n b_n\qquad\text{for }\vec a,\vec b \in \R^n.\]
Note that \texttt{*} can be used instead of \verb|\cdot|, and \verb|\R| instead of \verb|\mathbb{R}|. (For a normal asterisk, use \verb|\ast|.) Of course, there are also macros for the natural numbers etc. Commands such as \verb|\abs{}| and \verb|\set{}| can be used to create (scaled) delimiters. For example,
\[\abs{\frac{1}{1 - \lambda h}} \le 1\qquad\text{and}\qquad\set{x \in \R \mid 1 < \sqrt{x^3 + 2} < \frac{3}{2}}.\]
\[
\abs{\frac{1}{1 - \lambda h}} \le 1
\qquad\text{and}\qquad
\bigcup_{i=1}^n \; \set{z \in \C \mid \abs*{z - a_{ii}} \le {\sum\nolimits_{i \ne j}} \abs*{a_{ij}}}.
\]
The starred version of these commands disables the auto-scaling.

\exercise*
Each exercise (except the first) starts on a new page. You can disable this behavior using the starred version of the command.
\exercise[Rec--2.1]
Optionally, you can fully customize the numbering of each exercise \dots

\exercise[10]
Optionally, you can specify the number of points for an exercise.
\setcounter{exercise}{7}
\exercise*
\dots{} or skip a few, using the \verb|\setcounter{exercise}{x}| command.

For more information, refer to \url{https://github.com/gijs-pennings/latex-homework}.

Expand Down

0 comments on commit c89b7a7

Please sign in to comment.