texlive[68389] Master/texmf-dist: homework (28sep23)

commits+karl at tug.org commits+karl at tug.org
Thu Sep 28 23:18:24 CEST 2023


Revision: 68389
          https://tug.org/svn/texlive?view=revision&revision=68389
Author:   karl
Date:     2023-09-28 23:18:24 +0200 (Thu, 28 Sep 2023)
Log Message:
-----------
homework (28sep23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/homework/README.md
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-cn.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-de.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-en.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-es.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-fr.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-jp.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-tc.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex
    trunk/Master/texmf-dist/tex/latex/homework/homework.cls

Modified: trunk/Master/texmf-dist/doc/latex/homework/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/README.md	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/README.md	2023-09-28 21:18:24 UTC (rev 68389)
@@ -10,21 +10,42 @@
 - 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 @@
 % 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 @@
         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 @@
 - 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.
 

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-cn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex	2023-09-28 21:18:24 UTC (rev 68389)
@@ -4,8 +4,16 @@
   title in boldface,
   % title in sffamily,
   theorem in new line,
+  % twoside,
 ]{homework}
 
+%% For highlighting the code in this document
+\usepackage{newverbs}
+\newverbcommand{\cverb}{\color{red!50!orange}}{}
+
+%% Below is the main document
+
+
 \UseLanguage{Chinese}
 
 
@@ -44,13 +52,17 @@
         一些辅助结果。
     \end{lemma}
     \begin{proof}
-        \Cref{lem}的证明,其中用到下面的公式:
+        这是\cref{lem}的证明,其中用到下面的公式(注意使用 \cverb|\qedhere|):
         \[
             \infty = \infty + 1
             \makebox[0pt][l]{\,。} % 句尾的句号
-            \qedhere               % 用来把 QED 放在正确的位置
+            \qedhere               % 用来把 Q.E.D. 符号放在正确的位置
         \]
     \end{proof}
+    \begin{fact}[这个结论无需证明]
+        \proofless
+        使用 \cverb|\proofless| 可以将标记定理结束的空心方框变为实心方框。
+    \end{fact}
     …剩余的步骤……
 \end{solution}
 
@@ -68,6 +80,47 @@
 \end{proof}
 
 
+\bigskip\textcolor{gray!55}{(如果你想为一个大问题中的每个小问题分别撰写解答…)}
+
+\begin{problem}[一个由很多小问题构成的大问题]
+    \begin{enumerate}[itemsep=.5\baselineskip]
+        \item 第一个问题。
+
+        \begin{solution}
+            第一个问题的解答。
+        \end{solution}
+
+        \item 第二个问题。
+
+        \begin{enumerate}[itemsep=.3\baselineskip]
+            \item 第一个小问。
+
+            \begin{solution}
+                第一个小问的解答。
+            \end{solution}
+
+            \item 第二个小问。
+
+            \begin{solution}
+                第二个小问的解答。
+            \end{solution}
+
+        \end{enumerate}
+
+        \item 第三个问题。
+
+        \begin{solution}
+            第三个问题的解答。
+        \end{solution}
+
+    \end{enumerate}
+    在末尾使用 \cverb|\noqed|(或 \cverb|\noQED|)可以取消标记用于当前问题结束的方框。
+    \noQED
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(如果你有暂时解决不出来的问题…)}
+
 \DNF<一些描述>
 
 

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex	2023-09-28 21:18:24 UTC (rev 68389)
@@ -4,8 +4,16 @@
   title in boldface,
   % title in sffamily,
   theorem in new line,
+  % twoside,
 ]{homework}
 
+%% For highlighting the code in this document
+\usepackage{newverbs}
+\newverbcommand{\cverb}{\color{red!50!orange}}{}
+
+%% Below is the main document
+
+
 \UseLanguage{German}
 
 
@@ -44,12 +52,16 @@
         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}
+        Der Beweis \cref[gen.]{lem}, wobei wir die folgende Formel verwenden (beachten Sie die Verwendung von \cverb|\qedhere|): % 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
+            \qedhere % Um das Q.E.D.-Symbol an der richtigen Stelle zu stellen.
         \]
     \end{proof}
+    \begin{fact}[Für dieses Ergebnis ist kein Beweis erforderlich]
+        \proofless
+        Verwenden Sie \cverb|\proofless| um den hohlen Kasten, der das Ende einer Theorem-artigen Umgebung markiert, in einen festen Kasten umwandeln.
+    \end{fact}
     ... und die übrigen Schritte ...
 \end{solution}
 
