Skip to content

Commit c89b7a7

Browse files
committed
Improve template (more comprehensive overview) and README
1 parent 05ea841 commit c89b7a7

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# homework.cls
22

3-
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.
3+
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.
44

5-
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).
5+
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).
66

77
This project is licensed under the [ISC license](LICENSE.txt).

main.pdf

7.93 KB
Binary file not shown.

main.tex

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,38 @@
88
\maketitle
99

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

13-
Paragraphs are not indented, but are instead separated by some vertical space.
13+
Instead of being indented, paragraphs are separated by some white space.
14+
15+
\exercise*
16+
Each exercise (except the first) starts on a new page. You can disable this behavior using the starred version of the command: \verb|\exercise*|.
17+
18+
Now, let's consider a mathematical example.
19+
20+
\begin{definition}
21+
The \emph{standard inner product} of two vectors $\vec x, \vec y \in \R^n$ is defined as
22+
\[
23+
\vec x * \vec y \coloneqq x_1 y_1 + \dots + x_n y_n.
24+
\]
25+
\end{definition}
26+
27+
Next to definitions, environments for theorems and lemmas are included as well. Furthermore, you can easily define your own with the \verb|\NewTheorem| command.
1428

15-
As an example: the \emph{standard inner product} on $\R^n$ is defined as
16-
\[\vec a * \vec b \coloneqq a_1 b_1 + \dots + a_n b_n\qquad\text{for }\vec a,\vec b \in \R^n.\]
1729
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,
18-
\[\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}}.\]
30+
\[
31+
\abs{\frac{1}{1 - \lambda h}} \le 1
32+
\qquad\text{and}\qquad
33+
\bigcup_{i=1}^n \; \set{z \in \C \mid \abs*{z - a_{ii}} \le {\sum\nolimits_{i \ne j}} \abs*{a_{ij}}}.
34+
\]
1935
The starred version of these commands disables the auto-scaling.
2036

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

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

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

0 commit comments

Comments
 (0)