texlive[70044] Master/texmf-dist: homework (21feb24)

commits+karl at tug.org commits+karl at tug.org
Wed Feb 21 22:09:40 CET 2024


Revision: 70044
          https://tug.org/svn/texlive?view=revision&revision=70044
Author:   karl
Date:     2024-02-21 22:09:40 +0100 (Wed, 21 Feb 2024)
Log Message:
-----------
homework (21feb24)

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/doc/latex/homework/homework-example-sheet-answer.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-example-sheet.pdf
    trunk/Master/texmf-dist/doc/latex/homework/homework-example-sheet.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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/README.md	2024-02-21 21:09:40 UTC (rev 70044)
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2023 by Jinwen XU -->
+<!-- Copyright (C) 2023-2024 by Jinwen XU -->
 
 # `homework`, a LaTeX class for writing your homework
 
@@ -17,7 +17,7 @@
 
 ### 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.
+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.
 
@@ -229,7 +229,9 @@
 
 Therefore, if you wish to manually change the numbering, you may directly access the value of the counter `homework`. Also, each theorem-type environment has its own counter, thus it would still work if you write `\setcounter{exercise}{10}`, but this would also affect the numbering of `problem` and `question`, so don't forget to reset the value as needed.
 
-If you wish them to be numbered separately, you may define new counters, say `problem-counter`, `question-counter` and `exercise-counter` via
+Alternatively, you may use the command `\ManualNumbering{⟨env⟩}{⟨number⟩}`. For example, `\ManualNumbering{exercise}{A.1.1}` will change the number of the next exercise to `A.1.1`, but after that the numbering shall go back to the normal one.
+
+If you wish these environments to be numbered separately, you may define new counters, say `problem-counter`, `question-counter` and `exercise-counter` via
 ```latex
 \newcounter{problem-counter}
 \newcounter{question-counter}

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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-cn.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -23,7 +23,7 @@
 \author{作者}
 % \date{\today,地点}
 % \date{\today[only-year-month],地点}
-\date{\TheDate{2023-12-25},地点}
+\date{\TheDate{2024-01-01},地点}
 
 
 \begin{document}
@@ -75,7 +75,7 @@
 \end{answer}
 
 
-\enlargethispage*{3\baselineskip}
+\enlargethispage*{\baselineskip}
 
 
 \bigskip\textcolor{gray!55}{(或者如果你更喜欢传统的证明样式…)}
@@ -124,6 +124,18 @@
 \end{problem}
 
 
+\bigskip\textcolor{gray!55}{(如果你希望手动编号一个习题…)}
+
+\ManualNumbering{exercise}{A.1.1}
+\begin{exercise}[一个手动编号的习题]
+    使用 \cverb|\ManualNumbering| 以手动对某个习题进行编号。这个编号只会影响下一个被指定的环境。
+\end{exercise}
+
+\begin{exercise}
+    之后编号便会恢复正常。
+\end{exercise}
+
+
 \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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-de.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -23,7 +23,7 @@
 \author{Vorname NAME}
 % \date{\today, der Standort}
 % \date{\today[only-year-month], der Standort}
-\date{\TheDate{2023-12-25}, der Standort}
+\date{\TheDate{2024-01-01}, der Standort}
 
 
 \begin{document}
@@ -75,9 +75,7 @@
 \end{answer}
 
 
-\enlargethispage*{3\baselineskip}
-
-
+\enlargethispage{.5\baselineskip}
 \bigskip\textcolor{gray!55}{(Wenn Sie den klassischen Proof-Stil bevorzugen ...)}
 
 \begin{proof}
@@ -124,6 +122,18 @@
 \end{problem}
 
 
+\bigskip\textcolor{gray!55}{(Wenn Sie die Übung manuell nummerieren möchten...)}
+
+\ManualNumbering{exercise}{A.1.1}
+\begin{exercise}[Eine Übung mit manuell festgelegter Nummerierung]
+    Verwenden Sie \cverb|\ManualNumbering| um die Nummerierung manuell festzulegen. Diese Nummerierung wird erst auf die nächste angegebene Umgebung angewendet.
+\end{exercise}
+
+\begin{exercise}
+    Zurück zur normalen Nummerierung.
+\end{exercise}
+
+
 \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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-en.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -20,7 +20,7 @@
 \author{Author NAME}
 % \date{\today, Location}
 % \date{\today[only-year-month], Location}
-\date{\TheDate{2023-12-25}, Location}
+\date{\TheDate{2024-01-01}, Location}
 
 
 \begin{document}
@@ -72,9 +72,6 @@
 \end{answer}
 
 
-\enlargethispage*{\baselineskip}
-
-
 \bigskip\textcolor{gray!55}{(If you prefer the classical proof style...)}
 
 \begin{proof}
@@ -121,6 +118,18 @@
 \end{problem}
 
 
+\bigskip\textcolor{gray!55}{(If you wish to number the exercise manually...)}
+
+\ManualNumbering{exercise}{A.1.1}
+\begin{exercise}[An exercise with custom numbering]
+    Use \cverb|\ManualNumbering| to manually set the numbering. This number will only be applied to the next specified environment.
+\end{exercise}
+
+\begin{exercise}
+    Back to normal numbering.
+\end{exercise}
+
+
 \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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-es.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -23,7 +23,7 @@
 \author{Nombre APELLIDO}
 % \date{\today, Ubicación}
 % \date{\today[only-year-month], Ubicación}
-\date{\TheDate{2023-12-25}, Ubicación}
+\date{\TheDate{2024-01-01}, Ubicación}
 
 
 \begin{document}
@@ -75,9 +75,6 @@
 \end{answer}
 
 
-\enlargethispage*{\baselineskip}
-
-
 \bigskip\textcolor{gray!55}{(Si prefiere el estilo clásico de prueba...)}
 
 \begin{proof}
@@ -124,6 +121,18 @@
 \end{problem}
 
 
+\bigskip\textcolor{gray!55}{(Si desea numerar el ejercicio manualmente...)}
+
+\ManualNumbering{exercise}{A.1.1}
+\begin{exercise}[Un ejercicio con numeración especificada manualmente]
+    Utilice \cverb|\ManualNumbering| para configurar manualmente la numeración. Esta numeración sólo se aplicará al siguiente entorno especificado.
+\end{exercise}
+
+\begin{exercise}
+    Volver a la numeración normal.
+\end{exercise}
+
+
 \bigskip\textcolor{gray!55}{(Si hay una pregunta que no sabe 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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-fr.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -23,7 +23,7 @@
 \author{Prénom NOM}
 % \date{\today, Lieu}
 % \date{\today[only-year-month], Lieu}
-\date{\TheDate{2023-12-25}, Lieu}
+\date{\TheDate{2024-01-01}, Lieu}
 
 
 \begin{document}
@@ -75,9 +75,6 @@
 \end{answer}
 
 
-\enlargethispage*{2\baselineskip}
-
-
 \bigskip\textcolor{gray!55}{(Si vous préférez le style classique...)}
 
 \begin{proof}
@@ -124,6 +121,18 @@
 \end{problem}
 
 
+\bigskip\textcolor{gray!55}{(Si vous souhaitez numéroter l'exercice manuellement...)}
+
+\ManualNumbering{exercise}{A.1.1}
+\begin{exercise}[Un exercice avec une numérotation manuelle]
+    Utilisez \cverb|\ManualNumbering| pour configurer manuellement la numérotation. Cette numérotation ne sera appliquée qu'au prochain environnement spécifié.
+\end{exercise}
+
+\begin{exercise}
+    Retour à la numérotation normale.
+\end{exercise}
+
+
 \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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-jp.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -23,7 +23,7 @@
 \author{著者名}
 % \date{\today、所在地}
 % \date{\today[only-year-month]、所在地}
-\date{\TheDate{2023-12-25}、所在地}
+\date{\TheDate{2024-01-01}、所在地}
 
 
 \begin{document}
@@ -76,6 +76,9 @@
 \end{answer}
 
 
+\enlargethispage*{2\baselineskip}
+
+
 \bigskip\textcolor{gray!55}{(伝統的な証明スタイルがお好みなら…)}
 
 \begin{proof}
@@ -122,6 +125,18 @@
 \end{problem}
 
 
+\bigskip\textcolor{gray!55}{(練習に手動で番号を付けたい場合は…)}
+
+\ManualNumbering{exercise}{A.1.1}
+\begin{exercise}[手動で番号を付けた練習]
+    \cverb|\ManualNumbering| を使用して、手動で練習に番号を付けます。この番号付けは、次に指定された環境にのみ影響します。
+\end{exercise}
+
+\begin{exercise}
+    その後、番号付けは通常に戻ります。
+\end{exercise}
+
+
 \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	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-demo-tc.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -23,7 +23,7 @@
 \author{作者}
 % \date{\today,地點}
 % \date{\today[only-year-month],地點}
-\date{\TheDate{2023-12-25},地點}
+\date{\TheDate{2024-01-01},地點}
 
 
 \begin{document}
@@ -75,7 +75,7 @@
 \end{answer}
 
 
-\enlargethispage*{3\baselineskip}
+\enlargethispage*{\baselineskip}
 
 
 \bigskip\textcolor{gray!55}{(或者如果你更喜歡傳統的證明樣式…)}
@@ -124,6 +124,18 @@
 \end{problem}
 
 
+\bigskip\textcolor{gray!55}{(如果你希望手動編號一個習題…)}
+
+\ManualNumbering{exercise}{A.1.1}
+\begin{exercise}[一個手動編號的習題]
+    使用 \cverb|\ManualNumbering| 以手動對某個習題進行編號。 這個編號只會影響下一個被指定的環境。
+\end{exercise}
+
+\begin{exercise}
+    之後編號便會恢復正常。
+\end{exercise}
+
+
 \bigskip\textcolor{gray!55}{(如果你有暫時解決不出來的問題…)}
 
 \DNF<一些描述>

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-example-sheet-answer.pdf
===================================================================
(Binary files differ)

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

Modified: trunk/Master/texmf-dist/doc/latex/homework/homework-example-sheet.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/homework/homework-example-sheet.tex	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/doc/latex/homework/homework-example-sheet.tex	2024-02-21 21:09:40 UTC (rev 70044)
@@ -20,7 +20,7 @@
     \\
                     Course ID \& Course Name
     \hfill
-                    Year 2023--24
+                    Year 2024--25
 }
 
 \title{%
@@ -28,7 +28,7 @@
 }
 \author{}
 \date{%
-                    % \TheDate{2023-12-25}
+                    % \TheDate{2024-01-01}
 }
 
 

Modified: trunk/Master/texmf-dist/tex/latex/homework/homework.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/homework/homework.cls	2024-02-21 21:09:29 UTC (rev 70043)
+++ trunk/Master/texmf-dist/tex/latex/homework/homework.cls	2024-02-21 21:09:40 UTC (rev 70044)
@@ -1,6 +1,6 @@
 %%
-%% Copyright (C) 2023 by Jinwen XU
-%% -------------------------------
+%% Copyright (C) 2023-2024 by Jinwen XU
+%% ------------------------------------
 %%
 %% This file may be distributed and/or modified under the conditions of
 %% the LaTeX Project Public License, either version 1.3c of this license
@@ -12,7 +12,7 @@
 \NeedsTeXFormat{LaTeX2e}[2022-06-01]
 \ProvidesExplClass
   {homework}
-  {2023/10/15a} {}
+  {2024/02/21} {}
   {Document class for writing homework}
 
 \keys_define:nn { homework }
@@ -289,9 +289,26 @@
 
 \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 }
+\SetTheorem { definition, lemma, theorem, proposition, corollary, example, fact, remark, assertion, assumption, claim, commentary, conclusion, conjecture, construction, convention, hypothesis, motivation, notation, observation, postulate, property, recall } { number within = homework }
+\SetTheorem { definitions, lemmas, theorems, propositions, corollaries, examples, facts, remarks, assertions, assumptions, claims, commentaries, conclusions, conjectures, constructions, conventions, hypotheses, motivations, notations, observations, postulates, properties, recalls } { number within = homework }
 
 %%================================
+%%  Custom numbering
+%%================================
+
+\tl_new:N \l__homework_counter_backup_tl
+\NewDocumentCommand \ManualNumbering { m m }
+  {
+    \addtocounter { #1 } { -1 }
+    \tl_set_eq:Nc \l__homework_counter_backup_tl { the #1 }
+    \tl_set:cn { the #1 } { #2 }
+    \hook_gput_next_code:nn { env/#1/after }
+      {
+        \tl_set_eq:cN { the #1 } \l__homework_counter_backup_tl
+      }
+  }
+
+%%================================
 %%  Hide solution
 %%================================
 



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