@@ -68,6 +80,47 @@
 \end{proof}
 
 
+\bigskip\textcolor{gray!55}{(Wenn Sie jede Unterfrage eines Problems einzeln beantworten möchten ...)}
+
+\begin{problem}[Ein Problem mit vielen Unterfragen]
+    \begin{enumerate}[itemsep=.5\baselineskip]
+        \item Die erste Frage.
+
+        \begin{solution}
+            Die Lösung der ersten Frage.
+        \end{solution}
+
+        \item Die zweite Frage.
+
+        \begin{enumerate}[itemsep=.3\baselineskip]
+            \item Die erste Unterfrage.
+
+            \begin{solution}
+                Die Lösung der ersten Unterfrage.
+            \end{solution}
+
+            \item Die zweite Unterfrage.
+
+            \begin{solution}
+                Die Lösung der zweiten Unterfrage.
+            \end{solution}
+
+        \end{enumerate}
+
+        \item Die dritte Frage.
+
+        \begin{solution}
+            Die Lösung der dritten Frage.
+        \end{solution}
+
+    \end{enumerate}
+    Verwenden Sie \cverb|\noqed| (oder \cverb|\noQED|) am Ende, um das Q.E.D.-Symbol zu unterdrücken, das das Ende des aktuellen Problems markiert.
+    \noQED
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(Wenn es eine Frage gibt, für die Sie im Moment keine Lösung finden können ...)}
+
 \DNF<etwas Beschreibung>
 
 

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex	2023-09-28 21:18:24 UTC (rev 68389)
@@ -4,9 +4,16 @@
   title in boldface,
   % title in sffamily,
   theorem in new line,
+  % twoside,
 ]{homework}
 
+%% For highlighting the code in this document
+\usepackage{newverbs}
+\newverbcommand{\cverb}{\color{red!50!orange}}{}
 
+%% Below is the main document
+
+
 \title{The Subject, Week 1}
 \author{Author NAME}
 % \date{\today, Location}
@@ -42,12 +49,16 @@
         Some auxiliary result.
     \end{lemma}
     \begin{proof}
-        The proof of \cref{lem}, where we use the following formula:
+        The proof of \cref{lem}, where we use the following formula (note the use of \cverb|\qedhere|):
         \[
             \infty = \infty + 1.
-            \qedhere % To place the QED symbol in the right place
+            \qedhere % To place the Q.E.D. symbol in the right place.
         \]
     \end{proof}
+    \begin{fact}[This statement requires no proof]
+        \proofless
+        Use \cverb|\proofless| to change the hollow box marking the end of a theorem-type environment into a solid one.
+    \end{fact}
     ... and the rest steps...
 \end{solution}
 
@@ -59,6 +70,9 @@
 \end{answer}
 
 
+\pagebreak
+
+
 \bigskip\textcolor{gray!55}{(If you prefer the classical proof style...)}
 
 \begin{proof}
@@ -66,6 +80,47 @@
 \end{proof}
 
 
