-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.tex
46 lines (32 loc) · 1.72 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\documentclass{homework}
\title{Your Title}
\author{Y.\,O. Urname}
\begin{document}
\maketitle
\exercise
Exercises are automatically numbered, starting from one. Convenient packages such as \texttt{amsmath} and \texttt{hyperref} are included by default.
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.
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
\bigcup_{i=1}^n \; \set{z \in \C \mid \abs*{z - a_{ii}} \le {\sum\nolimits_{j \ne i}} \abs*{a_{ij}}}.
\]
The starred version of these commands disables the auto-scaling.
\exercise[Rec--2.1]
Optionally, you can fully customize the numbering of each exercise \dots
\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}.
\end{document}