summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-02-21 21:09:40 +0000
committerKarl Berry <karl@freefriends.org>2024-02-21 21:09:40 +0000
commita1bbe615d3a2da1e536bcac0dbdc219859ac3e23 (patch)
treea681e110db9ca1c09b81f1146fa3876b742bec2c /Master/texmf-dist/tex/latex
parent2ed641d12ee441ca9105552f88cbc9dba73b912e (diff)
homework (21feb24)
git-svn-id: svn://tug.org/texlive/trunk@70044 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/homework/homework.cls25
1 files changed, 21 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/homework/homework.cls b/Master/texmf-dist/tex/latex/homework/homework.cls
index 914ff614cff..576cd354535 100644
--- a/Master/texmf-dist/tex/latex/homework/homework.cls
+++ b/Master/texmf-dist/tex/latex/homework/homework.cls
@@ -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,7 +289,24 @@
\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