+\bigskip\textcolor{gray!55}{(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}
+    Use \cverb|\noqed| (or \cverb|\noQED|) at the end to suppress the Q.E.D. symbol that marks the end of the current problem.
+    \noQED
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(If there is a question that you can't figure out how to solve at the moment...)}
+
 \DNF<some description>
 
 

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-es.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex	2023-09-28 21:18:24 UTC (rev 68389)
@@ -4,8 +4,16 @@
   title in boldface,
   % title in sffamily,
   theorem in new line,
+  % twoside,
 ]{homework}
 
+%% For highlighting the code in this document
+\usepackage{newverbs}
+\newverbcommand{\cverb}{\color{red!50!orange}}{}
+
+%% Below is the main document
+
+
 \UseLanguage{Spanish}
 
 
@@ -44,12 +52,16 @@
         Algún resultado auxiliar.
     \end{lemma}
     \begin{proof}
-        La prueba \cref[de]{lem}, donde usamos la siguiente fórmula:
+        La prueba \cref[de]{lem}, donde usamos la siguiente fórmula (tenga en cuenta el uso de \cverb|\qedhere|):
         \[
             \infty = \infty + 1.
-            \qedhere % Para colocar el símbolo QED en el lugar correcto.
+            \qedhere % Para colocar el símbolo Q.E.D. en el lugar correcto.
         \]
     \end{proof}
+    \begin{fact}[Este resultado no requiere prueba]
+        \proofless
+        Utilice \cverb|\proofless| para cambiar la caja hueca que marca el final de un entorno de tipo teorema en una caja sólida.
+    \end{fact}
     ... y el resto pasos...
 \end{solution}
 
@@ -61,6 +73,9 @@
 \end{answer}
 
 
+\pagebreak
+
+
 \bigskip\textcolor{gray!55}{(Si prefieres el estilo clásico de prueba...)}
 
 \begin{proof}
@@ -68,6 +83,47 @@
 \end{proof}
 
 
+\bigskip\textcolor{gray!55}{(Si desea responder cada subpregunta de un problema individualmente...)}
+
+\begin{problem}[Un problema con muchas subpreguntas]
+    \begin{enumerate}[itemsep=.5\baselineskip]
+        \item La primera pregunta.
+
+        \begin{solution}
+            La solución de la primera pregunta.
+        \end{solution}
+
+        \item La segunda pregunta.
+
+        \begin{enumerate}[itemsep=.3\baselineskip]
+            \item La primera subpregunta.
+
+            \begin{solution}
+                La solución de la primera subpregunta.
+            \end{solution}
+
+            \item La segunda subpregunta.
+
+            \begin{solution}
+                La solución de la segunda subpregunta.
+            \end{solution}
+
+        \end{enumerate}
+
+        \item La tercera pregunta.
+
+        \begin{solution}
+            La solución de la tercera pregunta.
+        \end{solution}
+
+    \end{enumerate}
+    Utilice \cverb|\noqed| (o \cverb|\noQED|) al final para suprimir el símbolo Q.E.D. que marca el final del problema actual.
+    \noQED
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(Si hay alguna pregunta que no sabes cómo resolver en este momento...)}
+
 \DNF<alguna descripción>
 
 

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex	2023-09-28 21:18:24 UTC (rev 68389)
@@ -4,16 +4,24 @@
   title in boldface,
   % title in sffamily,
   theorem in new line,
+  % twoside,
 ]{homework}
 
+%% For highlighting the code in this document
+\usepackage{newverbs}
+\newverbcommand{\cverb}{\color{red!50!orange}}{}
+
+%% Below is the main document
+
+
 \UseLanguage{French}
 
 
 \title{Le sujet, semaine 1}
 \author{Prénom NOM}
-% \date{\today, Location}
-% \date{\today[only-year-month], Location}
-\date{\TheDate{2023-12-25}, Location}
+% \date{\today, Lieu}
+% \date{\today[only-year-month], Lieu}
+\date{\TheDate{2023-12-25}, Lieu}
 
 
 \begin{document}
@@ -44,12 +52,16 @@
         Un résultat auxiliaire.
     \end{lemma}
     \begin{proof}
-        La preuve \cref[de]{lem}, où l'on utilise la formule suivante :
+        La preuve \cref[de]{lem}, où l'on utilise la formule suivante (notez l'utilisation de \cverb|\qedhere|) :
         \[
             \infty = \infty + 1.
-            \qedhere % pour placer le symbole QED au bon endroit
+            \qedhere % pour placer le symbole Q.E.D. au bon endroit
         \]
     \end{proof}
+    \begin{fact}[Cet énoncé ne requiert aucune preuve]
+        \proofless
+        Utilisez \cverb|\proofless| pour transformer la boîte creuse marquant la fin d'un environnement de type théorème en une boîte solide.
+    \end{fact}
     ... et les étapes restantes...
 \end{solution}
 
@@ -68,6 +80,47 @@
 \end{proof}
 
 
