summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/homework/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/homework/README.md')
-rw-r--r--macros/latex/contrib/homework/README.md80
1 files changed, 71 insertions, 9 deletions
diff --git a/macros/latex/contrib/homework/README.md b/macros/latex/contrib/homework/README.md
index c580a03fa8..28cdf8b29a 100644
--- a/macros/latex/contrib/homework/README.md
+++ b/macros/latex/contrib/homework/README.md
@@ -10,21 +10,42 @@ The current document class is for writing homework. It has the following feature
- Multilingual support: currently supporting Chinese (both simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish.
- Page numbers are of the form `Page [current] of [total]`, which can help you ensure that there are no missing pages when you print your homework for submission.
- Support writing problem statements and solutions (or proofs) in different colors.
-- Every statement and solution has its own QED symbol, in hollow or solid shape, respectively.
+- Every statement and solution has its own Q.E.D. symbol, in hollow or solid shape, respectively.
- You may mark unfinished parts with `\DNF` or `\DNF<⟨remark⟩>` (meaning "did not finish") for reminding — this will give you a clickable report on the unfinished parts at the end of your document.
+## Installation and preparation
+
+### How to install this package
+
+If you are using TeX Live 2024 or newer, or the most recent version of MikTeX, then this package should already be included, and you don't need to do anything.
+
+Otherwise, you need to check for package update to see if you can receive it. In case not, you can always go to [the CTAN page](https://ctan.org/pkg/homework) to download the `.zip` file with all related files included.
+
+### Regarding the fonts
+
+If you are using a Unicode TeX engine, then the current document class requires the following open-source fonts that are not included in the standard TeX collection:
+
+- The Source Han font series at [Adobe Fonts](https://github.com/adobe-fonts). More specifically:
+ - Source Han Serif, [go to its Release page](https://github.com/adobe-fonts/source-han-serif/releases).
+ - Source Han Sans, [go to its Release page](https://github.com/adobe-fonts/source-han-sans/releases).
+ - Source Han Mono, [go to its Release page](https://github.com/adobe-fonts/source-han-mono/releases).
+ > It is recommended to download the Super-OTC version, so that the total download size would be smaller, and the installation would be easier.
+
+These are necessary if you wish to write your document in Chinese (either simplified or traditional) or Japanese. Also, without these fonts installed, the compilation speed might be much slower if you use XeLaTeX or LuaLaTeX to compile your document.
+
## Usage
A typical homework document looks like this:
```latex
-\documentclass[11pt,
+\documentclass[a4paper, 11pt,
logo = {image-file-of-your-university-logo}, % Remove this line if you don't want logo presented.
% logo height = 1cm, % In case you are not satisfied with the default logo size.
title in boldface,
title in sffamily,
theorem in new line,
+ % twoside,
]{homework}
\UseLanguage{...} % If you wish to write your homework in languages other than English.
@@ -59,7 +80,6 @@ A typical homework document looks like this:
% If you prefer "Proof" instead of "Solution"...
\begin{solution}[Proof]
- ... or a proof like this one...
% You may write claims, lemmas, propositions, etc. inside your solution.
\begin{lemma}\label{lem}
Some auxiliary result.
@@ -68,26 +88,66 @@ A typical homework document looks like this:
The proof of \cref{lem}, where we use the following formula:
\[
\infty = \infty + 1.
- \qedhere % For placing the QED symbol in the right place.
+ \qedhere % For placing the Q.E.D. symbol in the right place.
\]
\end{proof}
+ \begin{fact}[This statement requires no proof]
+ \proofless % To change the hollow box marking the end of a theorem-type environment into a solid one.
+ Some statement.
+ \end{fact}
... and the rest steps...
\end{solution}
+% If you wish to answer each sub-question of a problem separately...
+
+\begin{problem}[A problem with many sub-questions]
+ \begin{enumerate}[itemsep=.5\baselineskip]
+ \item First question.
+ \begin{solution}
+ The solution of the first question.
+ \end{solution}
+ \item Second question.
+ \begin{enumerate}[itemsep=.3\baselineskip]
+ \item First sub-question.
+ \begin{solution}
+ The solution of the first sub-question.
+ \end{solution}
+ \item Second sub-question.
+ \begin{solution}
+ The solution of the second sub-question.
+ \end{solution}
+ \end{enumerate}
+ \item Third question.
+ \begin{solution}
+ The solution of the third question.
+ \end{solution}
+ \end{enumerate}
+ \noQED % Use \noqed or \noQED at the end to suppress the Q.E.D. symbol that marks the end of the current problem.
+\end{problem}
+
+
+% If there is a question that you can't figure out how to solve at the moment...
+
+\DNF<some description>
+
+
\end{document}
```
> You may refer to the demo documents for more examples.
-A few remarks:
+Regarding some of the class options:
1) The logo image can be included via the class option `logo = {⟨image file name⟩}`, and if you are not satisfied with its default size, then you may manually specify the size via the option `logo height = {⟨height⟩}`. If you do not want to show any logo in the title bar, you may simply remove the option `logo = {⟨image file name⟩}`.
1) The options `title in boldface`, `title in sffamily` or even `title in scshape` are for configuring the text effect of the title line, the sectional titles and theorem names.
1) The option `theorem in new line` is for showing the problem / theorem name, numbering and description in a separate line, for the sake of clarity.
+1) The option `twoside` is for double-sided printing.
+
+A few extra remarks:
1) `\title`, `\author` and `\date` should be placed before `\begin{document}`.
-1) Since the problem, solution and other theorem-type environments have a QED symbol at the end, if your text ends with a displayed equation or a `itemize`/`enumerate`/`description` list, then you would need to add a `\qedhere` so that the QED symbol is placed in the right place.
+1) Since the problem, solution and other theorem-type environments have a Q.E.D. symbol at the end, if your text ends with a displayed equation or a `itemize`/`enumerate`/`description` list, then you would need to add a `\qedhere` so that the Q.E.D. symbol is placed in the right place. There are also `\proofless` and `\noQED` for controlling the Q.E.D. symbol, see the demo documents for their usage.
1) Every theorem-type environment has a starred unnumbered version, for instance, `claim*` for unnumbered `claim`, `lemma*` for unnumbered `lemma`, etc.
-1) It is recommended to use clever reference, such as `\cref`. For languages such as French and German, to ensure that the generated referencing text is grammatically correct, you may write the definite article and/or declension as optional argument for the referencing commands, for instance, `\cref[à]{⟨label⟩}` or `\cref[de]{⟨label⟩}` for French, `\cref[nom.]{⟨label⟩}` or `\cref[von,dat.]{⟨label⟩}` for German, etc.
+1) It is recommended to use clever reference, such as `\cref`, `\Cref` and `\namecref`, etc. For languages such as French and German, to ensure that the generated referencing text is grammatically correct, you may write the definite article and/or declension as optional argument for the referencing commands, for instance, `\cref[à]{⟨label⟩}` or `\cref[de]{⟨label⟩}` for French, `\cref[nom.]{⟨label⟩}` or `\cref[von,dat.]{⟨label⟩}` for German, etc.
## TeXnical details
@@ -96,11 +156,13 @@ A few remarks:
- With pdfLaTeX, the base class is `minimart`.
- With XeLaTeX or LuaLaTeX, the base class is `einfart`.
-### Regarding `\maketitle`
+### Some other aspects
+
+#### Regarding `\maketitle`
The `\maketitle` has been automatically added just after `\begin{document}`, thus you don't need to write it by yourself. Note, however, that this also means that you cannot place `\title`, `author` and `\date` after `\begin{document}`.
-### Regarding the numbering
+#### Regarding the numbering
A new counter named `homework` is defined, which is shared by the environments `problem`, `question` and `exercise`, thus you would see them numbered as `1`, `2`, `3`, etc. The other theorem-type environments are numbered within this counter `homework`, thus within, say, `Problem 1`, you would see them numbered as `Theorem 1.1`, `Lemma 1.2` and `Claim 1.3`, etc.