summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/homework
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-09-28 03:01:12 +0000
committerNorbert Preining <norbert@preining.info>2023-09-28 03:01:12 +0000
commit30430eda38d883489e7ec7119ef3589d7f96e17d (patch)
tree03f569686df3c011dd21060461b232f8c460998b /macros/latex/contrib/homework
parentddf6d4e181f87c112f2d86ecbb7c3af314ce548a (diff)
CTAN sync 202309280301
Diffstat (limited to 'macros/latex/contrib/homework')
-rw-r--r--macros/latex/contrib/homework/README.md22
-rw-r--r--macros/latex/contrib/homework/homework-demo-cn.pdfbin68674 -> 70991 bytes
-rw-r--r--macros/latex/contrib/homework/homework-demo-cn.tex1
-rw-r--r--macros/latex/contrib/homework/homework-demo-de.pdfbin0 -> 47815 bytes
-rw-r--r--macros/latex/contrib/homework/homework-demo-de.tex74
-rw-r--r--macros/latex/contrib/homework/homework-demo-en.pdfbin46621 -> 46621 bytes
-rw-r--r--macros/latex/contrib/homework/homework-demo-en.tex1
-rw-r--r--macros/latex/contrib/homework/homework-demo-es.pdfbin0 -> 47517 bytes
-rw-r--r--macros/latex/contrib/homework/homework-demo-es.tex74
-rw-r--r--macros/latex/contrib/homework/homework-demo-fr.pdfbin46759 -> 46759 bytes
-rw-r--r--macros/latex/contrib/homework/homework-demo-fr.tex1
-rw-r--r--macros/latex/contrib/homework/homework-demo-jp.pdfbin0 -> 74728 bytes
-rw-r--r--macros/latex/contrib/homework/homework-demo-jp.tex74
-rw-r--r--macros/latex/contrib/homework/homework-demo-tc.pdfbin0 -> 76130 bytes
-rw-r--r--macros/latex/contrib/homework/homework-demo-tc.tex74
-rw-r--r--macros/latex/contrib/homework/homework.cls2
16 files changed, 312 insertions, 11 deletions
diff --git a/macros/latex/contrib/homework/README.md b/macros/latex/contrib/homework/README.md
index 0374b4030f..c580a03fa8 100644
--- a/macros/latex/contrib/homework/README.md
+++ b/macros/latex/contrib/homework/README.md
@@ -6,7 +6,7 @@
The current document class is for writing homework. It has the following features.
- Simple and clear interface.
-- Built-in support for many theorem-like environments, already configured and ready to use (in the mean time also very customizable, via `\SetTheorem`).
+- Built-in support for many theorem-type environments, already configured and ready to use (in the mean time also very customizable, via `\SetTheorem`), with clever referencing supported.
- 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.
@@ -20,14 +20,14 @@ A typical homework document looks like this:
```latex
\documentclass[11pt,
- logo = {image-file-of-your-university-logo},
- % logo height = 1cm,
+ 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,
]{homework}
-\UseLanguage{...} % If you wish to write your homework in languages other than English
+\UseLanguage{...} % If you wish to write your homework in languages other than English.
\title{The Subject, Week 1}
@@ -47,11 +47,11 @@ A typical homework document looks like this:
% If you wish to state the problem and then write your answer...
-\begin{problem}
+\begin{problem}[You can add some brief problem description here]
You may also state the problem here...
\end{problem}
-\begin{solution}
+\begin{solution}% You may also use the "answer" environment, they are essentially the same.
... and write the solution here...
\end{solution}
@@ -60,7 +60,7 @@ A typical homework document looks like this:
\begin{solution}[Proof]
... or a proof like this one...
- % You may write lemmas or propositions inside your solution.
+ % You may write claims, lemmas, propositions, etc. inside your solution.
\begin{lemma}\label{lem}
Some auxiliary result.
\end{lemma}
@@ -68,7 +68,7 @@ A typical homework document looks like this:
The proof of \cref{lem}, where we use the following formula:
\[
\infty = \infty + 1.
- \qedhere % To place the QED symbol in the right place
+ \qedhere % For placing the QED symbol in the right place.
\]
\end{proof}
... and the rest steps...
@@ -84,8 +84,10 @@ A few remarks:
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) `\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 displayed formula or lists, then you may need to place a `\qedhere` so that the QED symbol is placed in the right place.
+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) 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.
## TeXnical details
diff --git a/macros/latex/contrib/homework/homework-demo-cn.pdf b/macros/latex/contrib/homework/homework-demo-cn.pdf
index 03fbd68d8c..a3f96f3fad 100644
--- a/macros/latex/contrib/homework/homework-demo-cn.pdf
+++ b/macros/latex/contrib/homework/homework-demo-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/homework-demo-cn.tex b/macros/latex/contrib/homework/homework-demo-cn.tex
index 4089820107..9585ebc126 100644
--- a/macros/latex/contrib/homework/homework-demo-cn.tex
+++ b/macros/latex/contrib/homework/homework-demo-cn.tex
@@ -11,6 +11,7 @@
\title{学科名称,第一周}
\author{作者}
+% \date{\today,地点}
% \date{\today[only-year-month],地点}
\date{\TheDate{2023-12-25},地点}
diff --git a/macros/latex/contrib/homework/homework-demo-de.pdf b/macros/latex/contrib/homework/homework-demo-de.pdf
new file mode 100644
index 0000000000..9d61979cc5
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-de.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/homework-demo-de.tex b/macros/latex/contrib/homework/homework-demo-de.tex
new file mode 100644
index 0000000000..0efb6739d8
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-de.tex
@@ -0,0 +1,74 @@
+\documentclass[11pt,
+ logo = {example-image},
+ % logo height = 1cm,
+ title in boldface,
+ % title in sffamily,
+ theorem in new line,
+]{homework}
+
+\UseLanguage{German}
+
+
+\title{Das Thema, Woche 1}
+\author{Vorname NAME}
+% \date{\today, der Standort}
+% \date{\today[only-year-month], der Standort}
+\date{\TheDate{2023-12-25}, der Standort}
+
+
+\begin{document}
+
+
+\bigskip\textcolor{gray!55}{(Wenn Sie die Antwort direkt schreiben möchten ...)}
+
+\begin{problem}
+ Hier liegt die Lösung / der Beweis.
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(Wenn Sie das Problem angeben und dann Ihre Antwort schreiben möchten ...)}
+
+\begin{problem}[Kurze Beschreibung]
+ Sie können das Problem auch hier angeben ...
+\end{problem}
+
+\begin{solution}
+ ... und schreibe hier die Lösung ...
+\end{solution}
+
+\bigskip\textcolor{gray!55}{(Wenn Sie \textquote{Beweis} anstelle von \textquote{Lösung} bevorzugen ...)}
+
+\begin{solution}[Beweis]
+ ... oder ein Beweis wie dieser ...
+ \begin{lemma}[Sie können hier eine Beschreibung schreiben]\label{lem}
+ Einige zusätzlich Ergebnisse.
+ \end{lemma}
+ \begin{proof}
+ Der Beweis \cref[gen.]{lem}, wobei wir die folgende Formel verwenden: % oder der Beweis \cref[von]{lem}, oder der Beweis \cref[von, dat.]{lem}
+ \[
+ \infty = \infty + 1.
+ \qedhere % Um das QED-Symbol an der richtigen Stelle zu stellen
+ \]
+ \end{proof}
+ ... und die übrigen Schritte ...
+\end{solution}
+
+
+\bigskip\textcolor{gray!55}{(Wenn Sie möchten, können Sie auch \texttt{answer} anstelle von \texttt{solution} schreiben ...)}
+
+\begin{answer}
+ Die Verwendung der \verb|answer|-Umgebung ist genau gleich wie \verb|solution|.
+\end{answer}
+
+
+\bigskip\textcolor{gray!55}{(Wenn Sie den klassischen Proof-Stil bevorzugen ...)}
+
+\begin{proof}
+ Die übliche \verb|proof|-Umgebung funktioniert ebenfalls.
+\end{proof}
+
+
+\DNF<etwas Beschreibung>
+
+
+\end{document}
diff --git a/macros/latex/contrib/homework/homework-demo-en.pdf b/macros/latex/contrib/homework/homework-demo-en.pdf
index 19dff1fb8f..317b090c69 100644
--- a/macros/latex/contrib/homework/homework-demo-en.pdf
+++ b/macros/latex/contrib/homework/homework-demo-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/homework-demo-en.tex b/macros/latex/contrib/homework/homework-demo-en.tex
index dd25bbc6b5..ac618af0aa 100644
--- a/macros/latex/contrib/homework/homework-demo-en.tex
+++ b/macros/latex/contrib/homework/homework-demo-en.tex
@@ -9,6 +9,7 @@
\title{The Subject, Week 1}
\author{Author NAME}
+% \date{\today, Location}
% \date{\today[only-year-month], Location}
\date{\TheDate{2023-12-25}, Location}
diff --git a/macros/latex/contrib/homework/homework-demo-es.pdf b/macros/latex/contrib/homework/homework-demo-es.pdf
new file mode 100644
index 0000000000..2b46b9b98b
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-es.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/homework-demo-es.tex b/macros/latex/contrib/homework/homework-demo-es.tex
new file mode 100644
index 0000000000..e905034442
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-es.tex
@@ -0,0 +1,74 @@
+\documentclass[11pt,
+ logo = {example-image},
+ % logo height = 1cm,
+ title in boldface,
+ % title in sffamily,
+ theorem in new line,
+]{homework}
+
+\UseLanguage{Spanish}
+
+
+\title{El tema, semana 1}
+\author{Nombre APELLIDO}
+% \date{\today, Ubicación}
+% \date{\today[only-year-month], Ubicación}
+\date{\TheDate{2023-12-25}, Ubicación}
+
+
+\begin{document}
+
+
+\bigskip\textcolor{gray!55}{(Si desea escribir la respuesta directamente...)}
+
+\begin{problem}
+ Aquí está la solución / la prueba.
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(Si desea plantear el problema y luego escribir su respuesta...)}
+
+\begin{problem}[Breve descripción]
+ También puedes plantear el problema aquí...
+\end{problem}
+
+\begin{solution}
+ ... y escribir la solución aquí...
+\end{solution}
+
+\bigskip\textcolor{gray!55}{(Si prefiere \textquote{Prueba} en lugar de \textquote{Solución}...)}
+
+\begin{solution}[Prueba]
+ ... o una prueba como ésta...
+ \begin{lemma}[Puedes escribir alguna descripción aquí]\label{lem}
+ Algún resultado auxiliar.
+ \end{lemma}
+ \begin{proof}
+ La prueba \cref[de]{lem}, donde usamos la siguiente fórmula:
+ \[
+ \infty = \infty + 1.
+ \qedhere % Para colocar el símbolo QED en el lugar correcto.
+ \]
+ \end{proof}
+ ... y el resto pasos...
+\end{solution}
+
+
+\bigskip\textcolor{gray!55}{(También puedes escribir \texttt{answer} en lugar de \texttt{solution} si lo deseas...)}
+
+\begin{answer}
+ El uso del entorno \verb|answer| es exactamente lo mismo que \verb|solution|.
+\end{answer}
+
+
+\bigskip\textcolor{gray!55}{(Si prefieres el estilo clásico de prueba...)}
+
+\begin{proof}
+ El entorno habitual de \verb|proof| también funciona.
+\end{proof}
+
+
+\DNF<alguna descripción>
+
+
+\end{document}
diff --git a/macros/latex/contrib/homework/homework-demo-fr.pdf b/macros/latex/contrib/homework/homework-demo-fr.pdf
index 30abef74de..784bea5489 100644
--- a/macros/latex/contrib/homework/homework-demo-fr.pdf
+++ b/macros/latex/contrib/homework/homework-demo-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/homework-demo-fr.tex b/macros/latex/contrib/homework/homework-demo-fr.tex
index 0c79fc02b7..642278fbff 100644
--- a/macros/latex/contrib/homework/homework-demo-fr.tex
+++ b/macros/latex/contrib/homework/homework-demo-fr.tex
@@ -11,6 +11,7 @@
\title{Le sujet, semaine 1}
\author{Prénom NOM}
+% \date{\today, Location}
% \date{\today[only-year-month], Location}
\date{\TheDate{2023-12-25}, Location}
diff --git a/macros/latex/contrib/homework/homework-demo-jp.pdf b/macros/latex/contrib/homework/homework-demo-jp.pdf
new file mode 100644
index 0000000000..b3a118c9d5
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-jp.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/homework-demo-jp.tex b/macros/latex/contrib/homework/homework-demo-jp.tex
new file mode 100644
index 0000000000..2c72ee81e3
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-jp.tex
@@ -0,0 +1,74 @@
+\documentclass[11pt,
+ logo = {example-image},
+ % logo height = 1cm,
+ title in boldface,
+ % title in sffamily,
+ theorem in new line,
+]{homework}
+
+\UseLanguage{Japanese}
+
+
+\title{科目名、第 1 週}
+\author{著者名}
+% \date{\today、所在地}
+% \date{\today[only-year-month]、所在地}
+\date{\TheDate{2023-12-25}、所在地}
+
+
+\begin{document}
+
+
+\bigskip\textcolor{gray!55}{(ソリューションを直接書くつもりなら…)}
+
+\begin{problem}
+ これが答え/証明です。
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(もし、問題を述べてからソリューションを書きたいのであれば...)}
+
+\begin{problem}[問題紹介]
+ ここに問題を述べて…
+\end{problem}
+
+\begin{solution}
+ …ここにソリューションを書くことができます...
+\end{solution}
+
+\bigskip\textcolor{gray!55}{(もし\textquote{解答}よりも\textquote{証明}を書きたいのなら...)}
+
+\begin{solution}[証明]
+ …または次のような証明を書きます...
+ \begin{lemma}[ここにコメントを書くことができます]\label{lem}
+ いくつかの補助的な結果。
+ \end{lemma}
+ \begin{proof}
+ これが\cref{lem}の証明です。次の式が使用されます:
+ \[
+ \infty = \infty + 1
+ \makebox[0pt][l]{\,。} % 文末のピリオド
+ \qedhere % QED シンボルを正しい位置に配置するために使用されます
+ \]
+ \end{proof}
+ …そして残りのステップ…
+\end{solution}
+
+\bigskip\textcolor{gray!55}{(\texttt{answer} 環境を使用することもできます…)}
+
+\begin{answer}
+ \verb|answer| 環境は \verb|solution| 環境とまったく同じように使用されます。
+\end{answer}
+
+
+\bigskip\textcolor{gray!55}{(伝統的な証明スタイルがお好みなら…)}
+
+\begin{proof}
+ \verb|proof| 環境はまだ利用可能です。
+\end{proof}
+
+
+\DNF<いくつかの説明>
+
+
+\end{document}
diff --git a/macros/latex/contrib/homework/homework-demo-tc.pdf b/macros/latex/contrib/homework/homework-demo-tc.pdf
new file mode 100644
index 0000000000..f9f67a70f1
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-tc.pdf
Binary files differ
diff --git a/macros/latex/contrib/homework/homework-demo-tc.tex b/macros/latex/contrib/homework/homework-demo-tc.tex
new file mode 100644
index 0000000000..9c56aae43e
--- /dev/null
+++ b/macros/latex/contrib/homework/homework-demo-tc.tex
@@ -0,0 +1,74 @@
+\documentclass[11pt,
+ logo = {example-image},
+ % logo height = 1cm,
+ title in boldface,
+ % title in sffamily,
+ theorem in new line,
+]{homework}
+
+\UseLanguage{Traditional Chinese}
+
+
+\title{學科名稱,第一周}
+\author{作者}
+% \date{\today,地點}
+% \date{\today[only-year-month],地點}
+\date{\TheDate{2023-12-25},地點}
+
+
+\begin{document}
+
+
+\bigskip\textcolor{gray!55}{(如果你打算直接寫出解答…)}
+
+\begin{problem}
+ 這裡是解答/證明。
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(如果你打算先陳述問題後再寫出解答…)}
+
+\begin{problem}[問題簡介]
+ 你可以把問題陳述在這裡…
+\end{problem}
+
+\begin{solution}
+ …然後把解答寫在這裡…
+\end{solution}
+
+\bigskip\textcolor{gray!55}{(如果比起\textquote{解},你更希望寫\textquote{證明}…)}
+
+\begin{solution}[證明]
+ …或者寫一個這樣的證明…
+ \begin{lemma}[你可以在這裡寫一些註釋]\label{lem}
+ 一些輔助結果。
+ \end{lemma}
+ \begin{proof}
+ \Cref{lem}的證明,其中用到下面的公式:
+ \[
+ \infty = \infty + 1
+ \makebox[0pt][l]{\,。} % 句尾的句號
+ \qedhere % 用來把 QED 放在正確的位置
+ \]
+ \end{proof}
+ …剩餘的步驟…
+\end{solution}
+
+\bigskip\textcolor{gray!55}{(寫\textquote{答}也是可以的…)}
+
+\begin{answer}
+ \verb|answer| 環境的用法和 \verb|solution| 是完全相同的。
+\end{answer}
+
+
+\bigskip\textcolor{gray!55}{(如果你更喜歡傳統的證明樣式…)}
+
+\begin{proof}
+ \verb|proof| 環境仍可使用。
+\end{proof}
+
+
+\DNF<一些描述>
+
+
+\end{document}
diff --git a/macros/latex/contrib/homework/homework.cls b/macros/latex/contrib/homework/homework.cls
index 1f3fe68cb8..a130b17103 100644
--- a/macros/latex/contrib/homework/homework.cls
+++ b/macros/latex/contrib/homework/homework.cls
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{homework}
- {2023/09/25} {}
+ {2023/09/25a} {}
{Document class for writing homework}
\keys_define:nn { homework }