+\bigskip\textcolor{gray!55}{(Si vous souhaitez répondre individuellement à chaque sous-question d'un problème...)}
+
+\begin{problem}[Un problème avec de nombreuses sous-questions]
+    \begin{enumerate}[itemsep=.5\baselineskip]
+        \item La première question.
+
+        \begin{solution}
+            La réponse à la première question.
+        \end{solution}
+
+        \item La deuxième question.
+
+        \begin{enumerate}[itemsep=.3\baselineskip]
+            \item La première sous-question.
+
+            \begin{solution}
+                La réponse à la première sous-question.
+            \end{solution}
+
+            \item La deuxième sous-question.
+
+            \begin{solution}
+                La réponse à la deuxième sous-question.
+            \end{solution}
+
+        \end{enumerate}
+
+        \item La troisième question.
+
+        \begin{solution}
+            La réponse à la troisième question.
+        \end{solution}
+
+    \end{enumerate}
+    Utilisez \cverb|\noqed| (ou \cverb|\noQED|) à la fin pour supprimer le Q.E.D. symbole qui marque la fin du problème actuel.
+    \noQED
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(S'il y a une question que vous n'arrivez pas à résoudre pour le moment...)}
+
 \DNF<la description>
 
 

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-jp.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex	2023-09-28 21:18:24 UTC (rev 68389)
@@ -4,8 +4,16 @@
   title in boldface,
   % title in sffamily,
   theorem in new line,
+  % twoside,
 ]{homework}
 
+%% For highlighting the code in this document
+\usepackage{newverbs}
+\newverbcommand{\cverb}{\color{red!50!orange}}{}
+
+%% Below is the main document
+
+
 \UseLanguage{Japanese}
 
 
@@ -44,16 +52,24 @@
         いくつかの補助的な結果。
     \end{lemma}
     \begin{proof}
-        これが\cref{lem}の証明です。次の式が使用されます:
+        これが\cref{lem}の証明です。次の式が使用されます(\cverb|\qedhere| の使用に注意してください):
         \[
             \infty = \infty + 1
             \makebox[0pt][l]{\,。} % 文末のピリオド
-            \qedhere               % QED シンボルを正しい位置に配置するために使用されます
+            \qedhere               % Q.E.D. シンボルを正しい位置に配置するために使用されます
         \]
     \end{proof}
+    \begin{fact}[この結果には証明の必要はない]
+        \proofless
+        \cverb|\proofless| を使用して、定理タイプの環境の終わりを示す中空のボックスを中実のボックスに変更します。
+    \end{fact}
     …そして残りのステップ…
 \end{solution}
 
+
+\enlargethispage*{\baselineskip}
+
+
 \bigskip\textcolor{gray!55}{(\texttt{answer} 環境を使用することもできます…)}
 
 \begin{answer}
@@ -68,6 +84,47 @@
 \end{proof}
 
 
+\bigskip\textcolor{gray!55}{(問題の各小問に個別に回答したい場合は…)}
+
+\begin{problem}[多くの小問がある問題]
+    \begin{enumerate}[itemsep=.5\baselineskip]
+        \item 一番目の問題。
+
+        \begin{solution}
+            一番目の問題の解答。
+        \end{solution}
+
+        \item 二番目の問題。
+
+        \begin{enumerate}[itemsep=.3\baselineskip]
+            \item 一番目の小問。
+
+            \begin{solution}
+                一番目の小問の解答。
+            \end{solution}
+
+            \item 二番目の小問。
+
+            \begin{solution}
+                二番目の小問の解答。
+            \end{solution}
+
+        \end{enumerate}
+
+        \item 三番目の問題。
+
+        \begin{solution}
+            三番目の問題の解答。
+        \end{solution}
+
+    \end{enumerate}
+    現在の問題の終わりを示す Q.E.D. シンボルを表示しないようにするには、最後に \cverb|\noqed|(または \cverb|\noQED|)を使う。
+    \noQED
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(一時的に解決できない問題がある場合は…)}
+
 \DNF<いくつかの説明>
 
 

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-tc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex	2023-09-28 21:18:24 UTC (rev 68389)
@@ -4,8 +4,16 @@
   title in boldface,
   % title in sffamily,
   theorem in new line,
+  % twoside,
 ]{homework}
 
+%% For highlighting the code in this document
+\usepackage{newverbs}
+\newverbcommand{\cverb}{\color{red!50!orange}}{}
+
+%% Below is the main document
+
+
 \UseLanguage{Traditional Chinese}
 
 
@@ -44,13 +52,17 @@
         一些輔助結果。
     \end{lemma}
     \begin{proof}
-        \Cref{lem}的證明,其中用到下面的公式:
+        這是\cref{lem}的證明,其中用到下面的公式(注意使用 \cverb|\qedhere|):
         \[
             \infty = \infty + 1
             \makebox[0pt][l]{\,。} % 句尾的句號
-            \qedhere               % 用來把 QED 放在正確的位置
+            \qedhere               % 用來把 Q.E.D. 符號放在正確的位置
         \]
     \end{proof}
