| 1 |
\documentclass[11pt, |
| 2 |
% twoside, |
| 3 |
logo = {example-image}, |
| 4 |
% logo height = 1cm, % logo width = 2cm, |
| 5 |
title in boldface, |
| 6 |
% title in sffamily, |
| 7 |
theorem in new line, |
| 8 |
simple names, |
| 9 |
% remove qed, |
| 10 |
colored solution, |
| 11 |
]{homework} |
| 12 |
|
| 13 |
%% For highlighting the code in this document |
| 14 |
\usepackage{newverbs} |
| 15 |
\newverbcommand{\cverb}{\color{red!50!orange}}{} |
| 16 |
|
| 17 |
%% Below is the main document |
| 18 |
|
| 19 |
|
| 20 |
\title{The Subject, Week 1} |
| 21 |
\author{Author NAME} |
| 22 |
% \date{\today, Location} |
| 23 |
% \date{\today[only-year-month], Location} |
| 24 |
\date{\TheDate{2026-01-01}, Location} |
| 25 |
|
| 26 |
|
| 27 |
\begin{document} |
| 28 |
|
| 29 |
|
| 30 |
\textcolor{gray!55}{(If you wish to write the answer directly...)} |
| 31 |
|
| 32 |
\begin{problem} |
| 33 |
Here lies the solution / proof. |
| 34 |
\end{problem} |
| 35 |
|
| 36 |
|
| 37 |
\bigskip\textcolor{gray!55}{(If you wish to state the problem and then write your answer...)} |
| 38 |
|
| 39 |
\begin{problem}[Brief description] |
| 40 |
You may also state the problem here... |
| 41 |
\end{problem} |
| 42 |
|
| 43 |
\begin{solution} |
| 44 |
... and write the solution here... |
| 45 |
\end{solution} |
| 46 |
|
| 47 |
\bigskip\textcolor{gray!55}{(If you prefer \textquote{Proof} instead of \textquote{Solution}...)} |
| 48 |
|
| 49 |
\begin{solution}[Proof] |
| 50 |
... or a proof like this one... |
| 51 |
\begin{lemma}[You may write some description here]\label{lem} |
| 52 |
Some auxiliary result. |
| 53 |
\end{lemma} |
| 54 |
\begin{proof} |
| 55 |
The proof of \cref{lem}, where we use the following formula (note the use of \cverb|\qedhere|): |
| 56 |
\[ |
| 57 |
\infty = \infty + 1. |
| 58 |
\qedhere % To place the Q.E.D. symbol in the right place. |
| 59 |
\] |
| 60 |
\end{proof} |
| 61 |
\begin{fact}[This statement requires no proof] |
| 62 |
\proofless |
| 63 |
Use \cverb|\proofless| to change the hollow box marking the end of a theorem-type environment into a solid one. |
| 64 |
\end{fact} |
| 65 |
... and the rest steps... |
| 66 |
\end{solution} |
| 67 |
|
| 68 |
|
| 69 |
\bigskip\textcolor{gray!55}{(You may also write \texttt{answer} instead of \texttt{solution} if you wish...)} |
| 70 |
|
| 71 |
\begin{answer} |
| 72 |
The usage of the \verb|answer| environment is exactly the same as \verb|solution|. |
| 73 |
\end{answer} |
| 74 |
|
| 75 |
|
| 76 |
\bigskip\textcolor{gray!55}{(If you prefer the classical proof style...)} |
| 77 |
|
| 78 |
\begin{proof} |
| 79 |
The usual \verb|proof| environment also works. |
| 80 |
\end{proof} |
| 81 |
|
| 82 |
|
| 83 |
\bigskip\textcolor{gray!55}{(If you wish to answer each sub-question of a problem separately...)} |
| 84 |
|
| 85 |
\begin{problem}[A problem with many sub-questions] |
| 86 |
\begin{enumerate} |
| 87 |
\item First question. |
| 88 |
|
| 89 |
\begin{solution} |
| 90 |
The solution of the first question. |
| 91 |
\end{solution} |
| 92 |
|
| 93 |
\item Second question. |
| 94 |
|
| 95 |
\begin{enumerate} |
| 96 |
\item First sub-question. |
| 97 |
|
| 98 |
\begin{solution} |
| 99 |
The solution of the first sub-question. |
| 100 |
\end{solution} |
| 101 |
|
| 102 |
\item Second sub-question. |
| 103 |
|
| 104 |
\begin{solution} |
| 105 |
The solution of the second sub-question. |
| 106 |
\end{solution} |
| 107 |
|
| 108 |
\end{enumerate} |
| 109 |
|
| 110 |
\item Third question. |
| 111 |
|
| 112 |
\begin{solution} |
| 113 |
The solution of the third question. |
| 114 |
\end{solution} |
| 115 |
|
| 116 |
\end{enumerate} |
| 117 |
Use \cverb|\noqed| (or \cverb|\noQED|) at the end to suppress the Q.E.D. symbol that marks the end of the current problem. |
| 118 |
\noQED |
| 119 |
\end{problem} |
| 120 |
|
| 121 |
|
| 122 |
\bigskip\textcolor{gray!55}{(If you wish to number the exercise manually...)} |
| 123 |
|
| 124 |
\ManualNumbering{exercise}{A.1.1} |
| 125 |
\begin{exercise}[An exercise with custom numbering] |
| 126 |
Use \cverb|\ManualNumbering| to manually set the numbering. This number will only be applied to the next specified environment. |
| 127 |
\end{exercise} |
| 128 |
|
| 129 |
\begin{exercise} |
| 130 |
Back to normal numbering. |
| 131 |
\end{exercise} |
| 132 |
|
| 133 |
|
| 134 |
\bigskip\textcolor{gray!55}{(If there is a question that you can't figure out how to solve at the moment...)} |
| 135 |
|
| 136 |
\DNF<some description> |
| 137 |
|
| 138 |
|
| 139 |
\end{document} |