texlive[68551] Master/texmf-dist: homework (15oct23)
commits+karl at tug.org
commits+karl at tug.org
Sun Oct 15 22:40:50 CEST 2023
Revision: 68551
https://tug.org/svn/texlive?view=revision&revision=68551
Author: karl
Date: 2023-10-15 22:40:50 +0200 (Sun, 15 Oct 2023)
Log Message:
-----------
homework (15oct23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/homework/README.md
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-10-15 20:40:42 UTC (rev 68550)
+++ trunk/Master/texmf-dist/doc/latex/homework/README.md 2023-10-15 20:40:50 UTC (rev 68551)
@@ -31,7 +31,8 @@
- 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.
+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 — the compilation would still pass, but the system shall spend (quite) some time verifying that the fonts are indeed missing before switching to the fallback fonts.
## Usage
@@ -208,8 +209,10 @@
#### 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}`.
+If the title is given and is not empty, then `\maketitle` shall automatically be added after `\begin{document}`, thus you don't need to write it by yourself.
+> Note that, for this to work, `\title`, `\author` and `\date`, etc. should be placed before `\begin{document}`.
+
#### 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/tex/latex/homework/homework.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/homework/homework.cls 2023-10-15 20:40:42 UTC (rev 68550)
+++ trunk/Master/texmf-dist/tex/latex/homework/homework.cls 2023-10-15 20:40:50 UTC (rev 68551)
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{homework}
- {2023/10/01b} {}
+ {2023/10/15} {}
{Document class for writing homework}
\keys_define:nn { homework }
@@ -171,9 +171,14 @@
\ResumeLineNumbers
}
-\AddToHook { begindocument/end }
+\def\@title{}
+
+\hook_gput_code:nnn { begindocument/end } { homework }
{
- \maketitle
+ \tl_if_empty:NF \@title
+ {
+ \maketitle
+ }
}
%%================================
More information about the tex-live-commits
mailing list.