+    \begin{fact}[這個結論無須證明]
+        \proofless
+        使用 \cverb|\proofless| 可以將標記定理結束的空心方框變成實心方框。
+    \end{fact}
     …剩餘的步驟…
 \end{solution}
 
@@ -68,6 +80,47 @@
 \end{proof}
 
 
+\bigskip\textcolor{gray!55}{(如果你想為一個大問題中的每個小問題分別撰寫解答…)}
+
+\begin{problem}[一個由許多小問題構成的大問題]
+    \begin{enumerate}[itemsep=.5\baselineskip]
+        \item 第一個問題。
+
+        \begin{solution}
+            第一個問題的解答。
+        \end{solution}
+
+        \item 第二個問題。
+
+        \begin{enumerate}[itemsep=.3\baselineskip]
+            \item 第一個小問。
+
+            \begin{solution}
+                第一個小問的解答。
+            \end{solution}
+
+            \item 第二個小問。
+
+            \begin{solution}
+                第二個小問的解答。
+            \end{solution}
+
+        \end{enumerate}
+
+        \item 第三個問題。
+
+        \begin{solution}
+            第三個問題的解答。
+        \end{solution}
+
+    \end{enumerate}
+    在末尾使用 \cverb|\noqed|(或 \cverb|\noQED|)可以取消用於標記當前問題結束的方框。
+    \noQED
+\end{problem}
+
+
+\bigskip\textcolor{gray!55}{(如果你有暫時解決不出來的問題…)}
+
 \DNF<一些描述>
 
 

Modified: trunk/Master/texmf-dist/tex/latex/homework/homework.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/homework/homework.cls	2023-09-28 21:18:11 UTC (rev 68388)
+++ trunk/Master/texmf-dist/tex/latex/homework/homework.cls	2023-09-28 21:18:24 UTC (rev 68389)
@@ -12,7 +12,7 @@
 \NeedsTeXFormat{LaTeX2e}[2022-06-01]
 \ProvidesExplClass
   {homework}
-  {2023/09/25a} {}
+  {2023/09/28} {}
   {Document class for writing homework}
 
 \keys_define:nn { homework }
@@ -98,7 +98,11 @@
 \RequirePackage { lastpage }
 \fancypagestyle { fancy }
   {
-    \rfoot{\small\color{main-text!27!paper} \l__homework_page_of_total_tl }
+    \if at twoside
+      \fancyfoot[RO,LE]{\small\color{main-text!27!paper} \l__homework_page_of_total_tl }
+    \else
+      \fancyfoot[R]{\small\color{main-text!27!paper} \l__homework_page_of_total_tl }
+    \fi
   }
 \pagestyle { fancy }
 
@@ -139,10 +143,6 @@
 \newcommand\soluline{\bgroup\markoverwith{\rule[-.45ex]{1pt}{.75pt}}\ULon}
 \NewDocumentEnvironment { solution } { O{ \l__homework_solution_tl } }
   {
-    \setlength\abovedisplayskip{.3\baselineskip}
-    \setlength\belowdisplayskip{.3\baselineskip}
-    \setlength\abovedisplayshortskip{.3\baselineskip}
-    \setlength\belowdisplayshortskip{.3\baselineskip}
     \par\noindent
     \color{cyan!50!blue!90!main-text}
     \soluline{#1}\nobreakspace\nobreakspace
@@ -166,10 +166,18 @@
 %%  Configuration of the theorems
 %%================================
 
-\newcounter{homework}
-\SetTheorem{problem,question,exercise}{shared counter=homework}
-\SetTheorem{definition,lemma,theorem,proposition,corollary,example,fact,remark,assertion,assumption,claim,conclusion,conjecture,construction,convention,notation,observation,property,recall}{number within=homework}
+\newcounter { homework }
+\SetTheorem { problem, question, exercise } { shared counter = homework }
+\SetTheorem { definition, lemma, theorem, proposition, corollary, example, fact, remark, assertion, assumption, claim, conclusion, conjecture, construction, convention, notation, observation, property, recall } { number within = homework }
 
+%%================================
+%%  Special cases for the QED
+%%================================
+
+\def\noQED{\let\popQED\relax}
+\let\noqed\noQED
+\def\proofless{\let\qedsymbol\customqedsymbol\let\simpleqedsymbol\customqedsymbol}
+
 \endinput
 %%
 %% End of file `homework.cls'.



More information about the tex-live-commits mailing list.