summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-10-01 03:03:24 +0000
committerNorbert Preining <norbert@preining.info>2024-10-01 03:03:24 +0000
commit0334a8e480aedd3ffbc63090f1ea3d39ffb7d5fd (patch)
treed8ed5d2235b398dbe4c3811afa318106b76760b8 /macros/latex
parentd2ecf1d3a0eafabbcd0b1f70f53e33609df9f56a (diff)
CTAN sync 202410010303HEADmaster
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/csvsimple/CHANGES.md14
-rw-r--r--macros/latex/contrib/csvsimple/README.md2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-doc.sty9
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.pdfbin72044 -> 72044 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.pdfbin951198 -> 951769 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.sty36
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.tex9
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.pdfbin690985 -> 691190 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.pdfbin295659 -> 295267 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.tex2
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx15
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin644963 -> 646157 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex12
-rw-r--r--macros/latex/contrib/keytheorems/CHANGELOG.md5
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdfbin535187 -> 144556 bytes
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex331
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex31
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex16
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex16
-rw-r--r--macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex7
-rw-r--r--macros/latex/contrib/keytheorems/tex/keytheorems.sty539
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-cn.pdfbin189359 -> 175393 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-cn.tex259
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-demo.pdfbin56608 -> 55363 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-demo.tex94
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-en.pdfbin118137 -> 486273 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-en.tex229
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-hk.pdfbin200254 -> 190931 bytes
-rw-r--r--macros/latex/contrib/litetable/doc/litetable-hk.tex249
-rw-r--r--macros/latex/contrib/litetable/tex/litetable.cls737
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdfbin990245 -> 990245 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdfbin711375 -> 711375 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdfbin602781 -> 602781 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdfbin515753 -> 515753 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdfbin558768 -> 558768 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdfbin520855 -> 520855 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdfbin523018 -> 523018 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdfbin517529 -> 517529 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdfbin573028 -> 573028 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdfbin516601 -> 516601 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdfbin732912 -> 732912 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdfbin568185 -> 568185 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdfbin685763 -> 685763 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdfbin834408 -> 834408 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdfbin530692 -> 530692 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdfbin427806 -> 427806 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdfbin588349 -> 588349 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdfbin434607 -> 434607 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdfbin464470 -> 464470 bytes
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md10
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin645515 -> 645497 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-compound.dtx1
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx1
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx5
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin703916 -> 703918 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/README.md2
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdfbin268481 -> 270526 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdfbin164864 -> 166576 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdfbin270492 -> 273650 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdfbin169129 -> 171925 bytes
-rw-r--r--macros/latex/contrib/ucph-revy/ucph-revy.dtx78
-rw-r--r--macros/latex/contrib/zref-clever/CHANGELOG.md7
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-code.pdfbin890025 -> 891606 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.pdfbin228899 -> 229279 bytes
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever-doc.tex7
-rw-r--r--macros/latex/contrib/zref-clever/zref-clever.dtx350
72 files changed, 1559 insertions, 1530 deletions
diff --git a/macros/latex/contrib/csvsimple/CHANGES.md b/macros/latex/contrib/csvsimple/CHANGES.md
index 3178395f76..e2ccf7af24 100644
--- a/macros/latex/contrib/csvsimple/CHANGES.md
+++ b/macros/latex/contrib/csvsimple/CHANGES.md
@@ -17,6 +17,20 @@ and this project adheres to
+## [2.7.0] - 2024-09-27
+
+### Added
+- Warning, if the CSV file does not contain (accepted) data lines
+
+### Changed
+- Comment lines or empty line before header line are now supported (issue #41)
+- If there is no data line, `late after head` and `late after last line` are applied nonetheless
+ (loosely connected to issue #41). Note: You should not use files without data!
+- Technical information: The package documentation is now produced with lualatex instead of pdflatex
+- Technical information: The documentation loads `minted2`, if it exists, to avoid encoding errors and latexmk problems with minted v3
+
+
+
## [2.6.1] - 2024-05-16
### Changed
diff --git a/macros/latex/contrib/csvsimple/README.md b/macros/latex/contrib/csvsimple/README.md
index 29196c03e9..47c07daf07 100644
--- a/macros/latex/contrib/csvsimple/README.md
+++ b/macros/latex/contrib/csvsimple/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+# The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
> Copyright (c) 2008-2024 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
diff --git a/macros/latex/contrib/csvsimple/csvsimple-doc.sty b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
index c8d933c684..12141768f5 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-doc.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
@@ -1,5 +1,5 @@
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-doc.sty: style file for the documentation
%%
%% -------------------------------------------------------------------------------------------
@@ -18,8 +18,8 @@
%%
%% This work consists of all files listed in README.md
%%
-\def\version{2.6.1}%
-\def\datum{2024/05/16}%
+\def\version{2.7.0}%
+\def\datum{2024/09/27}%
\IfFileExists{csvsimple-doc.cfg}{\input{csvsimple-doc.cfg}}{}\providecommand\csvpkgprefix{}
@@ -55,6 +55,7 @@
\RequirePackage{longtable,booktabs,ifthen,etoolbox}
+\IfFileExists{minted2.sty}{\RequirePackage{minted2}}{}
\RequirePackage{tcolorbox}
\tcbuselibrary{skins,xparse,minted,breakable,documentation,raster}
@@ -112,4 +113,4 @@
\makeindex
-\pdfsuppresswarningpagegroup=1
+%\pdfsuppresswarningpagegroup=1
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.pdf b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
index f85684f6d1..b916830089 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.tex b/macros/latex/contrib/csvsimple/csvsimple-example.tex
index 0baf2183c7..73b321be2b 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-example.tex: an example for csvsimple
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
index f17b9183c3..66d770fefe 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.sty b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
index 849aa79aec..3d8d1484b6 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-l3.sty: Simple LaTeX CSV file processing (LaTeX3)
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}[2023-11-01]
-\ProvidesExplPackage{csvsimple-l3}{2024/05/16}{2.6.1}
+\ProvidesExplPackage{csvsimple-l3}{2024/09/27}{2.7.0}
{LaTeX3 CSV file processing}
@@ -148,9 +148,6 @@
Therefore,~the~macro~#2 is~not~defined.
}
-\msg_new:nnn { csvsimple }{ empty-head }
- { File~'#1'~starts~with~an~empty~line~(empty~head)!.}
-
\msg_new:nnn { csvsimple }{ file-error }
{ File~'#1'~not~existent,~not~readable,~or~empty!}
@@ -167,6 +164,8 @@
{ Call~of~CSV-Sorter~failed! }
{ See~log~file~'\l__csvsim_csvsorter_log_str'. }
+\msg_new:nnn { csvsimple }{ data-missing }
+ { File~'#1'~does~not~contain~(accepted)~data~lines!~The~result~may~be~unpleasant.}
%---- core loop processing
@@ -227,18 +226,18 @@
\cs_new_protected_nopar:Npn \__csvsim_read_head:
{
- \__csvsim_read_line:
- \tl_if_eq:NNTF \csvline \c__csvsim_par_tl
+ \bool_do_while:nn
{
- \msg_error:nne { csvsimple }{ empty-head }{ \g__csvsim_filename_str }
+ \bool_lazy_or_p:nn { \tl_if_eq_p:NN \csvline \c__csvsim_par_tl }{ \tl_if_blank_p:o \csvline }
}
{
- \int_gzero:N \g_csvsim_columncount_int
- \__csvsim_scan_line:
- \bool_if:NT \g__csvsim_colnames_detection_bool
- {
- \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
- }
+ \__csvsim_read_line:
+ }
+ \int_gzero:N \g_csvsim_columncount_int
+ \__csvsim_scan_line:
+ \bool_if:NT \g__csvsim_colnames_detection_bool
+ {
+ \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
}
}
@@ -395,10 +394,15 @@
}
\__csvsim_set_colnames:
\seq_gclear:N \g__csvsim_colname_seq
- \bool_if:NF \g__csvsim_line_firstline_bool
+ \bool_if:NT \g__csvsim_line_firstline_bool
{
- \g__csvsim_hook_late_after_last_line_tl
+ \msg_warning:nne { csvsimple }{ data-missing }{ \g__csvsim_filename_str }
+ \bool_if:NT \g__csvsim_head_bool
+ {
+ \g__csvsim_hook_late_after_head_tl
+ }
}
+ \g__csvsim_hook_late_after_last_line_tl
\g__csvsim_hook_table_end_tl
\g__csvsim_hook_after_reading_tl
\bool_if:NT \g__csvsim_collect_data_bool
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.tex b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
index 6c70fa3003..fba06f6660 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
@@ -1,7 +1,7 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
% !TeX spellcheck=en_US
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -1027,14 +1027,14 @@ see Section~\ref{subsec:tabsupport} from page~\pageref{subsec:tabsupport}.
\clearpage
\subsection{Header Processing and Column Name Assignment}%
-\begin{docCsvKey}{head}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
- If this key is set, the first line of the CSV file is treated as a header
+\begin{docCsvKey}[doc updated=2024-09-18]{head}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
+ If this key is set, the first non-empty line of the CSV file is treated as a header
line which can be used for column name assignments.
\end{docCsvKey}
\begin{docCsvKey}{no head}{}{no value}
- Abbreviation for |head=false|, i.\,e. the first line of the CSV file is
+ Abbreviation for |head=false|, i.\,e. the first non-empty line of the CSV file is
treated as data line.
Note that this option cannot be used in combination with
the |\csvauto...| commands like \refCom{csvautotabular}, etc.
@@ -1842,6 +1842,7 @@ completeness, but are unlikely to be used directly.
\subsection{Special Characters}\label{subsec:specchar}
Be default, the CSV content is treated like normal \LaTeX\ text, see
Subsection~\ref{macrocodexample} on page~\pageref{macrocodexample}.
+For example, \%~can be used to start an in-line comment.
But, \TeX\ special characters of the CSV content may also be interpreted
as normal characters (|\catcode| 12, other), if one or more of the following options are used.
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
index 6138c507e3..25285b6379 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
index ecaba4a7b0..7db0c82117 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple-legacy.sty: Simple LaTeX CSV file processing (LaTeX2e)
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple-legacy}[2024/05/16 version 2.6.1 LaTeX2e CSV file processing]
+\ProvidesPackage{csvsimple-legacy}[2024/09/27 version 2.7.0 LaTeX2e CSV file processing]
%---- check package
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
index ae40e8563d..2161afddb2 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple.pdf b/macros/latex/contrib/csvsimple/csvsimple.pdf
index 8d148b5a6f..a5cb3da2e5 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple.sty b/macros/latex/contrib/csvsimple/csvsimple.sty
index 01ccbb3f72..a9d549f76d 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
-\ProvidesExplPackage{csvsimple}{2024/05/16}{2.6.1}
+\ProvidesExplPackage{csvsimple}{2024/09/27}{2.7.0}
{LaTeX CSV file processing}
\cs_if_exist:NT \c__csvsim_package_expl_bool
diff --git a/macros/latex/contrib/csvsimple/csvsimple.tex b/macros/latex/contrib/csvsimple/csvsimple.tex
index 73d34f4c34..f3a5d66953 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.6.1 (2024/05/16)
+%% The LaTeX package csvsimple - version 2.7.0 (2024/09/27)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index 35bbcd7a1a..837f87457b 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,5 +1,5 @@
# The `easybook` document class
-Easily typesetting Chinese theses or books (v2024ea)
+Easily typesetting Chinese theses or books (v2024eb)
## Abstract
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 74320fb685..4a796d4b94 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/09/28}{2024ea}
+\ProvidesExplClass{easybook}{2024/09/30}{2024eb}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/09/28}{2024ea}
+\ProvidesExplPackage{easybase}{2024/09/30}{2024eb}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1698,6 +1698,7 @@
\tl_set:cn { ttll@#2 } {#1}
}
\contentsuse{lstlisting}{lol}
+\cs_set:Npn \hytoclink #1 { \Hy@toclinkstart #1\Hy@toclinkend }
\seq_put_left:Nn \c__ctex_headings_seq { chapter }
\seq_put_right:Nn \c__ctex_headings_seq { table }
\seq_put_right:Nn \c__ctex_headings_seq { figure }
@@ -1751,7 +1752,7 @@
\bool_if:NTF \l__eb_toc_entry_hang_bool
{ \IfBooleanTF{##3}{\use:n}{\contentspush} }
{ \use:n }
- { ##1\tl_use:c { l__eb_toc_##2_after_tl } }
+ { \hytoclink{##1}\tl_use:c { l__eb_toc_##2_after_tl } }
},
tocafter = \hspace{1em},
tocsep = .—,
@@ -2406,7 +2407,11 @@
}
}
\cs_new_protected:Npn \eb_theorem_load_keytheorems:
- { \RequirePackage{keytheorems} }
+ {
+ \RequirePackage{keytheorems}
+ \DeclareFloatList{theorem}{thlist}
+ \AssignPartialExt{thlist}{ple}
+ }
\str_case:Vn \l__eb_theorem_support_tl
{
{ thmtools }
@@ -2840,7 +2845,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/09/28}{2024ea}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/09/30}{2024eb}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 11cfd7cef2..b3797d865f 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 3515543b78..1d85c8d92e 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024ea,
- date = 2024/09/28,
+ version = v2024eb,
+ date = 2024/09/30,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -608,7 +608,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\command{listoftheorems}[\sarg\oarg{键值列表}]\default{}
\item\key{listtheoremname}{定理目录标题名}
\command{settheoremtocline}[\sarg\marg{环境名}\marg{标题定义}]\newtagv{2024bb}%
- 对 \pkg*{thmtools} 宏包的定理环境目录命令 \cs{listoftheorems} 进行了适配调整,\ref{subsec:directory command} 和\ref{subsec:contents} 中的选项机制均可用,但标题定义选项 \option{tocline} 较为特殊,需用 \cs{settheoremtocline} 命令单独设置。在 \meta{标题定义} 中有三个命令 \cs{thmtname}、\cs{thmtenvname} 和 \cs{thmtnote} 分别代表定理名、定理环境名和题注用于排版目录条目。
+ 对 \pkg*{thmtools} 宏包的定理环境目录命令 \cs{listoftheorems} 进行了适配调整\footnote{也对 \pkg*{keytheorems} 宏包作为兼容提供的这个命令进行了适配。},\ref{subsec:directory command} 和\ref{subsec:contents} 中的选项机制均可用,但标题定义选项 \option{tocline} 较为特殊,需用 \cs{settheoremtocline} 命令单独设置。在 \meta{标题定义} 中有三个命令 \cs{thmtname}、\cs{thmtenvname} 和 \cs{thmtnote} 分别代表定理名、定理环境名和题注用于排版目录条目。
\end{cnltxlist}
\optpath{thmt/}\key{loeskip}{弹性长度}\Default{10pt}
定理目录中每章第一个条目上方增加的垂直距离。与 \CTeX 的表格和图片目录中每章间的条目距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
@@ -627,7 +627,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
}
\end{ctexexam}
- 如果使用 \pkg*{keytheorems} 宏包创建定理环境,它的目录样式同样可以用 \module*{toc} 模块的命令注册后定制,但是 \option{tocline} 需用目录命令自带的 \option{format-code} 选项修改:
+ 如果使用 \pkg*{keytheorems} 宏包创建定理环境,它的目录样式同样可以用 \module*{toc} 模块的命令注册后定制,其中 \option{tocline} 可用目录命令自带的 \option{format-code} 选项设置:
\begin{ctexexam}
\newkeytheorem{corollary}[name = 推论]
\contentsuse{corollary}{thlist}
@@ -904,6 +904,8 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
\newcommand{\seqentry}[2]{#2-#1} % #2为标题内容
\ctexset{chapter/toclabel = \seqentry{#1}}
\end{ctexexam}
+ \command{hytoclink}[\marg{目录条目元素}]\newtagv{2024eb}%
+ 给目录条目元素增加超链接,主要用于 \option{toclabel} 选项中的标签。使用 \pkg*{titletoc} 宏包时条目标题的标签超链接会缺失,这个命令可修复此问题。
\keyval{tocafter}{距离命令}\dtag\Default{\cs*{hspace}\Marg{1em}}
目录条目标签与标题间的代码,默认为插入 \code{1em} 横向距离。
\keyval{tocbelow}{距离命令}\dtag
@@ -920,7 +922,7 @@ $\blacktriangleright$需要注意正确\textbf{编译索引}要增加 \code{-she
tocrule = \tocrule[0.6pc](1.1){.}[\zihao{5}],
tocline = \CTEXnumberline{#1}#2
},
- section/toclabel = \contentspush{#1\hspace{0.5em}},
+ section/toclabel = \contentspush{\hytoclink{#1}\hspace{0.5em}},
section/tocrule = \tocrule-{}\makebox[1cm]{\rlap{\thecontentspage}},
toc/pagenumwd = 0pt
}
diff --git a/macros/latex/contrib/keytheorems/CHANGELOG.md b/macros/latex/contrib/keytheorems/CHANGELOG.md
index 551e3b8691..effaaf9962 100644
--- a/macros/latex/contrib/keytheorems/CHANGELOG.md
+++ b/macros/latex/contrib/keytheorems/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog for keytheorems package
+## [v0.1.5]
+- add `format-code` list key
+- can now use `\thmname`, `\thmnumber`, `\thmnote` in `headformat`
+
## [v0.1.4]
- add `store-sets-label` option
- add `restatable*` environment for `thmtools-compat`
@@ -27,6 +31,7 @@
## 0.1.0 - 2024-09-04
- First release
+[v0.1.5]: https://github.com/mbertucci47/keytheorems/compare/v0.1.4...v0.1.5
[v0.1.4]: https://github.com/mbertucci47/keytheorems/compare/v0.1.3...v0.1.4
[v0.1.3]: https://github.com/mbertucci47/keytheorems/compare/v0.1.2...v0.1.3
[v0.1.2]: https://github.com/mbertucci47/keytheorems/compare/v0.1.1...v0.1.2
diff --git a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
index 6d3e5af737..2b00e587c9 100644
--- a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
+++ b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
index bb7c34d5e5..42c22187fd 100644
--- a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
+++ b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
@@ -1,26 +1,29 @@
-% !TeX program = txs:///pdflatex/[--shell-escape] | txs:///makeindex | txs:///pdflatex/[--shell-escape] | txs:///view-pdf
+% !TeX program = txs:///lualatex | txs:///makeindex | txs:///lualatex | txs:///view-pdf
\PassOptionsToPackage{hyperindex}{hyperref}
\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass{ltxdoc}
\usepackage{geometry}
\geometry{margin=1in}
\usepackage{tcolorbox}
+\PassOptionsToPackage{highlightmode=immediate}{minted}
\tcbuselibrary{documentation,minted}
\tcbset{
listing engine=minted,
minted language=latex,
}
-\ifTUTeX\else
+\ifTUTeX
+\usepackage{newcomputermodern}
+\else
\usepackage{lmodern}
\usepackage[T1]{fontenc}
+\usepackage{amssymb}
\fi
\usetikzlibrary{cd}
\usepackage{booktabs}
\usepackage{keytheorems}
\usepackage{cleveref}
-\usepackage{amssymb}
-\def\version{0.1.4}
+\def\version{0.1.5}
\title{%
\pkg{keytheorems} package \\[1ex]
@@ -169,6 +172,8 @@ A \LaTeX{} kernel no older than 2023-06-01 is required; if older than 2024-06-01
Every key in this section can be given as a package option with \cs{usepackage}\bracks{\meta{options}}\ttbraces{keytheorems} or in \cs{keytheoremset}\marg{options}, with the exception that \refKey{continues-code} can only be used in the latter.
\end{docCommand}
+\subsection{Compatibility options}
+
\begin{docKey}{overload}
{}
{initially unset}
@@ -180,40 +185,37 @@ This is automatically set by \refKey{thmtools-compat}.
{}
{initially unset}
For compatibility with \pkg{thmtools} syntax.
-Currently defines the commands in the left column below.
+For most documents, \cs{usepackage}\bracks{thmtools-compat}\ttbraces{keytheorems} should be a drop-in replacement for \cs{usepackage}\ttbraces{amsthm,thmtools}.
+The option defines the commands in the left column below.
The right column lists the corresponding \pkg{keytheorems} replacement that should be used in new documents.
\begin{center}
-\begin{tabular}{cc}
-\pkg{thmtools} command & \pkg{keytheorems} replacement \\
+\begin{tabular}{rcl}
+\multicolumn{1}{c}{\pkg{thmtools} command} & & \multicolumn{1}{c}{\pkg{keytheorems} replacement} \\
\toprule
-\docAuxCommand*{declaretheorem} & \refCom{newkeytheorem} \\
-\docAuxCommand*{declaretheoremstyle} & \refCom{newkeytheoremstyle} \\
-\docAuxCommand*{listoftheorems} & \refCom{listofkeytheorems} \\
-\begin{tabular}{c}
+\docAuxCommand*{declaretheorem} & $\rightarrow$ & \refCom{newkeytheorem} \\
+\docAuxCommand*{declaretheoremstyle} & $\rightarrow$ & \refCom{newkeytheoremstyle} \\
+\docAuxCommand*{listoftheorems} & $\rightarrow$ & \refCom{listofkeytheorems} \\
+\docAuxCommand*{listtheoremname} & $\rightarrow$ & \refKey{title} key \\
+\begin{tabular}{r@{}}
\docAuxCommand*{addtotheorempreheadhook}\\
\docAuxCommand*{addtotheorempostheadhook}\\
\docAuxCommand*{addtotheoremprefoothook}\\
\docAuxCommand*{addtotheorempostfoothook}\\
-\end{tabular} & \refCom{addtotheoremhook} \\
-\docAuxEnvironment*{restatable} environment & \refKey{store} key \\
-\docAuxEnvironment*{restatable*} environment & \refKey[store*]{store} key
+\end{tabular} & $\rightarrow$ & \refCom{addtotheoremhook} \\
+\docAuxEnvironment*{restatable} environment & $\rightarrow$ & \refKey{store} key \\
+\docAuxEnvironment*{restatable*} environment & $\rightarrow$ & \refKey[store*]{store} key
\end{tabular}
\end{center}
Also defined are the \docAuxKey*{shaded} and \docAuxKey*{thmbox} keys, implemented internally with \pkg{tcolorbox} rather than the \pkg{shadethm} and \pkg{thmbox} packages, respectively.
\end{docKey}
-\begin{docKey}{store-all}
- {}
- {initially unset}
-Tells \pkg{keytheorems} to grab the body of each theorem so it can later be printed with the \refKey{print-body} option of \refCom{listofkeytheorems}.
-Note that this means a theorem body \emph{cannot} contain verbatim material.
-\end{docKey}
+\subsection{Other global options}
-\begin{docKey}{restate-counters}
- {=\marg{comma-list of counters}}
- {initially \ttbraces{equation}}
-Additional counters whose values are preserved when a theorem is restated.
-This key does not reset the list, so you don't need to include |equation| in \meta{comma-list}.
+\begin{docKey}{auto-translate}
+ {\colOpt{=true\textbar false}}
+ {default |true|, initially |true|}
+If |false|, \pkg{keytheorems} does not automatically translate the title text for \refCom{listofkeytheorems} and the note produced by the \refKey{continues} key.
+These texts can be manually customized with the \refKey{title} and \refKey{continues-code} keys, respectively.
\end{docKey}
\begin{docKey}{continues-code}
@@ -230,14 +232,21 @@ Currently (likely inaccurate!) translations exist for French, German, Italian, P
Redefines \cs{qedsymbol} to be \meta{symbol}.
\end{docKey}
-\begin{docKey}{auto-translate}
- {\colOpt{=true\textbar false}}
- {default |true|, initially |true|}
-If |false|, \pkg{keytheorems} does not automatically translate the title text for \refCom{listofkeytheorems} and the note produced by the \refKey{continues} key.
-These texts can be manually customized with the \refKey{title} and \refKey{continues-code} keys, respectively.
+\begin{docKey}{restate-counters}
+ {=\marg{comma-list of counters}}
+ {initially \ttbraces{equation}}
+Additional counters whose values are preserved when a theorem is restated.
+This key does not reset the list, so you don't need to include |equation| in \meta{comma-list}.
+\end{docKey}
+
+\begin{docKey}{store-all}
+ {}
+ {initially unset}
+Tells \pkg{keytheorems} to grab the body of each theorem so it can later be printed with the \refKey{print-body} option of \refCom{listofkeytheorems}.
+Note that this means a theorem body \emph{cannot} contain verbatim material.
\end{docKey}
-\begin{docKey}{store-sets-translate}
+\begin{docKey}{store-sets-label}
{}
{initially unset}
Defines the \refKey{store} key to also set \refKey{label}, i.e. it makes |store=|\meta{tag} equivalent to |store=|\meta{tag}|,label=|\meta{tag}. Similarly for \refKey[store*]{store}.
@@ -424,7 +433,7 @@ Adds the theorem to a custom sequence \meta{name} that can then be listed with \
See \refKey{listof/seq} for more details.
\end{docKey}
-\subsection{Keys inherited from \pkg{thmtools}} \label{thm-thmtools-keys}
+\subsection{Keys also defined in \pkg{thmtools}} \label{thm-thmtools-keys}
These are the \oarg{options} available to \cs{newkeytheorem}.
Except for \refKey{thm/name} and \refKey{style}, each key below can also be used in \refCom{newkeytheoremstyle}.
@@ -433,7 +442,7 @@ For more description, see the \href{https://ctan.org/pkg/thmtools}{\pkg{thmtools
\begin{docKey}[][doc label=thm/name]{name}
{=\meta{display name}}
{initially title-cased \meta{env name}}
-Aliases \docAuxKey{title} and \docAuxKey{heading}.
+Aliases \docAuxKey{heading} and \docAuxKey{title}.
\begin{tcbwritetemp}
\newkeytheorem{mythm}[name=Some Name]
@@ -545,6 +554,28 @@ Some text
\end{docKeys}
+\begin{docKey}{qed}
+ {\colOpt{=\meta{symbol}}}
+ {default \cs{openbox}, initially unset}
+Adds \colOpt{\meta{symbol}} to the end of the theorem body.
+If no value is given, the symbol \openbox\ is used.
+
+\begin{tcbwritetemp}
+\newkeytheorem{example}[qed]
+\newkeytheorem{solution}[qed=$\clubsuit$]
+\end{tcbwritetemp}
+
+\begin{keythmscode}[withpreamble]
+\begin{example}
+Some text
+\end{example}
+\begin{solution}
+Some more text
+\end{solution}
+\end{keythmscode}
+
+\end{docKey}
+
\begin{docKey}{refname}
{=\meta{ref name} \textrm{or} \brackets{\meta{singular name},\meta{plural name}}}
{initially \meta{display name}}
@@ -582,28 +613,6 @@ Consider \cref{abc,def}.
\end{docKey}
-\begin{docKey}{qed}
- {\colOpt{=\meta{symbol}}}
- {default \cs{openbox}, initially unset}
-Adds \colOpt{\meta{symbol}} to the end of the theorem body.
-If no value is given, the symbol \openbox\ is used.
-
-\begin{tcbwritetemp}
-\newkeytheorem{example}[qed]
-\newkeytheorem{solution}[qed=$\clubsuit$]
-\end{tcbwritetemp}
-
-\begin{keythmscode}[withpreamble]
-\begin{example}
-Some text
-\end{example}
-\begin{solution}
-Some more text
-\end{solution}
-\end{keythmscode}
-
-\end{docKey}
-
\subsection{Keys added by \pkg{keytheorems}} \label{thm-added-keys}
\begin{docKey}{tcolorbox}
@@ -631,7 +640,7 @@ The theorem head is typeset as a tcolorbox title; to avoid this see \refKey{tcol
\begin{corollary}
Some text
\end{corollary}
-\begin{definition}
+\begin{definition}[A nice definition]
Some more text
\end{definition}
\end{keythmscode}
@@ -704,57 +713,55 @@ The defined style can be used with either the \refKey{style} key or the traditio
For the AMS classes \cls{amsart}, \cls{amsbook}, and \cls{amsproc}, as well as the \cls{amsart}-based \cls{acmart}, the initial key values are slightly different than what's below in order to match those class's defaults.
\end{notebox}
-\subsection{Keys inherited from \pkg{thmtools}}
+\subsection{Keys also defined in \pkg{thmtools}}
The following keys have the same meaning and syntax as the corresponding \pkg{thmtools} keys.
In addition to the list below, most of the keys available to \refCom{newkeytheorem} can be used in \cs{newkeytheoremstyle}.
-\begin{docKey}{spaceabove}
- {=\meta{length}}
- {initially \cs{topsep}}
+\begin{docKey}{bodyfont}
+ {=\meta{font declarations}}
+ {initially \cs{itshape}}
\end{docKey}
-\begin{docKey}{spacebelow}
- {=\meta{length}}
- {initially \cs{topsep}}
-
+\begin{docKey}{break}
+ {}
+ {initially unset}
+Do not use this with the \refKey{postheadspace} key.
\end{docKey}
-\begin{docKey}{bodyfont}
+\begin{docKey}{headfont}
{=\meta{font declarations}}
- {initially \cs{itshape}}
+ {initially \cs{bfseries}}
+
+\end{docKey}
+\begin{docKey}{headformat}
+ {=\docValue{margin}\textbar\docValue{swapnumber}\textbar\meta{code using \cs{NAME}, \cs{NUMBER}, and \cs{NOTE}\,}}
+ {}
+Alias \docAuxKey{headstyle}. Within \meta{code}, the commands \docAuxCommand{NAME}, \docAuxCommand{NUMBER}, and \docAuxCommand{NOTE} correspond to the formatted parts of the theorem head.
\end{docKey}
+\begin{notebox}
+In \refKey{headformat}, you may also use the traditional \pkg{amsthm} commands \cs{thmname}, \cs{thmnumber}, and \cs{thmnote}, where |#1| is the theorem name, |#2| the number, and |#3| the note. \pkg{keytheorems} expands the head spec inside |\text_expand:n| so for these commands to work properly, the package adds them to |\l_text_expand_exclude_tl|. Note also that if you use these lower-level commands, the style keys \refKey{notebraces}, \refKey{notefont}, \refKey{noteseparator}, and \refKey{numberfont} will have no effect (of course, you can manually control these things inside the commands' arguments).
+\end{notebox}
+
\begin{docKey}{headindent}
{=\meta{length}}
{initially |0pt|}
\end{docKey}
-\begin{docKey}{headfont}
- {=\meta{font declarations}}
- {initially \cs{bfseries}}
-
-\end{docKey}
-
\begin{docKey}{headpunct}
{=\meta{code}}
{initially \ttbraces{.}}
\end{docKey}
-\begin{docKey}{postheadspace}
- {=\meta{length}}
- {initially |5pt plus 1pt minus 1pt|}
-Do not use this with the \refKey{break} key.
-\end{docKey}
+\begin{docKey}{notebraces}
+ {=\marg{left brace}\marg{right brace}}
+ {initially \ttbraces{(}\ttbraces{)}}
-\begin{docKey}{break}
- {}
- {initially unset}
-Do not use this with the \refKey{postheadspace} key.
\end{docKey}
\begin{docKey}{notefont}
@@ -763,20 +770,33 @@ Do not use this with the \refKey{postheadspace} key.
\end{docKey}
-\begin{docKey}{notebraces}
- {=\marg{left brace}\marg{right brace}}
- {initially \ttbraces{(}\ttbraces{)}}
+\begin{docKey}{postheadspace}
+ {=\meta{length}}
+ {initially |5pt plus 1pt minus 1pt|}
+Do not use this with the \refKey{break} key.
+\end{docKey}
+
+\begin{docKey}{spaceabove}
+ {=\meta{length}}
+ {initially \cs{topsep}}
\end{docKey}
-\begin{docKey}{headformat}
- {=\docValue{margin}\textbar\docValue{swapnumber}\textbar\meta{code using \cs{NAME}, \cs{NUMBER}, and \cs{NOTE}}}
- {}
-Alias \docAuxKey{headstyle}. Within \meta{code}, the commands \docAuxCommand{NAME}, \docAuxCommand{NUMBER}, and \docAuxCommand{NOTE} correspond to the formatted parts of the theorem head.
+\begin{docKey}{spacebelow}
+ {=\meta{length}}
+ {initially \cs{topsep}}
+
\end{docKey}
\subsection{Keys added by \pkg{keytheorems}}
+\begin{docKey}{inherit-style}
+ {=\meta{style name}}
+ {initially unset}
+Inherit the keys of any style declared with \refCom{newkeytheoremstyle}.
+Additionally, the three styles predefined by \pkg{amsthm} are possible values: \docValue{plain}, \docValue{definition}, and \docValue{remark}.
+\end{docKey}
+
\begin{docKey}{noteseparator}
{=\meta{code}}
{initially \textvisiblespace}
@@ -789,13 +809,6 @@ The code inserted before the note, and printed only if there is a note. This is
For almost all theorem styles, it is recommended that you \emph{do not} change this setting.
\end{docKey}
-\begin{docKey}{inherit-style}
- {=\meta{style name}}
- {initially unset}
-Inherit the keys of any style declared with \refCom{newkeytheoremstyle}.
-Additionally, the three styles predefined by \pkg{amsthm} are possible values: \docValue{plain}, \docValue{definition}, and \docValue{remark}.
-\end{docKey}
-
\section{Restating theorems}
When a theorem is given the \refKey{store} key, the contents of the theorem are saved and written to a |.thlist| file.
@@ -868,30 +881,12 @@ For other classes, manual adjustments to \refKey{numwidth} and \refKey{indent} m
\subsection{Keys inherited from \pkg{thmtools}}
-\begin{docKey}{numwidth}
- {=\meta{length}}
- {initially |2.3em|}
-For the AMS classes, this is initially |1.5pc|.
-\end{docKey}
-
\begin{docKey}{ignore}
{=\marg{comma-list of env names}}
{initially unset}
\end{docKey}
-\begin{docKey}{show}
- {=\marg{comma-list of env names}}
- {initially all theorems}
-
-\end{docKey}
-
-\begin{docKey}{onlynamed}
- {\colOpt{=\marg{comma-list of env names}}}
- {initially unset}
-
-\end{docKey}
-
\begin{docKey}{ignoreall}
{}
{initially unset}
@@ -906,12 +901,36 @@ For the AMS classes, this is initially |1.5pc|.
\end{docKey}
+\begin{docKey}{numwidth}
+ {=\meta{length}}
+ {initially |2.3em|}
+For the AMS classes, this is initially |1.5pc|.
+\end{docKey}
+
+\begin{docKey}{onlynamed}
+ {\colOpt{=\marg{comma-list of env names}}}
+ {initially unset}
+
+\end{docKey}
+
+\begin{docKey}{show}
+ {=\marg{comma-list of env names}}
+ {initially all theorems}
+
+\end{docKey}
+
\begin{docKey}{showall}
{}
{initially set}
\end{docKey}
+\begin{docKey}{swapnumber}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+
+\end{docKey}
+
\begin{docKey}{title}
{=\meta{text}}
{initially \cs{GetTranslation}\ttbraces{keythms\string_listof\string_title}}
@@ -920,14 +939,14 @@ Currently French, German, Italian, Portuguese, and Spanish have (likely inaccura
A translation can be added with a GitHub pull request or manually with \cs{DeclareTranslation}\marg{lang}\ttbraces{keythms\string_listof\string_title}\marg{text}.
\end{docKey}
-\begin{docKey}{swapnumber}
- {\colOpt{=true\textbar false}}
- {initially |false|}
+\subsection{Keys added by \pkg{keytheorems}}
+\begin{docKey}{format-code}
+ {=\meta{code with \textup{\texttt{\#1}}, \textup{\texttt{\#2}}, and \textup{\texttt{\#3}}}}
+ {initially \cs{numberline}\texttt{\{\#2\}\#1\#3}}
+Allows full control over the format for list entries. The theorem name is |#1|, the number is |#2|, and the (formatted) note is |#3|. The note formatting is still controlled by \refKey{note-code}.
\end{docKey}
-\subsection{Keys added by \pkg{keytheorems}}
-
\begin{docKey}{indent}
{=\meta{length}}
{initially |1.5em|}
@@ -936,25 +955,23 @@ For \cls{memoir} and the AMS classes, the indent is initially |0pt|.
It is not recommended to change this unless your class has different defaults not already covered.
\end{docKey}
-\begin{docKey}{onlynumbered}
- {\colOpt{=\marg{comma-list of env names}}}
- {initially unset}
-Similar to \refKey{onlynamed}, but lists only those theorems which are numbered.
-This is useful if you'd like to exclude things like unnumbered definitions and remarks from the list of theorems.
+\begin{docKey}{no-chapter-skip}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+By default a small vertical space is inserted between each chapter's chunk of theorems.
+Setting this key to |true| removes this space.
\end{docKey}
-\begin{docKey}[][doc label=listof/seq]{seq}
- {=\meta{name}}
- {initially unset}
-Used to list only the theorems added to the custom sequence \meta{name} with the \refKey{thm/seq} theorem key.
-This is the only way to fully customize which theorems appear in the list of theorems.
-Unlike with \refKey{show}, you do not need to use \refKey{ignoreall} to prevent theorems not in \meta{name} from being printed.
+\begin{docKey}{chapter-skip-length}
+ {=\meta{dimension}}
+ {initially |10pt|}
+Controls the amount of space inserted between chunks.
\end{docKey}
-\begin{docKey}{title-code}
- {=\meta{code with \textup{\texttt{\#1}}}}
- {initially \cs{section*}\ttbraces{\#1}}
-If \cs{chapter} is defined, then initially this is instead \cs{chapter*}\ttbraces{\#1}. This key has no effect if used with an AMS class because these classes hard-code the section heading into \cs{@starttoc}.
+\begin{docKey}{no-continues}
+ {\colOpt{=true\textbar false}}
+ {initially |false|}
+Suppresses the printing of theorems given the \refKey{continues} key in the list of theorems.
\end{docKey}
\begin{docKey}{no-title}
@@ -971,12 +988,25 @@ Useful for custom ordering of the list.
\end{docKey}
+\begin{docKey}{no-toc}
+ {\colOpt{=true\textbar false}}
+ {initially false}
+With the standard classes, lists of figures/tables are not added to the table of contents by default. The same is true for \cs{listofkeytheorems}, and with those classes this key does nothing. However some classes, notably \cls{memoir} and the AMS classes, do add lists to the table of contents. With these classes, this key suppresses the addition of the list of theorems to the table of contents.
+\end{docKey}
+
\begin{docKey}{note-code}
{=\meta{code with \textup{\texttt{\#1}}}}
{initially \ttbraces{ (\#1)}}
Formats the optional note in the list of theorems.
\end{docKey}
+\begin{docKey}{onlynumbered}
+ {\colOpt{=\marg{comma-list of env names}}}
+ {initially unset}
+Similar to \refKey{onlynamed}, but lists only those theorems which are numbered.
+This is useful if you'd like to exclude things like unnumbered definitions and remarks from the list of theorems.
+\end{docKey}
+
\begin{docKey}{print-body}
{}
{initially unset}
@@ -984,29 +1014,18 @@ Instead of listing the theorem headings, the theorems are restated with their bo
Not very useful without the \refKey{store-all} load-time option.
\end{docKey}
-\begin{docKey}{no-continues}
- {\colOpt{=true\textbar false}}
- {initially |false|}
-Suppresses the printing of theorems given the \refKey{continues} key in the list of theorems.
-\end{docKey}
-
-\begin{docKey}{no-chapter-skip}
- {\colOpt{=true\textbar false}}
- {initially |false|}
-By default a small vertical space is inserted between each chapter's chunk of theorems.
-Setting this key to |true| removes this space.
-\end{docKey}
-
-\begin{docKey}{chapter-skip-length}
- {=\meta{dimension}}
- {initially |10pt|}
-Controls the amount of space inserted between chunks.
+\begin{docKey}[][doc label=listof/seq]{seq}
+ {=\meta{name}}
+ {initially unset}
+Used to list only the theorems added to the custom sequence \meta{name} with the \refKey{thm/seq} theorem key.
+This is the only way to fully customize which theorems appear in the list of theorems.
+Unlike with \refKey{show}, you do not need to use \refKey{ignoreall} to prevent theorems not in \meta{name} from being printed.
\end{docKey}
-\begin{docKey}{no-toc}
- {\colOpt{=true\textbar false}}
- {initially false}
-With the standard classes, lists of figures/tables are not added to the table of contents by default. The same is true for \cs{listofkeytheorems}, and with those classes this key does nothing. However some classes, notably \cls{memoir} and the AMS classes, do add lists to the table of contents. With these classes, this key suppresses the addition of the list of theorems to the table of contents.
+\begin{docKey}{title-code}
+ {=\meta{code with \textup{\texttt{\#1}}}}
+ {initially \cs{section*}\ttbraces{\#1}}
+If \cs{chapter} is defined, then initially this is instead \cs{chapter*}\ttbraces{\#1}. This key has no effect if used with an AMS class because these classes hard-code the section heading into \cs{@starttoc}.
\end{docKey}
\subsection{Adding code to list of theorems}
@@ -1064,9 +1083,7 @@ As in \pkg{thmtools}, the order of hooks is as follows:
The \hook{restated} hook is applied at the start of theorems retrieved with \cs{getkeytheorem}, before the \hook{prehead} hook.
This can be useful for disabling commands such as \cs{footnote} in the restated theorems, e.g.
\begin{dispListing}
-\addtotheoremhook{restated}{%
- \renewcommand\footnote[2][]{}%
- }
+\addtotheoremhook{restated}{\renewcommand\footnote[2][]{}}
\end{dispListing}
By default, \pkg{keytheorems} disables the \cs{label} and \cs{RecordProperties} commands in restated theorems.
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
index d8fb5f7b40..da648a6205 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsart-support.tex
@@ -1,7 +1,7 @@
% Maintained by Matthew Bertucci, 2024-present
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
-\ProvidesExplFile{keythms-amsart-support}{2024-09-22}{0.1.4}
+\ProvidesExplFile{keythms-amsart-support}{2024-09-30}{0.1.5}
{keytheorems~support~for~the~amsart~class}
\__keythms_support_AMSshared_code:
@@ -9,20 +9,15 @@
\IfClassLoadedTF { acmart }
{ % acmart loads amsart
\keytheoremset{overload} % since acmart predefines several theorems
- \keythms_thmstyle_setdefaultkeys:n
+ \prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
{
- spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
bodyfont = \@acmplainbodyfont,
- headindent = \@acmplainindent,
headfont = \@acmplainheadfont,
- headpunct = {.},
- postheadspace = .5em,
- numberfont = \upshape,
+ headindent = \@acmplainindent,
notefont = \@acmplainnotefont,
- notebraces = {(}{)},
- noteseparator = {~},
- headstyle = \keythms_thmstyle_headcmd_default:nnn{#1}{#2}{#3},
+ postheadspace = .5em,
+ spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
+ spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
}
\keys_define:nn { keytheorems/thmstyle }
{
@@ -35,22 +30,12 @@
notefont = \@acmdefinitionnotefont,
},
}
- % TODO: define inherit-style=acmdefinition/acmplain
}
{
- \keythms_thmstyle_setdefaultkeys:n
+ \prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
{
spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- bodyfont = \itshape,
- headindent = 0pt,
- headfont = \bfseries,
- headpunct = {.},
- postheadspace = 5pt plus 1pt minus 1pt,
- notefont = \fontseries\mddefault\upshape,
- notebraces = {(}{)},
- noteseparator = {~},
- headstyle = \keythms_thmstyle_headcmd_default:nnn{#1}{#2}{#3},
}
}
@@ -58,7 +43,7 @@
{
inherit-style / remark .meta:n =
{
- headfont = \itshape,
bodyfont = \normalfont,
+ headfont = \itshape,
}
} \ No newline at end of file
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
index 69add3f1fe..8937f2326e 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsbook-support.tex
@@ -1,25 +1,17 @@
% Maintained by Matthew Bertucci, 2024-present
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
-\ProvidesExplFile{keythms-amsbook-support}{2024-09-22}{0.1.4}
+\ProvidesExplFile{keythms-amsbook-support}{2024-09-30}{0.1.5}
{keytheorems~support~for~the~amsbook~class}
\__keythms_support_AMSshared_code:
-\keythms_thmstyle_setdefaultkeys:n
+\prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
{
+ headfont = \scshape,
+ headindent = \parindent,
spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- bodyfont = \itshape,
- headindent = \parindent,
- headfont = \scshape,
- headpunct = {.},
- postheadspace = 5pt plus 1pt minus 1pt,
- numberfont = \upshape,
- notefont = \fontseries\mddefault\upshape,
- notebraces = {(}{)},
- noteseparator = {~},
- headstyle = \keythms_thmstyle_headcmd_default:nnn{#1}{#2}{#3},
}
\keys_define:nn { keytheorems/thmstyle }
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
index d9f02caddc..07b258282b 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-amsproc-support.tex
@@ -1,25 +1,17 @@
% Maintained by Matthew Bertucci, 2024-present
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
-\ProvidesExplFile{keythms-amsproc-support}{2024-09-22}{0.1.4}
+\ProvidesExplFile{keythms-amsproc-support}{2024-09-30}{0.1.5}
{keytheorems~support~for~the~amsproc~class}
\__keythms_support_AMSshared_code:
-\keythms_thmstyle_setdefaultkeys:n
+\prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
{
+ headfont = \scshape,
+ headindent = \parindent,
spaceabove = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
spacebelow = .5\baselineskip plus .2\baselineskip minus .2\baselineskip,
- bodyfont = \itshape,
- headindent = \parindent,
- headfont = \scshape,
- headpunct = {.},
- postheadspace = 5pt plus 1pt minus 1pt,
- numberfont = \upshape,
- notefont = \fontseries\mddefault\upshape,
- notebraces = {(}{)},
- noteseparator = {~},
- headstyle = \keythms_thmstyle_headcmd_default:nnn{#1}{#2}{#3},
}
\keys_define:nn { keytheorems/thmstyle }
diff --git a/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex b/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
index 6098daa730..9b84a3ba40 100644
--- a/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
+++ b/macros/latex/contrib/keytheorems/tex/class-support/keythms-memoir-support.tex
@@ -1,7 +1,7 @@
% Maintained by Matthew Bertucci, 2024-present
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
-\ProvidesExplFile{keythms-memoir-support}{2024-09-22}{0.1.4}
+\ProvidesExplFile{keythms-memoir-support}{2024-09-30}{0.1.5}
{keytheorems~support~for~the~memoir~class}
\bool_new:N \l__keythms_support_titlecode_bool
@@ -25,9 +25,10 @@
\bool_gset_true:N \g__keythms_listof_writefile_bool
\group_begin:
\keys_set:nn { keytheorems/listof } { #1 }
- \bool_if:NT \l__keythms_listof_nochapskip_bool
+ \cs_set_protected:Npn \KeyThmsContentsLine ##1 { ##1 }
+ \bool_if:NF \l__keythms_listof_nochapskip_bool
{
- \cs_set_eq:NN \KeyThmsAddvspace \use_none:n
+ \cs_set_eq:NN \KeyThmsAddvspace \addvspace
}
\bool_if:NTF \l__keythms_listof_notitle_bool
{
diff --git a/macros/latex/contrib/keytheorems/tex/keytheorems.sty b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
index efea236427..7059d951a0 100644
--- a/macros/latex/contrib/keytheorems/tex/keytheorems.sty
+++ b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
@@ -2,7 +2,7 @@
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
\NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\ProvidesExplPackage{keytheorems}{2024-09-22}{0.1.4}{l3keys interface to amsthm}
+\ProvidesExplPackage{keytheorems}{2024-09-30}{0.1.5}{l3keys interface to amsthm}
\IfFormatAtLeastTF { 2024-06-01 } { }
{
@@ -19,11 +19,10 @@
\ProvideDocumentCommand \IfClassLoadedT { m m }
{ \IfClassLoadedTF{#1}{#2}{ } }
}
-\RequirePackage{aliascnt} % for sibling theorems
-\RequirePackage{amsthm}
-% ^ ams classes have way of ignoring this so don't need to check if they're loaded
-\RequirePackage{refcount} % for \getrefnumber
-\RequirePackage{translations} % for translating "List of Theorems"
+\RequirePackage{aliascnt}
+\RequirePackage{amsthm} % ams classes have way of ignoring this
+\RequirePackage{refcount}
+\RequirePackage{translations}
%%%%%%%%%%%%%%%%%%%%%%
%%% Error Messages %%%
@@ -129,6 +128,7 @@
\clist_new:N \l__keythms_thmstyle_savedkeys_clist
\iow_new:N \g__keythms_listof_stream
\prop_new:N \g__keythms_thmnames_prop
+\prop_new:N \g__keythms_thmstyle_defaultkeys_prop
\prop_new:N \g__keythms_thmuse_othercounters_prop
\prop_new:N \l__keythms_restate_counters_prop
\tl_new:N \l__keythms_thm_currentthmstyle_tl
@@ -155,25 +155,24 @@
\cs_gset:Npn \thekeythms_unnumbered_dummyctr { }
\cs_generate_variant:Nn \hook_gput_code:nnn { nnV }
-\cs_generate_variant:Nn \keys_precompile:nnN { nv, nVc }
+\cs_generate_variant:Nn \keys_precompile:nnN { nv, nVc, nnc, ne }
%%%%%%%%%%%%%%
%%% Styles %%%
%%%%%%%%%%%%%%
-% \__keythms_thmstyle_setbraces:nn { <left brace> } { <right brace> }
\cs_new_protected:Npn \__keythms_thmstyle_setbraces:nn #1#2
- {
+ { % #1 = left brace, #2 = right brace
\tl_set:Nn \l__keythms_thmstyle_lnotebrace_tl { #1 }
\tl_set:Nn \l__keythms_thmstyle_rnotebrace_tl { #2 }
}
\cs_new_protected:Npn \keythms_thmstyle_savethmkey_reqval:n #1
- {
+ { % #1 = key value
\clist_put_right:No \l__keythms_thmstyle_savedkeys_clist
{ \l_keys_key_str = { #1 } }
}
\cs_new_protected:Npn \keythms_thmstyle_savethmkey_optval:n #1
- {
+ { % #1 = key value
\tl_if_empty:NTF \l_keys_value_tl
{
\clist_put_right:No \l__keythms_thmstyle_savedkeys_clist
@@ -187,19 +186,13 @@
\keys_define:nn { keytheorems/thmstyle }
{
- spaceabove .tl_set:N = \l__keythms_thmstyle_spaceabove_tl,
- spacebelow .tl_set:N = \l__keythms_thmstyle_spacebelow_tl,
bodyfont .tl_set:N = \l__keythms_thmstyle_bodyfont_tl,
- headindent .tl_set:N = \l__keythms_thmstyle_headindent_tl,
- headfont .tl_set:N = \l__keythms_thmstyle_headfont_tl,
- headpunct .tl_set:N = \l__keythms_thmstyle_headpunct_tl,
- postheadspace .tl_set:N = \l__keythms_thmstyle_postheadspace_tl,
break .meta:n = { postheadspace = \newline }, % add error if postheadspace set
break .value_forbidden:n = true,
- numberfont .tl_set:N = \l__keythms_thmstyle_numberfont_tl,
- notefont .tl_set:N = \l__keythms_thmstyle_notefont_tl,
- notebraces .code:n = \exp_after:wN \__keythms_thmstyle_setbraces:nn #1,
- noteseparator .tl_set:N = \l__keythms_thmstyle_noteseparator_tl,
+ headfont .tl_set:N = \l__keythms_thmstyle_headfont_tl,
+ headformat .meta:n = { headstyle = #1 },
+ headindent .tl_set:N = \l__keythms_thmstyle_headindent_tl,
+ headpunct .tl_set:N = \l__keythms_thmstyle_headpunct_tl,
headstyle .choice:,
headstyle / margin .code:n =
{
@@ -211,62 +204,44 @@
\cs_set:Nn \keythms_thmstyle_headcmd:nnn { \NUMBER\ \NAME\NOTE }
},
headstyle / unknown .cs_set:Np = \keythms_thmstyle_headcmd:nnn #1#2#3,
- headformat .meta:n = { headstyle = #1 },
inherit-style .choice:,
inherit-style / plain .meta:n = {},
inherit-style / definition .meta:n = { bodyfont = \normalfont },
inherit-style / remark .meta:n =
{
- headfont = \itshape,
- bodyfont = \normalfont,
+ bodyfont = \normalfont,
+ headfont = \itshape,
spaceabove = 0.5\topsep,
spacebelow = 0.5\topsep,
},
+ notebraces .code:n = \exp_after:wN \__keythms_thmstyle_setbraces:nn #1,
+ notefont .tl_set:N = \l__keythms_thmstyle_notefont_tl,
+ noteseparator .tl_set:N = \l__keythms_thmstyle_noteseparator_tl,
+ numberfont .tl_set:N = \l__keythms_thmstyle_numberfont_tl,
+ postheadspace .tl_set:N = \l__keythms_thmstyle_postheadspace_tl,
+ spaceabove .tl_set:N = \l__keythms_thmstyle_spaceabove_tl,
+ spacebelow .tl_set:N = \l__keythms_thmstyle_spacebelow_tl,
% thm keys that are saved for later
numbered .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
- parent .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- numberwithin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- within .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- sibling .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
numberlike .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- sharenumber .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- preheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ numberwithin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ parent .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ postfoothook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
postheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
prefoothook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- postfoothook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ preheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
qed .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
+ sharenumber .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ sibling .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
tcolorbox .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
tcolorbox-no-titlebar .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
+ within .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
}
\cs_new_protected:Nn \keythms_thmstyle_thmname:n { \thmname{#1} }
\cs_new_protected:Nn \keythms_thmstyle_thmnumber:n { \thmnumber{#1} }
\cs_new_protected:Nn \keythms_thmstyle_thmnote:n { \thmnote{#1} }
-%% NOTE: if these are used, user is in charge of spacing with \NAME and \NUMBER
-%% QUESTION: should these be moved into def of \newkeytheoremstyle?
-\cs_new:Npn \NAME { \keythms_thmstyle_thmname:n { ##1 } }
-\cs_new:Npn \NUMBER
- {
- \keythms_thmstyle_thmnumber:n
- {
- \group_begin:
- \exp_not:V \l__keythms_thmstyle_numberfont_tl
- ##2
- \group_end:
- }
- }
-\cs_new:Npn \NOTE
- {
- \keythms_thmstyle_thmnote:n
- { \exp_not:V \l__keythms_thmstyle_noteseparator_tl
- \group_begin: % group so notefont doesn't affect headpunct
- \exp_not:V \l__keythms_thmstyle_notefont_tl
- \l__keythms_thmstyle_lnotebrace_tl ##3 \l__keythms_thmstyle_rnotebrace_tl
- \group_end:
- }
- }
-
\cs_new:Npn \keythms_thmstyle_headcmd_default:nnn #1#2#3
{
\keythms_thmstyle_thmname:n { #1 }
@@ -286,26 +261,26 @@
}
}
-\cs_new_protected:Npn \keythms_thmstyle_setdefaultkeys:n #1
- {
- \keys_precompile:nnN { keytheorems/thmstyle }
- { #1 }
- \l__keythms_thmstyle_defaultkeys_tl
- }
-\keythms_thmstyle_setdefaultkeys:n
+\prop_gset_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
{ % support files may overwrite these defaults
- spaceabove = \topsep,
- spacebelow = \topsep,
bodyfont = \itshape,
- headindent = 0pt,
headfont = \bfseries,
+ headindent = 0pt,
headpunct = {.},
- postheadspace = 5pt plus 1pt minus 1pt,
- numberfont = \upshape,
- notefont = \fontseries\mddefault\upshape,
+ headstyle = \keythms_thmstyle_headcmd_default:nnn{#1}{#2}{#3},
notebraces = {(}{)},
+ notefont = \fontseries\mddefault\upshape,
noteseparator = {~},
- headstyle = \keythms_thmstyle_headcmd_default:nnn{#1}{#2}{#3},
+ numberfont = \upshape,
+ postheadspace = 5pt plus 1pt minus 1pt,
+ spaceabove = \topsep,
+ spacebelow = \topsep,
+ }
+\hook_gput_code:nnn { package/keytheorems/after } { . }
+ { % need to defer to wait for support files
+ \keys_precompile:neN { keytheorems/thmstyle }
+ { \prop_to_keyval:N \g__keythms_thmstyle_defaultkeys_prop }
+ \l__keythms_thmstyle_defaultkeys_tl
}
\NewDocumentCommand \newkeytheoremstyle { m m }
@@ -338,8 +313,31 @@
\cs_new_eq:NN \keythms_thmstyle_new:nnnnnnnnn \newtheoremstyle
\cs_generate_variant:Nn \keythms_thmstyle_new:nnnnnnnnn { nVVVVVVVe }
+\tl_put_right:Nn \l_text_expand_exclude_tl { \thmnote \thmnumber \thmname }
+% ^ allows \thmnote, etc. to work in headstyle; hope no bad side effects!
\cs_new_protected:Npn \keythms_thmstyle_declarestyle:nn #1#2
- {
+ { % user is in charge of spacing with \NAME and \NUMBER (thmtools compat...)
+ \cs_set:Npn \NAME { \keythms_thmstyle_thmname:n { ####1 } }
+ \cs_set:Npn \NUMBER
+ {
+ \keythms_thmstyle_thmnumber:n
+ {
+ \group_begin:
+ \exp_not:V \l__keythms_thmstyle_numberfont_tl
+ ####2
+ \group_end:
+ }
+ }
+ \cs_set:Npn \NOTE
+ {
+ \keythms_thmstyle_thmnote:n
+ { \exp_not:V \l__keythms_thmstyle_noteseparator_tl
+ \group_begin: % group so notefont doesn't affect headpunct
+ \exp_not:V \l__keythms_thmstyle_notefont_tl
+ \l__keythms_thmstyle_lnotebrace_tl ####3 \l__keythms_thmstyle_rnotebrace_tl
+ \group_end:
+ }
+ }
\clist_clear:N \l__keythms_thmstyle_savedkeys_clist
\tl_use:N \l__keythms_thmstyle_defaultkeys_tl
\keys_set:nn { keytheorems/thmstyle } { #2 }
@@ -352,14 +350,21 @@
\l__keythms_thmstyle_headpunct_tl
\l__keythms_thmstyle_postheadspace_tl
{ \text_expand:n { \keythms_thmstyle_headcmd:nnn{##1}{##2}{##3} } }
- % Define new inherit-style key
- \keys_define:nn { keytheorems/thmstyle }
- { inherit-style / #1 .meta:n = { #2 } }
- \tl_if_exist:cF { l__keythms_thmstyle_ #1 _savedkeys_tl }
- { \tl_new:c { l__keythms_thmstyle_ #1 _savedkeys_tl } }
+ % Define inherit-style key
+ \tl_if_exist:cF { l__keythms_thmstyle_ #1 _metakeys_tl }
+ { \tl_new:c { l__keythms_thmstyle_ #1 _metakeys_tl } }
+ \keys_precompile:nnc { keytheorems/thmstyle } { #2 } % use precompile instead of meta key
+ { l__keythms_thmstyle_ #1 _metakeys_tl } % because that's sensitive to hashes
+ \keys_define:nn { keytheorems/thmstyle } % and we want to allow both # and ##
+ { inherit-style / #1 .code:n = \tl_use:c { l__keythms_thmstyle_ #1 _metakeys_tl } }
+ \tl_if_exist:cF { l__keythms_thmstyle_ #1 _savedthmkeys_tl }
+ { \tl_new:c { l__keythms_thmstyle_ #1 _savedthmkeys_tl } }
\keys_precompile:nVc { keytheorems/thm }
\l__keythms_thmstyle_savedkeys_clist
- { l__keythms_thmstyle_ #1 _savedkeys_tl }
+ { l__keythms_thmstyle_ #1 _savedthmkeys_tl }
+ \cs_undefine:N \NAME % undefine to prevent conflicts
+ \cs_undefine:N \NUMBER
+ \cs_undefine:N \NOTE
}
%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -367,10 +372,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%
% FIX: reimplement these without \NewDocumentCommand and \SplitArgument
-
-% \keythms_thm_setrefnames:n { <envname> } { <refname> or <sing,plural> }
\NewDocumentCommand \keythms_thm_setrefnames:nn
- { m >{\SplitArgument{1}{,}} m }
+ { m >{\SplitArgument{1}{,}} m } % #1 = envname, #2 = <refname> or <sing,plural>
{ \__keythms_thm_setrefnames_aux:nnn{#1}#2 }
\cs_new_protected:Npn \__keythms_thm_setrefnames_aux:nnn #1#2#3
{
@@ -384,9 +387,8 @@
}
\cs_generate_variant:Nn \keythms_thm_setrefnames:nn { nV }
-% \keythms_thm_setRefnames:n { <envname> } { <refname> or <sing,plural> }
\NewDocumentCommand \keythms_thm_setRefnames:nn
- { m >{\SplitArgument{1}{,}} m }
+ { m >{\SplitArgument{1}{,}} m } % #1 = envname, #2 = <refname> or <sing,plural>
{ \__keythms_thm_setRefnames_aux:nnn{#1}#2 }
\cs_new_protected:Npn \__keythms_thm_setRefnames_aux:nnn #1#2#3
{
@@ -402,37 +404,35 @@
\keys_define:nn { keytheorems/thm }
{
- name .tl_set:N = \l__keythms_thm_name_tl,
- title .meta:n = { name = #1 },
heading .meta:n = { name = #1 },
- refname .tl_set:N = \l__keythms_thm_refname_tl,
- Refname .tl_set:N = \l__keythms_thm_Refname_tl,
+ name .tl_set:N = \l__keythms_thm_name_tl,
numbered .choice:,
- numbered / true .code:n = \bool_set_true:N \l__keythms_thm_numbered_bool,
+ numbered .default:n = true,
numbered / false .code:n = \bool_set_false:N \l__keythms_thm_numbered_bool,
- numbered / yes .meta:n = { numbered = true },
- numbered / no .meta:n = { numbered = false },
+ numbered / no .meta:n = { numbered = false },
+ numbered / true .code:n = \bool_set_true:N \l__keythms_thm_numbered_bool,
numbered / unless-unique .code:n =
{
\bool_set_true:N \l__keythms_thm_unlessunique_bool
},
numbered / unless~unique .meta:n = { numbered = unless-unique },
- numbered .default:n = true,
- parent .tl_set:N = \l__keythms_thm_parent_tl,
- numberwithin .meta:n = { parent = #1 },
- within .meta:n = { parent = #1 },
- sibling .tl_set:N = \l__keythms_thm_sibling_tl,
+ numbered / yes .meta:n = { numbered = true },
numberlike .meta:n = { sibling = #1 },
- sharenumber .meta:n = { sibling = #1 },
- style .tl_set:N = \l__keythms_thm_style_tl,
- style .groups:n = { style-comes-first },
- preheadhook .tl_set:N = \l__keythms_thm_preheadhook_tl,
+ numberwithin .meta:n = { parent = #1 },
+ parent .tl_set:N = \l__keythms_thm_parent_tl,
+ postfoothook .tl_set:N = \l__keythms_thm_postfoothook_tl,
postheadhook .tl_set:N = \l__keythms_thm_postheadhook_tl,
prefoothook .tl_set:N = \l__keythms_thm_prefoothook_tl,
- postfoothook .tl_set:N = \l__keythms_thm_postfoothook_tl,
+ preheadhook .tl_set:N = \l__keythms_thm_preheadhook_tl,
qed .tl_set:N = \l__keythms_thm_qed_tl,
qed .default:n = \c_novalue_tl,
% ^ distinguish between 'qed' and 'qed={}'
+ refname .tl_set:N = \l__keythms_thm_refname_tl,
+ Refname .tl_set:N = \l__keythms_thm_Refname_tl,
+ sharenumber .meta:n = { sibling = #1 },
+ sibling .tl_set:N = \l__keythms_thm_sibling_tl,
+ style .tl_set:N = \l__keythms_thm_style_tl,
+ style .groups:n = { style-comes-first },
tcolorbox .tl_set:N = \l__keythms_thm_tcbkeys_tl,
tcolorbox .default:n = {},
tcolorbox-no-titlebar .meta:n =
@@ -448,6 +448,8 @@
}
},
tcolorbox-no-titlebar .default:n = {},
+ title .meta:n = { name = #1 },
+ within .meta:n = { parent = #1 },
}
% what below is unnecessary? I really don't understand this code.
@@ -470,17 +472,17 @@
\keys_precompile:nnN { keytheorems/thm }
{
name = \q_no_value,
- refname = \q_no_value,
- Refname = \q_no_value,
numbered = true,
parent = {},
- sibling = {},
- style = {},
- preheadhook = {},
+ postfoothook = {},
postheadhook = {},
prefoothook = {},
- postfoothook = {},
+ preheadhook = {},
qed = \q_no_value,
+ refname = \q_no_value,
+ Refname = \q_no_value,
+ sibling = {},
+ style = {},
tcolorbox = \q_no_value,
}
\l__keythms_thm_defaultkeys_tl
@@ -497,23 +499,20 @@
% Make generic theorem hooks
\__keythms_thm_makethmhooks:n { allthms }
-% \newkeytheorem{<name>}{<keys>}
\NewDocumentCommand \newkeytheorem { m O{} }
- {
+ { % #1 = name, #2 = keys
\clist_map_inline:nn { #1 } % define multiple theorems at once
{ \keythms_thm_newkeythm:nn { ##1 } { #2 } }
}
-
\@onlypreamble \newkeytheorem
% to prevent error when plain, remark, or definition style used
-\tl_new:N \l__keythms_thmstyle_plain_savedkeys_tl
-\tl_new:N \l__keythms_thmstyle_remark_savedkeys_tl
-\tl_new:N \l__keythms_thmstyle_definition_savedkeys_tl
+\tl_new:N \l__keythms_thmstyle_plain_savedthmkeys_tl
+\tl_new:N \l__keythms_thmstyle_remark_savedthmkeys_tl
+\tl_new:N \l__keythms_thmstyle_definition_savedthmkeys_tl
-% \keythms_thm_newkeythm:nn { <envname> } { <keys> }
\cs_new_protected:Npn \keythms_thm_newkeythm:nn #1#2
- {
+ { % #1 = name, #2 = keys
% Store envname
\tl_set:Nn \l__keythms_thm_envname_tl { #1 }
% Make unless-unique false by default (can't precompile this)
@@ -526,16 +525,16 @@
\tl_set:Ne \l__keythms_thm_currentthmstyle_tl { \the\thm@style }
\tl_if_empty:NTF \l__keythms_thm_style_tl
{ % if \theoremstyle set, also use saved thm keys
- \tl_if_exist:cT {l__keythms_thmstyle_ \l__keythms_thm_currentthmstyle_tl _savedkeys_tl}
- { \tl_use:c {l__keythms_thmstyle_ \l__keythms_thm_currentthmstyle_tl _savedkeys_tl} }
+ \tl_if_exist:cT {l__keythms_thmstyle_ \l__keythms_thm_currentthmstyle_tl _savedthmkeys_tl}
+ { \tl_use:c {l__keythms_thmstyle_ \l__keythms_thm_currentthmstyle_tl _savedthmkeys_tl} }
}
{
% Temporarily set theorem style
\__keythms_theoremstyle:n { \l__keythms_thm_style_tl }
% If thm keys given in style, call now (possibly overwritten in next step)
% but don't error if user uses a style defined with just \newtheoremstyle
- \tl_if_exist:cT { l__keythms_thmstyle_ \l__keythms_thm_style_tl _savedkeys_tl }
- { \tl_use:c { l__keythms_thmstyle_ \l__keythms_thm_style_tl _savedkeys_tl } }
+ \tl_if_exist:cT { l__keythms_thmstyle_ \l__keythms_thm_style_tl _savedthmkeys_tl }
+ { \tl_use:c { l__keythms_thmstyle_ \l__keythms_thm_style_tl _savedthmkeys_tl } }
}
% Set env-specific keys
\keys_set:nn { keytheorems/thm } { #2 }
@@ -567,7 +566,7 @@
\quark_if_no_value:NT \l__keythms_thm_name_tl % use quark so name={} is valid
{
% use e so \text_titlecase called only once per theorem definition,
- % not each time the theorem is used
+ % not each time the theorem is used
\tl_set:Ne \l__keythms_thm_name_tl
{ \text_titlecase_first:n { #1 } }
}
@@ -670,9 +669,7 @@
\__keythms_listof_show_aux:n { #1 }
% Set theorem style back to original state if needed
\tl_if_empty:NF \l__keythms_thm_style_tl
- {
- \__keythms_theoremstyle:V \l__keythms_thm_currentthmstyle_tl
- }
+ { \__keythms_theoremstyle:V \l__keythms_thm_currentthmstyle_tl }
}
\cs_new_protected:Npn \__keythms_thm_tcboxcode:nn #1#2
@@ -741,7 +738,6 @@
\cs_new_eq:NN \__keythms_theoremstyle:n \theoremstyle
\cs_generate_variant:Nn \__keythms_theoremstyle:n { V }
-% \newtheorem variants
\cs_new_eq:NN \__keythms_thm_new:w \newtheorem
\cs_new_protected:Npn \__keythms_thm_new_numbered:nn #1#2
@@ -820,13 +816,6 @@
\keys_define:nn { keytheorems/thmuse }
{
- label .tl_set:N = \l__keythms_thmuse_label_tl,
- note .tl_set:N = \l__keythms_thmuse_note_tl,
- note .initial:n = {},
- name .meta:n = { note = #1 },
- % ^ for compatibility. "name" is ambiguous and doesn't match amsthm language
- short-note .code:n = {}, % these do nothing at point of use
- short-name .code:n = {},
continues .tl_set:N = \l__keythms_thmuse_contlabel_tl,
continues* .code:n =
{
@@ -838,17 +827,23 @@
{ note = \l__keythms_tmpa_tl }
}
},
- store .tl_set:N = \l__keythms_thmuse_store_tl, % should this be .tl_set_e:N ?
- %store .default:n = \q_no_value, % ={name} causes issues
- restate .meta:n = { store = #1 }, % thmtools compatibility
- store* .tl_set:N = \l__keythms_thmuse_storereversed_tl,
- restate* .meta:n = { store* = #1 },
- restate-keys .clist_set:N = \l__keythms_thmuse_restatekeys_clist,
- listhack .choice:, % need equals sign
+ label .tl_set:N = \l__keythms_thmuse_label_tl,
+ listhack .choice:, % needs equals sign
listhack / true .code:n = \bool_set_true:N \l__keythms_thmuse_listhack_bool,
listhack / false .code:n = \bool_set_false:N \l__keythms_thmuse_listhack_bool,
listhack .initial:n = false,
+ name .meta:n = { note = #1 },
+ % ^ for compatibility. "name" is ambiguous and doesn't match amsthm language
+ note .tl_set:N = \l__keythms_thmuse_note_tl,
+ note .initial:n = {},
+ restate .meta:n = { store = #1 }, % thmtools compatibility
+ restate* .meta:n = { store* = #1 },
+ restate-keys .clist_set:N = \l__keythms_thmuse_restatekeys_clist,
seq .code:n = {},
+ short-note .code:n = {}, % these do nothing at point of use
+ short-name .code:n = {},
+ store .tl_set:N = \l__keythms_thmuse_store_tl, % should this be .tl_set_e:N ?
+ store* .tl_set:N = \l__keythms_thmuse_storereversed_tl,
}
\cs_new_protected:Npn \keythms_keyify_theorem:n #1
@@ -1147,6 +1142,7 @@
{ \exp_not:n { #3 } }
}
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Retrieving Theorem Data %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1157,14 +1153,15 @@
\keys_define:nn { keytheorems/storeatbegin }
{
- store .tl_set:N = \l__keythms_storeatbegin_store_tl,
restate .meta:n = { store=#1 },
- store* .tl_set:N = \l__keythms_storeatbegin_storereversed_tl,
restate* .meta:n = { store*=#1 },
+ store .tl_set:N = \l__keythms_storeatbegin_store_tl,
+ store* .tl_set:N = \l__keythms_storeatbegin_storereversed_tl,
unknown .code:n = { } % do nothing with unknown keys
}
-\cs_new_protected:Npn \KeyThmsContentsLine #1 { #1 }
+\cs_new_protected:Npn \KeyThmsContentsLine #1 { }
+% ^ initially a no-op, redefined where needed; important it's protected!
\NewDocumentCommand \addtheoremcontentsline { m m }
{
\addtocontents { thlist }
@@ -1187,8 +1184,6 @@
\hook_gput_code:nnn { begindocument } { . }
{
\group_begin:
- \cs_set_eq:NN \KeyThmsContentsLine \use_none:n
- \cs_set_eq:NN \KeyThmsAddvspace \use_none:n
\cs_set_protected:Npn \KeyThmsSavedTheorem #1#2#3#4#5#6#7
{
\group_begin:
@@ -1378,9 +1373,8 @@
\group_end:
}
-% \getkeytheorem[<property>]{<tag>}
\NewDocumentCommand \getkeytheorem { O{theorem} m }
- {
+ { % #1 = property, #2 = tag
\cs_if_exist:cTF { __keythms_getthm_#2_#1 }
{
\bool_if_exist:cTF { g__keythms_restate_#2_called_bool }
@@ -1414,9 +1408,8 @@
%%% Theorem Hooks %%%
%%%%%%%%%%%%%%%%%%%%%
-%%% \addtotheoremhook[<envname>]{<hook>}{<code>}
\NewDocumentCommand \addtotheoremhook { O{allthms} m +m }
- {
+ { % #1 = envname, #2 = hook, #3 = code
\__hook_if_declared:nTF { keytheorems/allthms/#2 }
{
\hook_gput_code:nnn { keytheorems/#1/#2 } { . } { #3 }
@@ -1425,7 +1418,6 @@
\msg_error:nnn { keytheorems } { undefined-thm-hook } { #2 }
}
}
-
% NOTE: I think it's OK we use the internal \__hook_if_declared:nTF above
% since we don't need to worry about the user creating new theorem hooks
% so, as we're only checking the existence of hooks created by us, it's OK.
@@ -1436,56 +1428,50 @@
\keys_define:nn { keytheorems/listof }
{
- numwidth .dim_set:N = \l__keythms_listof_numwidth_dim,
- numwidth .initial:n = 2.3em,
- indent .dim_set:N = \l__keythms_listof_indent_dim,
- indent .initial:n = 1.5em,
- ignore .code:n =
+ chapter-skip-length .dim_set:N = \keythms@listof@chaptervspace@dim,
+ chapter-skip-length .initial:n = 10pt,
+ format-code .cs_set:Np = \__keythms_listof_misdirect:nnn #1#2#3,
+ format-code .initial:n = \numberline{#2}#1#3,
+ ignore .code:n =
{
\hook_gput_code:nnn { begindocument/before } { keytheorems }
{ \keythms_listof_ignore:n { #1 } }
},
- show .code:n =
- {
+ ignoreall .code:n =
+ { % in case called before theorem defined
\hook_gput_code:nnn { begindocument/before } { keytheorems }
- { \keythms_listof_show:n { #1 } }
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_ignore_aux:n { ##1 } }
+ }
},
- onlynamed .code:n =
+ indent .dim_set:N = \l__keythms_listof_indent_dim,
+ indent .initial:n = 1.5em,
+ no-chapter-skip .bool_set:N = \l__keythms_listof_nochapskip_bool,
+ no-chapter-skip .initial:n = false,
+ no-continues .bool_set:N = \l__keythms_listof_nocont_bool,
+ no-continues .initial:n = false,
+ no-title .bool_set:N = \l__keythms_listof_notitle_bool,
+ no-title .initial:n = false,
+ no-toc .bool_set:N = \l__keythms_listof_notoc_bool,
+ no-toc .initial:n = false, % false does not mean "to-toc" for standard classes
+ note-code .cs_set:Np = \__keythms_listof_notecmd:n #1,
+ note-code .initial:n = { ~ (#1) },
+ numwidth .dim_set:N = \l__keythms_listof_numwidth_dim,
+ numwidth .initial:n = 2.3em,
+ onlynamed .code:n =
{
\hook_gput_code:nnn { begindocument/before } { keytheorems }
{ \keythms_listof_onlynamed:n { #1 } }
},
- onlynamed .default:n = \q_no_value,
- onlynumbered .code:n =
+ onlynamed .default:n = \q_no_value,
+ onlynumbered .code:n =
{
\hook_gput_code:nnn { begindocument/before } { keytheorems }
{ \keythms_listof_onlynumbered:n { #1 } }
},
- onlynumbered .default:n = \q_no_value,
- ignoreall .code:n =
- {
- \hook_gput_code:nnn { begindocument/before } { keytheorems } % in case called before theorem defined
- {
- \prop_map_inline:Nn \g__keythms_thmnames_prop
- { \__keythms_listof_ignore_aux:n { ##1 } }
- }
- },
- showall .code:n =
- {
- \hook_gput_code:nnn { begindocument/before } { keytheorems } % in case called before theorem defined
- {
- \prop_map_inline:Nn \g__keythms_thmnames_prop
- { \__keythms_listof_show_aux:n { ##1 } }
- }
- },
- title .tl_set:N = \l__keythms_listof_title_tl,
- title .initial:n = \GetTranslation{keythms_listof_title},
- swapnumber .bool_set:N = \l__keythms_listof_swapnumber_bool,
- swapnumber .initial:n = false,
- title-code .cs_set:Np = \__keythms_listof_titlecmd:n #1,
- no-title .bool_set:N = \l__keythms_listof_notitle_bool,
- no-title .initial:n = false,
- print-body .code:n =
+ onlynumbered .default:n = \q_no_value,
+ print-body .code:n =
{
\cs_set_protected:Nn \keythms_listof_listcmd:nnnnnnn
{
@@ -1495,43 +1481,53 @@
{##1}{##2}{##5}{##6}{##7}
}
}
- \cs_set_eq:NN \KeyThmsContentsLine \use_none:n
- % ^ I assume we want this?
- \cs_set_eq:NN \KeyThmsAddvspace \use_none:n
},
- note-code .cs_set:Np = \__keythms_listof_notecmd:n #1,
- note-code .initial:n = { ~ (#1) },
- no-continues .bool_set:N = \l__keythms_listof_nocont_bool,
- no-continues .initial:n = false,
- no-chapter-skip .bool_set:N = \l__keythms_listof_nochapskip_bool,
- no-chapter-skip .initial:n = false,
- chapter-skip-length .dim_set:N = \keythms@listof@chaptervspace@dim,
- chapter-skip-length .initial:n = 10pt,
- no-toc .bool_set:N = \l__keythms_listof_notoc_bool,
- no-toc .initial:n = false, % false does not mean "to-toc" for standard classes
+ seq .code:n =
+ {
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ { \keythms_listof_showseq:n { #1 } }
+ },
+ show .code:n =
+ {
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ { \keythms_listof_show:n { #1 } }
+ },
+ showall .code:n =
+ { % in case called before theorem defined
+ \hook_gput_code:nnn { begindocument/before } { keytheorems }
+ {
+ \prop_map_inline:Nn \g__keythms_thmnames_prop
+ { \__keythms_listof_show_aux:n { ##1 } }
+ }
+ },
+ swapnumber .bool_set:N = \l__keythms_listof_swapnumber_bool,
+ swapnumber .initial:n = false,
+ title .tl_set:N = \l__keythms_listof_title_tl,
+ title .initial:n = \GetTranslation{keythms_listof_title},
+ title-code .cs_set:Np = \__keythms_listof_titlecmd:n #1,
}
-\hook_gput_code:nnn { begindocument } { . } % redefine these keys at begindocument
- {
+\hook_gput_code:nnn { begindocument } { . }
+ { % redefine these keys at begindocument
\keys_define:nn { keytheorems/listof }
{
- ignore .code:n = \keythms_listof_ignore:n { #1 },
- show .code:n = \keythms_listof_show:n { #1 },
- onlynamed .code:n = \keythms_listof_onlynamed:n { #1 },
- onlynamed .default:n = \q_no_value,
- onlynumbered .code:n = \keythms_listof_onlynumbered:n { #1 },
- onlynumbered .default:n = \q_no_value,
- ignoreall .code:n =
+ ignore .code:n = \keythms_listof_ignore:n { #1 },
+ ignoreall .code:n =
{
\prop_map_inline:Nn \g__keythms_thmnames_prop
{ \__keythms_listof_ignore_aux:n { ##1 } }
},
- showall .code:n =
+ onlynamed .code:n = \keythms_listof_onlynamed:n { #1 },
+ onlynamed .default:n = \q_no_value,
+ onlynumbered .code:n = \keythms_listof_onlynumbered:n { #1 },
+ onlynumbered .default:n = \q_no_value,
+ seq .code:n = \keythms_listof_showseq:n { #1 },
+ show .code:n = \keythms_listof_show:n { #1 },
+ showall .code:n =
{
\prop_map_inline:Nn \g__keythms_thmnames_prop
{ \__keythms_listof_show_aux:n { ##1 } }
},
- seq .code:n = \keythms_listof_showseq:n { #1 },
}
}
@@ -1640,18 +1636,14 @@
}
}
-% Seems unnecessary to repeat all this for reading the keyvals from seq.
+% Seems unnecessary to repeat all this for reading the keyvals from file.
% In thmtools they just hook the "thmitem" definition into the theorem declaration.
%% NOTE ON ABOVE: this gives more flexibility to define different kinds of lists.
%% See acro.sty for template idea.
\keys_define:nn { keytheorems/listofheading }
{
- note .tl_set:N = \l__keythms_listofheading_note_tl,
- name .meta:n = { note = #1 },
- short-note .tl_set:N = \l__keythms_listofheading_shortnote_tl,
- short-name .meta:n = { short-note = #1 },
- continues .tl_set:N = \l__keythms_listofheading_contlabel_tl,
- continues* .code:n =
+ continues .tl_set:N = \l__keythms_listofheading_contlabel_tl,
+ continues* .code:n =
{
\keys_set:nn { keytheorems/listofheading } { continues = #1 }
\protected@edef \l__keythms_tmpa_tl { \__keythms_getrecordednote:n{#1} }
@@ -1661,16 +1653,21 @@
{ note = \l__keythms_tmpa_tl }
}
},
- seq .tl_set:N = \l__keythms_listofheading_seq_tl,
- store* .code:n = \bool_set_true:N \l__keythms_listofheading_storereversed_bool,
- restate* .meta:n = { store*=#1 },
+ name .meta:n = { note = #1 },
+ note .tl_set:N = \l__keythms_listofheading_note_tl,
+ restate* .meta:n = { store*=#1 },
restate-keys .clist_set:N = \l__keythms_listofheading_restatekeys_clist,
- unknown .code:n = { } % do nothing with unknown keys
- % ^ this is OK because we have total control over possible keys; if invalid
- % key is given to theorem then an error will be raised there
+ seq .tl_set:N = \l__keythms_listofheading_seq_tl,
+ short-note .tl_set:N = \l__keythms_listofheading_shortnote_tl,
+ short-name .meta:n = { short-note = #1 },
+ store* .code:n =
+ {
+ \bool_set_true:N \l__keythms_listofheading_storereversed_bool
+ },
+ unknown .code:n = { } % do nothing with unknown keys
}
-\cs_new:Npn \__keythms_listof_printheading:
+\cs_new:Npn \__keythms_listof_printnote:
{
\tl_if_empty:NTF \l__keythms_listofheading_shortnote_tl
{
@@ -1682,19 +1679,14 @@
}
}
-\cs_new:Npn \__keythms_listof_default_listcmd:nnnnnnn #1#2#3#4#5#6#7
- {
+\cs_new:Npn \keythms_listof_listcmd:nnnnnnn #1#2#3#4#5#6#7
+ { % #1=name, #2=number, #3=Href, #4=page, #5=restate counters, #6=keys, #7=body
\contentsline{ #1 }
{
- \bool_if:NTF \l__keythms_listof_swapnumber_bool
- {
- \prop_item:Nn \g__keythms_thmnames_prop { #1 } ~ #2
- }
- {
- \numberline{ #2 }
- \prop_item:Nn \g__keythms_thmnames_prop { #1 }
- }
- \__keythms_listof_printheading:
+ \__keythms_listof_misdirect:nnn
+ { \prop_item:Nn \g__keythms_thmnames_prop { #1 } }
+ { #2 }
+ { \__keythms_listof_printnote: }
}
{ #4 }{ #3 }
}
@@ -1728,10 +1720,6 @@
\group_end:
}
-% set default listcmd
-\cs_new_eq:NN \keythms_listof_listcmd:nnnnnnn
- \__keythms_listof_default_listcmd:nnnnnnn
-
\cs_if_exist:NTF \chapter
{ \cs_set_protected:Npn \__keythms_listof_titlecmd:n #1 { \chapter*{#1} } }
{ \cs_set_protected:Npn \__keythms_listof_titlecmd:n #1 { \section*{#1} } }
@@ -1748,9 +1736,10 @@
\bool_gset_true:N \g__keythms_listof_writefile_bool
\group_begin:
\keys_set:nn { keytheorems/listof } { #1 }
- \bool_if:NT \l__keythms_listof_nochapskip_bool
+ \cs_set_protected:Npn \KeyThmsContentsLine ##1 { ##1 }
+ \bool_if:NF \l__keythms_listof_nochapskip_bool
{
- \cs_set_eq:NN \KeyThmsAddvspace \use_none:n
+ \cs_set_eq:NN \KeyThmsAddvspace \addvspace
}
\bool_if:NF \l__keythms_listof_notitle_bool
{
@@ -1759,6 +1748,10 @@
{ \MakeUppercase \l__keythms_listof_title_tl }
{ \MakeUppercase \l__keythms_listof_title_tl }
}
+ \bool_if:NT \l__keythms_listof_swapnumber_bool
+ {
+ \cs_set:Npn \__keythms_listof_misdirect:nnn ##1##2##3 { ##1 ~ ##2##3 }
+ }
\legacy_if_set_false:n { @filesw }
\@starttoc{ thlist }
\group_end:
@@ -1787,7 +1780,7 @@
}
% chaptervspacehack (code translated from thmtools)
-\cs_new_eq:NN \KeyThmsAddvspace \addvspace
+\cs_new_protected:Npn \KeyThmsAddvspace #1 { } % initially no-op, redefined where needed
\int_new:N \g_keythms_listof_prevchapter_int
\int_gset:Nn \g_keythms_listof_prevchapter_int { 1 }
% ^ if this is zero, bad things happen if title-code is changed; anyways don't
@@ -1804,7 +1797,7 @@
{
\addtocontents{ thlist }
{
- \protect\KeyThmsAddvspace
+ \KeyThmsAddvspace
{ \keythms@listof@chaptervspace@dim }
}
\int_gset:Nn \g_keythms_listof_prevchapter_int { \value{chapter} }
@@ -1848,39 +1841,32 @@
\keys_define:nn { keytheorems }
{
- restate-counters .code:n =
- {
- \clist_map_inline:nn { #1 }
- { \tl_new:c { l_keythms_restate_current_##1_tl } }
- \clist_gput_right:Nn \g__keythms_restatecounters_clist { #1 }
- },
- restate-counters .initial:n = equation,
- continues-code .cs_set:Np = \__keythms_thmuse_continues:n #1,
- continues-code .initial:n =
+ auto-translate .bool_gset:N = \g__keythms_autotranslate_bool,
+ auto-translate .initial:n = true,
+ continues-code .cs_set:Np = \__keythms_thmuse_continues:n #1,
+ continues-code .initial:n =
{ % not sure how best to handle this translation
\GetTranslation{keythms_continues}\pageref{#1}
},
+ overload .code:n = \__keythms_overload_code:,
+ overload .value_forbidden:n = true,
+ overload .usage:n = preamble,
qed-symbol .cs_set_protected:Np = \qedsymbol,
- overload .code:n = \__keythms_overload_code:,
- overload .value_forbidden:n = true,
- overload .usage:n = preamble,
- thmtools-compat .code:n =
- { % prevent loading the code again if key called twice
- \bool_if:NF \g__keythms_thmtoolscompat_bool
- { \__keythms_thmtoolscompat_code: }
+ restate-counters .code:n =
+ {
+ \clist_map_inline:nn { #1 }
+ { \tl_new:c { l_keythms_restate_current_##1_tl } }
+ \clist_gput_right:Nn \g__keythms_restatecounters_clist { #1 }
},
- thmtools-compat .value_forbidden:n = true,
- thmtools-compat .usage:n = preamble,
- store-all .code:n = \__keythms_storeall_code:,
- store-all .value_forbidden:n = true,
- store-all .usage:n = preamble,
- auto-translate .bool_gset:N = \g__keythms_autotranslate_bool,
- auto-translate .initial:n = true,
- store-sets-label .code:n =
+ restate-counters .initial:n = equation,
+ store-all .code:n = \__keythms_storeall_code:,
+ store-all .value_forbidden:n = true,
+ store-all .usage:n = preamble,
+ store-sets-label .code:n =
{
\keys_define:nn { keytheorems/thmuse }
{
- store .code:n =
+ store .code:n =
{
\tl_set:Nn \l__keythms_thmuse_label_tl { ##1 }
\tl_set:Nn \l__keythms_thmuse_store_tl { ##1 }
@@ -1892,13 +1878,19 @@
},
}
},
+ thmtools-compat .code:n =
+ { % prevent loading the code again if key called twice
+ \bool_if:NF \g__keythms_thmtoolscompat_bool
+ { \__keythms_thmtoolscompat_code: }
+ },
+ thmtools-compat .value_forbidden:n = true,
+ thmtools-compat .usage:n = preamble,
}
\cs_generate_variant:Nn \__keythms_thmuse_continues:n { V }
-% \keytheoremset{<options>}
\NewDocumentCommand \keytheoremset { m }
- {
+ { % #1 = keys
\keys_set:nn { keytheorems } { #1 }
}
@@ -1993,6 +1985,12 @@
}
}
\ProvideDocumentCommand { \listoftheorems } { } { \listofkeytheorems }
+ \ProvideDocumentCommand { \listtheoremname } { }
+ { \GetTranslation{keythms_listof_title} }
+ \keys_define:nn { keytheorems/listof }
+ { % redefine since thmtools way is \renewcommand\listtheoremname{...}
+ title .initial:n = \listtheoremname
+ }
\ProvideDocumentCommand { \addtotheorempreheadhook } { O{allthms} m }
{
\addtotheoremhook [ ##1 ] { prehead } { ##2 }
@@ -2063,8 +2061,8 @@
},
cut .default:n = true,
nocut .meta:n = { cut=false },
- thickness .code:n = % could also add keys to clist with changed dimens; which is better?
- {
+ thickness .code:n =
+ { % could also add keys to clist with changed dimens; which is better?
\hook_gput_code:nnn { keytheorems/\l__keythms_thm_envname_tl/prehead }
{ keythms_tcbox }
{ \dim_set:Nn \l_keythms_tcbthmbox_thickness_dim { ##1 } }
@@ -2343,8 +2341,8 @@
{
\keys_define:nn { keytheorems/listof } % adjust to AMS classes
{
- numwidth .initial:n = 1.5pc,
indent .initial:n = 0pt,
+ numwidth .initial:n = 1.5pc,
title-code .code:n =
{ % warn but set titlecmd just in case
\msg_warning:nn { keytheorems } { title-code-with-AMS }
@@ -2356,9 +2354,10 @@
\bool_gset_true:N \g__keythms_listof_writefile_bool
\group_begin:
\keys_set:nn { keytheorems/listof } { ##1 }
- \bool_if:NT \l__keythms_listof_nochapskip_bool
+ \cs_set_protected:Npn \KeyThmsContentsLine ####1 { ####1 }
+ \bool_if:NF \l__keythms_listof_nochapskip_bool
{
- \cs_set_eq:NN \KeyThmsAddvspace \use_none:n
+ \cs_set_eq:NN \KeyThmsAddvspace \addvspace
}
\legacy_if_set_false:n { @filesw }
\bool_if:NTF \l__keythms_listof_notitle_bool
diff --git a/macros/latex/contrib/litetable/doc/litetable-cn.pdf b/macros/latex/contrib/litetable/doc/litetable-cn.pdf
index 44673f1a19..1dae21e39a 100644
--- a/macros/latex/contrib/litetable/doc/litetable-cn.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-cn.tex b/macros/latex/contrib/litetable/doc/litetable-cn.tex
index 0ae4001a44..ddb92a23b3 100644
--- a/macros/latex/contrib/litetable/doc/litetable-cn.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-cn.tex
@@ -1,178 +1,149 @@
\documentclass[letterpaper]{l3doc}
+\hypersetup{urlcolor = teal, filecolor = violet}
\usepackage[mono = false]{libertine}
-\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\usepackage{pdfpages,hologo,framed}
\hologoFontSetup{general = \sffamily}
-\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
-\fvset{xleftmargin = \parindent}
+\FrameSep = 0pt
\usepackage[fontset = none]{ctex}
-\setCJKmainfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKsansfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKmonofont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKmainfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKsansfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKmonofont[BoldFont = *-Bold]{LXGW WenKai}
\usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace*{-.5\baselineskip}}
-\title{
- \cls{litetable} 文档类:多彩的课程表
- \thanks{\url{https://github.com/xiamyphys/litetable}}
+\title
+{
+ \bfseries\cls{litetable} 文档类:多彩的课程表
+ \thanks{\url{https://github.com/xiamyphys/litetable}}
}
-
-\author{夏明宇,杭州电子科技大学}
-
-\affil{\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}}
-
-\date{Version 3.0B, \today}
+\author
+{
+ 夏明宇 \texttt{<\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}>}
+ \thanks{\href{https://github.com/ljguo1020}{郭李军}开发了读取 \meta{left} -> \meta{right} 型数据结构模块和低版本 \hologo{TeX} Live 兼容模块.}
+}
+\date{Version 3.1A, \today}
\begin{document}
\maketitle
-\begin{abstract}
- 本文档为 \cls{litetable} 文档类的用户手册. 该文档类提供了一个多彩的课程表设计. 欢迎通过邮件 \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} 或 \href{https://github.com/xiamyphys/litetable/issues}{GitHub} 提供建议或反馈bug. 本手册提供英文、\textbf{中文}和粤语版本.
-\end{abstract}
-
\section{介绍}
-\subsection{所需宏包}
-
-该文档类基于 \cls{article} 文档类. 需要 \pkg{expl3},\pkg{xparse},\pkg{tikz},\pkg{listofitems} 和 \pkg{xcolor} 宏包.
+\cls{litetable} 文档类提供了一个多彩的课程表设计,基于 \cls{article} 文档类,由 \pkg{expl3} 和 \pkg{tikz} 构建. 兼容发行版 \hologo{TeX} Live 2021及更高版本,在 \hologo{pdfLaTeX} 和 \hologo{XeLaTeX} 编译器下均可正常运行. 本文档为 \cls{litetable} 文档类的中文用户手册,手册同时有\href{./litetable-en.pdf}{英文}和\href{./litetable-hk.pdf}{粤语}版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-\subsection{兼容性}
-
-所需 \pkg{expl3} 宏包的版本需支持``e-type'' 变体,所以该文档类不能在 \hologo{TeX}Live 2023及更早的版本上运行. 所用的测试平台为 macOS 15.1 / Overleaf / Ubuntu 22.04.2,并使用 \hologo{TeX}Live 2024发行版,在 \hologo{pdfLaTeX} 和 \hologo{XeLaTeX} 编译器下均可正常运行. Windows 和 Unix 平台的兼容性未知.
-
-\section{使用}
-
-\subsection{载入 \cls{litetable} 并生成课程表框架}
+\section{载入 \cls{litetable} 并生成课程表框架}
同加载其他文档类一样,只需写下
-\begin{Verbatim}
+\begin{framed}
+ \begin{verbatim}
\documentclass{litetable}
-\end{Verbatim}
+ \end{verbatim}
+\end{framed}
-接下来的命令需要带有 \cmd{remember picture, overaly} 选项的 \cmd{tikzpicture} 环境.
+如果用户需要输入中文,可自行载入 \pkg{ctex} 宏包并设置字体.
-\subsubsection{命令:\cs{maketable}}
+\begin{function}{\timelist,\weeklist}
+ \begin{syntax}
+ \cs{timelist}\oarg{rows}\marg{time list} \cs{timelist}\marg{time list}\oarg{rows}
+ \cs{weeklist}\oarg{default weeks}\marg{week list} \cs{weeklist}\marg{week list}\oarg{default weeks}
+ \end{syntax}
-\begin{example}
- \cs{maketable}\oarg{semester}\marg{title}
-\end{example}
+ 以上命令均有两个参数. 命令 \cs{timelist} 的可选参数可直接决定课程表的行数,命令 \cs{weeklist} 的可选参数可决定默认的星期数目并会在每个课程块的右下角显示. 两个命令的强制参数均接收数组,可分别在课程表的左侧添加时间列表、在课程表的顶部添加对应宽度比例的工作日.
-此命令有两个参数,可生成一个空白的课程表框架. 第一个可选参数可在页面的右上角添加学期块,第二个强制参数可指定标题.
+ 若命令 \cs{timelist} 中时间数组数目大于可选参数接收值,则多余的时间数组将被忽略,并返回一个警告. 如果只在课程表左侧添加一列序号,使强制参数为空即可.
+\end{function}
-\subsubsection{命令:\cs{more}}
-
-\begin{example}
+\begin{function}{\more}
+ \begin{syntax}
\cs{more}\marg{comment}
-\end{example}
-
-此命令可在页面的右下角添加备注.
-
-\subsubsection{命令:\cs{timelist}}
-
-\begin{example}
- \cs{timelist}\oarg{rows}\marg{time list}
-\end{example}
+ \end{syntax}
+
+ 此命令可在页面的右下角添加备注.
+\end{function}
+
+\begin{function}{\maketable}
+ \begin{syntax}
+ \cs{maketable}\oarg{semester}\marg{title} \cs{maketable}\marg{title}\oarg{semester}
+ \end{syntax}
+
+ 此命令有两个参数,可生成一个空白的课程表框架,需在命令 \cs{timelist},\cs{weeklist} 和 \cs{more} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行. 可选参数可在页面的右上角添加学期块,强制参数可指定标题.
+\end{function}
+
+\section{添加课程块}
+
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course}\oarg{keyvals}\marg{start number}\marg{end number}
+ \end{syntax}
+
+ \cs{course} 命令可在当前工作日添加课程块,需在命令 \cs{maketable} 后,并在带有 \cmd{[remember picture, overaly]} 选项的 \env{tikz} 环境中执行.
+
+ 此命令有三个参数. 第一个可选参数接收下列键:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 键 \keys{\cmdmac~color} 默认值为 \cmd{teal},键 \keys{\cmdmac~weeks} 默认值由命令 \cs{weeklist} 的可选参数决定. 第二个和第三个强制参数分别为课程的开始和结束序号.
+
+ \cs{course} 命令的用例如下:将此课程块的颜色设置为 \cmd{DarkSlateGray},此课程名称为 \cmd{litetable},上课地点为 \cmd{Hong Kong},教师为 \cmd{M.Y. Xia},在当日的第 \cmd{8} 节课开始,第 \cmd{8} 节课结束.
+
+ \begin{framed}
+ \begin{verbatim}
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{verbatim}
+ \end{framed}
+
+ \begin{itemize}[topsep = 0pt]
+ \item 若课程块的高度只有一格,即$\meta{start number} = \meta{end number}$,则键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 的值将输出在同一行并以逗号 (,) 间隔,键 \keys{\cmdmac~weeks} 的值将会隐藏.
+ \item 若键 \keys{\cmdmac~location} 和 \keys{\cmdmac~teacher} 均未赋值,则键 \keys{\cmdmac~subject} 的值将输出在课程块中心.
+ \item 超出课程表工作日范围的课程块将不会显示,只会返回一条警告.
+ \end{itemize}
+\end{function}
+
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday}\oarg{integral value}
+ \end{syntax}
+
+ 此命令有一个可选参数,可使其后面添加的课程块后移 \meta{intergal value} 个工作日. 可选参数的默认值为 \cmd{1},即后移 \cmd{1} 个工作日.
+\end{function}
+
+\clearpage
+
+\section{最小工作示例}
+
+此MWE生成的课程表有13行但是只有前12行标注时间,课程表顶部共有5个工作日,工作日之间的宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 的默认值被赋为 \cmd{Weeks 1 - 16}. 添加了注释和两个课程块.
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
-此命令有两个参数,第一个可选参数 \oarg{\#1} 可直接决定课程表的行数,第二个强制参数 \marg{\#2} 可在课程表的左侧添加时间列表. 输入数组的用例如下
+ \begin{document}
-\begin{Verbatim}
- \timelist[13]{
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
- 10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
- 14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
- 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ \timelist[13]
+ {
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+ 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+ 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
}
-\end{Verbatim}
-
-对于两个参数的不同使用情况,\cls{litetable} 会以如下规则生成对应行数的课程表框架.
-
-\begin{table}[htbp]
- \centering
- \begin{tabularx}{.9\textwidth}{c X X}
- \toprule
- $\displaystyle\sfrac{\oarg{\#1}}{\marg{\#2}}$ &
- \multicolumn{1}{c}{使用} &
- \multicolumn{1}{c}{不使用}\\
- \midrule
- 使用 &
- 效果与 \marg{\#2} 所描述的相同,但课程表的行数由 \oarg{\#1} 决定 &
- 效果与 \oarg{\#1} 所描述的相同\\
- \midrule
- 不使用 &
- 效果与 \marg{\#2} 所描述的相同&
- ERROR!\\
- \bottomrule
- \end{tabularx}
-\end{table}
-
-\begin{itemize}
- \item 若强制参数 \marg{\#2} 接收了$X$组时间,可选参数 \oarg{\#1} 接收的值为$X+a$,则课程表的左侧只有$1 \sim X$行会显示时间,后面几行不显示时间.
- \item 若强制参数 \marg{\#2} 接收了$X+a$组时间,可选参数 \oarg{\#1} 接收的值为$X$, 则会生成只有$X$行的课程表,多余的时间组将被忽略,并返回一个警告.
-\end{itemize}
-
-\subsubsection{命令:\cs{weeklist}}
-
-\begin{example}
- \cs{weeklist}\oarg{default weeks}\marg{week list}
-\end{example}
-
-此命令有两个参数. 第一个可选参数可决定默认的星期数并会在每个课程块的右下角显示,第二个强制参数可在课程表的顶部添加对应宽度比例的工作日. 输入列表的第一行为工作日格式,第二行为对应的宽度比例,两行之间用分号 (;) 分隔. 例如
-
-\begin{Verbatim}
- \weeklist[Weeks 1 - 16]{Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5}
-\end{Verbatim}
-
-\begin{figure}[!ht]
- \centering
- \begin{tikzpicture}[every node/.style={font=\small\sffamily\scshape}]
- \draw [thick,->,>=stealth] (-5 in/15,0) -- (5 in,0);
- \draw (-5 in/15,-.1) --++ (0,.2) node [above] {\verb|-1/15|};
- \draw (0,-.1) --++ (0,.2) node [above] {\verb|0|};
- \draw (4*5 in/24,-.1) --++ (0,.2) node [above] {\verb|4x|};
- \draw (9*5 in/24,-.1) --++ (0,.2) node [above] {\verb|9x|};
- \draw (13*5 in/24,-.1) --++ (0,.2) node [above] {\verb|13x|};
- \draw (19*5 in/24,-.1) --++ (0,.2) node [above] {\verb|19x|};
- \draw (5 in,-.1) --++ (0,.2) node [above] {\verb|24x|};
- \node [above] at (2*5 in/24,0) {Mon};
- \node [above] at (6.5*5 in/24,0) {Tue};
- \node [above] at (11*5 in/24,0) {Wed};
- \node [above] at (16*5 in/24,0) {Thu};
- \node [above] at (21.5*5 in/24,0) {Fri};
- \end{tikzpicture}
-\end{figure}
-
-此时 \cs{course} 命令中键 \keys{weeks} 的默认值被赋为 \cmd{Weeks 1 - 16}. 如果输入的工作日的数量比输入的宽度比例数量多,则多余的工作日将被忽略并返回一条警告.
-
-\subsection{添加课程块}
-
-使用 \cs{course} 命令在当前工作日添加课程块. 此命令有两个参数.
-
-\begin{example}
- \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
-\end{example}
-
-第一个可选参数接收下列键:\keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. 键 \keys{color} 的默认值为 \cmd{DarkSlateGray},键 \keys{weeks} 的默认值由命令 \cs{weeklist} 的第一个参数决定. 第二个和第三个强制参数分别为课程的开始和结束序号. \cs{course} 命令的用例如下
-
-\begin{Verbatim}
- \course [ color = DarkGreen, subject = listofitems,
- location = French, teacher = Christian Tellechea
- ] {10} {12}
-\end{Verbatim}
-
-\begin{center}
- \noindent\fbox{
- \parbox{.96\linewidth}{
- 将此课程块的颜色设置为 \cmd{DarkGreen},此课程名称为 \cmd{listofitems},上课地点为 \cmd{French},教师为 \cmd{Christian Tellechea},在当日的第 \cmd{10} 节课开始,第 \cmd{12} 节课结束.
- }
+ \weeklist[Weeks 1 - 16]
+ {
+ Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
}
-\end{center}
+ \more{Author: Mingyu Xia \& Lijun Guo}
+
+ \begin{tikzpicture}[remember picture, overlay]
+ \maketable
+ \course [ subject = Keep on {\TeX}ing
+ ] {10} {11}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{tikzpicture}
-\begin{itemize}
- \item 可通过 \cs{newday} 命令切换到下一个工作日.
- \item 若课程块的高度只有一个单位,即$\marg{class start number} = \marg{class end number}$,则键 \keys{location} 和 \keys{teacher} 的值将输出在同一行并以逗号 (,) 间隔,键 \cmd{weeks} 的值将不会输出.
- \item 若键 \keys{location} 和 \keys{teacher} 均未赋值,则键 \keys{subject} 的值将输出在课程块的中心.
-\end{itemize}
+ \end{document}
+ \end{verbatim}
+\end{framed}
\includepdf[pages = 1]{litetable-demo.pdf}
diff --git a/macros/latex/contrib/litetable/doc/litetable-demo.pdf b/macros/latex/contrib/litetable/doc/litetable-demo.pdf
index 7b58f47b83..30be98e945 100644
--- a/macros/latex/contrib/litetable/doc/litetable-demo.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-demo.tex b/macros/latex/contrib/litetable/doc/litetable-demo.tex
index bbe750acb8..c051d070d5 100644
--- a/macros/latex/contrib/litetable/doc/litetable-demo.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-demo.tex
@@ -3,68 +3,68 @@
\usepackage{twemojis,newtxtext}
\usepackage[scaled = .9]{helvet}
\renewcommand*\familydefault{\sfdefault}
+
+\begin{document}
+
\timelist [ 13 ]
{
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
- 10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
- 14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
- 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
+ 10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
+ 14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
+ 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
}
\weeklist [ Weeks 1 - 16 ]
{
- \texttwemoji{1f312}\scshape~Mon -> 1,
- \texttwemoji{1f525}\scshape~Tue -> 1,
- \texttwemoji{1f30a}\scshape~Wed -> 1,
- \texttwemoji{1f332}\scshape~Thu -> 1,
- \texttwemoji{1fa99}\scshape~Fri -> 1
+ \scshape\texttwemoji{1f312} Mon -> 1,
+ \scshape\texttwemoji{1f525} Tue -> 1,
+ \scshape\texttwemoji{1f30a} Wed -> 1,
+ \scshape\texttwemoji{1f332} Thu -> 1,
+ \scshape\texttwemoji{1fa99} Fri -> 1
+}
+\more
+{
+ School Starts: 06 / 09 / 2024\quad Summer Vacation: 26 / 01 / 2025
}
-
-\begin{document}
\begin{tikzpicture}[remember picture, overlay]
- \maketable [SEM 6] {Skyrmion's Timetable}
- \newday
- \course [ subject = {xia-my@ctan}] {4} {4}
- \course [ color = DarkBlue, subject = interface3,
- teacher = The {\LaTeX} Project
- ] {7} {9}
- \newday
- \course [ color = FireBrick, subject = usrguide,
- teacher = {\LaTeX} Project Team,
- weeks = Weeks 7 - 14
- ] {1} {2}
- \newday
- \course [ color = DarkSlateGray,
- subject = Keep on {\TeX}ing
- ] {7} {8}
- \course [ color = DarkGreen, subject = listofitems,
- location = French, teacher = Christian Tellechea
- ] {10} {12}
- \newday
- \course [ color = Crimson,
- subject = Ti\textit{k\/}Z\\library: calc,
- teacher = The PGF/Ti\textit{k\/}Z Team
- ] {3} {5}
- \newday
- \course [ color = DarkViolet, subject = xcolor,
- weeks = Week 1 - 16, location = Germany,
- teacher = Dr. Uwe Kern
- ] {8} {8}
- \more {School Starts: 06 / 09 / 2024\quad
- Summer Vacation: 26 / 01 / 2025
- }
+ \maketable [SEM 6] {Skyrmion's Timetable}
+ \course [ color = DarkBlue, subject = interface3,
+ teacher = The {\LaTeX} Project
+ ] {5} {5}
+ \newday
+ \course [ color = Purple, subject = expl3,
+ teacher = The {\LaTeX} Project
+ ] {8} {8}
+ \course [ color = FireBrick, subject = usrguide,
+ teacher = {\LaTeX} Project Team, weeks = Weeks 7 - 14
+ ] {1} {2}
+ \newday
+ \course [ subject = Keep on {\TeX}ing
+ ] {10} {11}
+ \newday
+ \course [ color = Crimson,
+ subject = Ti\textit kZ,
+ teacher = The PGF/Ti\textit kZ Team
+ ] {3} {5}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
\end{tikzpicture}
\clearpage
-\timelist[12]{}
-\weeklist[Weeks 1 - 16]
+\timelist [ 12 ]{ }
+\weeklist [ Weeks 1 - 16 ]
{
- Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1
+ Mon -> 1, Tue -> 1, Wed -> 1, Thu -> 1, Fri -> 1
}
\begin{tikzpicture}[remember picture, overlay]
- \maketable [SEM 7] {Skyrmion's Timetable}
+ \maketable [SEM 7] {Skyrmion's Timetable}
+ %
\end{tikzpicture}
-\end{document} \ No newline at end of file
+\end{document}
+
+%% \ No newline at end of file
diff --git a/macros/latex/contrib/litetable/doc/litetable-en.pdf b/macros/latex/contrib/litetable/doc/litetable-en.pdf
index 201030c03a..7a4366b495 100644
--- a/macros/latex/contrib/litetable/doc/litetable-en.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-en.tex b/macros/latex/contrib/litetable/doc/litetable-en.tex
index ea1ff8b28e..f272d0d6a4 100644
--- a/macros/latex/contrib/litetable/doc/litetable-en.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-en.tex
@@ -1,178 +1,149 @@
\documentclass[letterpaper]{l3doc}
+\hypersetup{urlcolor = teal, filecolor = violet}
\usepackage[mono = false]{libertine}
-\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\usepackage{pdfpages,hologo,framed}
\hologoFontSetup{general = \sffamily}
-\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
-\fvset{xleftmargin = \parindent}
+\FrameSep = 0pt
% \usepackage[fontset = none]{ctex}
-\linespread{1.15}
+\linespread{1.12}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace*{-.5\baselineskip}}
-\title{
- The \cls{litetable} Class: Colorful Timetable
- \thanks{\url{https://github.com/xiamyphys/litetable}}
+\title
+{ \bfseries
+ The \cls{litetable} Class: Colorful Timetable
+ \thanks{\url{https://github.com/xiamyphys/litetable}}
}
-
-\author{Mingyu Xia, Hangzhou Dianzi University}
-
-\affil{\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}}
-
-\date{Version 3.0B, \today}
+\author
+{
+ Mingyu Xia \texttt{<\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}>}
+ \thanks{\href{https://github.com/ljguo1020}{Lijun Guo} developed modules for reading \meta{left} -> \meta{right} data structure and supporting low version \hologo {TeX} Live.}
+}
+\date{Version 3.1A, \today}
\begin{document}
\maketitle
-\begin{abstract}
- This is the manual for \cls{litetable} class, which provides a design of timetable with colorful course blocks. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/litetable/issues}{GitHub}. This manual is available in three versions: \textbf{English}, Chinese, and Cantonese.
-\end{abstract}
-
\section{Introduction}
-\subsection{Packages required}
+The \cls{litetable} class provides a design of timetable with colorful course blocks, which is based on the \cls{article} class, and conducted on \pkg{expl3} and \pkg{tikz}. It is compatible with the \hologo{TeX}Live 2021 or later distributions, they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. This is the Chinese manual for \cls{litetable} class, the manual also provides \href{./litetable-cn.pdf}{Chinese} and \href{./litetable-hk.pdf}{Cantonese} versions\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-This class is based on the \cls{article} class. It requires \pkg{expl3}, \pkg{xparse}, \pkg{tikz}, \pkg{listofitems}, and \pkg{xcolor} packages.
+\section{Loading \cls{litetable} and generate the timetable frame}
-\subsection{Compatibility}
+Just like loading any class, write
-The required version of the \pkg{expl3} package should support ``e-type'' variants, so it cannot run on the version of \hologo{TeX}Live 2023 or earlier. The test platforms are macOS 15.1 / Overleaf / Ubuntu 22.04.2 with \hologo{TeX}Live 2024 distribution. They all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. Windows and Unix platforms' compatibility is unknown.
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
+ \end{verbatim}
+\end{framed}
-\section{Usage}
+One can load \pkg{ctex} package and set the font to input the CJK characters, if necessary.
-\subsection{Loading \cls{litetable} and generate the timetable frame}
+\begin{function}{\timelist,\weeklist}
+ \begin{syntax}
+ \cs{timelist}\oarg{rows}\marg{time list} \cs{timelist}\marg{time list}\oarg{rows}
+ \cs{weeklist}\oarg{default weeks}\marg{week list} \cs{weeklist}\marg{week list}\oarg{default weeks}
+ \end{syntax}
-Just like loading any class, write
+ Each of the two commands above have two arguments. The optional argument of the command \cs{timelist} can directly assign the number of rows on the timetable, and that of the command \cs{weeklist} can determine the default number of weeks and print it at every course block's southeast corner. Each mandatory argument of the two commands accepts an array that can add a time list to the left side of the timetable and add workdays with corresponding width ratios at the top of the timetable, respectively.
-\begin{Verbatim}
- \documentclass{litetable}
-\end{Verbatim}
+ If the number of time arrays received by the command \cs{timelist} is greater than the value received by the optional argument of it, then the extra time sets are ignored, and it will return a warning. If one wants to add a series of numbers to the left side of the timetable without time, just leave the mandatory argument blank.
+\end{function}
-The following commands need the \cmd{tikzpicture} environment with \cmd{remember picture, overaly} option.
+\begin{function}{\more}
+ \begin{syntax}
+ \cs{more}\marg{comment}
+ \end{syntax}
-\subsubsection{The \cs{maketable} command}
+ This command can add a comment at the southwest corner of the page.
+\end{function}
-\begin{example}
- \cs{maketable}\oarg{semester}\marg{title}
-\end{example}
+\begin{function}{\maketable}
+ \begin{syntax}
+ \cs{maketable}\oarg{semester}\marg{title} \cs{maketable}\marg{title}\oarg{semester}
+ \end{syntax}
-This command has two arguments that can create an empty timetable frame. The first optional argument can add the semester block at the northeast corner of the page, and the second mandatory argument can assign the title.
+ This command has two arguments that can create an empty timetable frame, and it should execute after command \cs{timelist} and \cs{weeklist} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}. The optional argument can add the semester block at the northeast corner of the page, and the mandatory argument can assign the title.
+\end{function}
-\subsubsection{The \cs{more} command}
+\section{Add course blocks}
-\begin{example}
- \cs{more}\marg{comment}
-\end{example}
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course}\oarg{keyvals}\marg{start number}\marg{end number}
+ \end{syntax}
+\end{function}
-This command can add a comment at the southwest corner of the page.
+The \cs{course} command can add course blocks on the current workday, it should execute after command \cs{maketable} in the \env{tikzpicture} environment with the option of \cmd{[remember picture, overaly]}.
-\subsubsection{The \cs{timelist} command}
+This command has three arguments. The first optional argument accepts the following keys: \keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. The default value of the key \keys{\cmdmac~color} is \cmd{teal}, and the default value of the key \keys{\cmdmac~weeks} is determined by the first argument of the command \cs{weeklist}. The second and third mandatory arguments are the start and end numbers of the course, respectively.
-\begin{example}
- \cs{timelist}\oarg{rows}\marg{time list}
-\end{example}
+The following is an example of the command \cs{course}: Set the color of this course block to \cmd{DarkSlateGray}, the course name to \cmd{litetable}, the class location to \cmd {Hong Kong}, and the teacher to \cmd{M.Y. Xia}, starting from the \cmd{8}th class and ending at the \cmd{8}th class in the current day.
-This command has two arguments, the first optional argument \oarg{\#1} can directly assign the number of rows on the timetable, and the second mandatory argument \marg{\#2} can add time to the left side of the timetable. The following example is the format for inputting array
+\begin{framed}
+ \begin{verbatim}
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{verbatim}
+\end{framed}
-\begin{Verbatim}
- \timelist[13]{
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
- 10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
- 14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
- 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
- }
-\end{Verbatim}
-
-For different usage scenarios of the two arguments, \cls{litetable} will generate a corresponding row-based timetable frame according to the following rules.
-
-\begin{table}[htbp]
- \centering
- \begin{tabularx}{\linewidth}{c X X}
- \toprule
- $\displaystyle\sfrac{\oarg{\#1}}{\marg{\#2}}$ &
- \multicolumn{1}{c}{To use} &
- \multicolumn{1}{c}{Not to use}\\
- \midrule
- To use &
- The effect is the same as described in \marg{\#2}, but the number of rows in the timetable is determined by \oarg{\#1} &
- The effect is the same as described in \oarg{\#1}\\
- \midrule
- Not to use &
- The effect is the same as described in \marg{\#2} &
- ERROR!\\
- \bottomrule
- \end{tabularx}
-\end{table}
-
-\begin{itemize}
- \item If the mandatory argument \marg{\#2} receives $X$ sets of time, and the optional argument \oarg{\#1} receives a value of $X+a$, then only lines $1\sim X$ on the left side of the timetable display the time, while the other lines do not display the time.
- \item If the mandatory argument \marg{\#2} receives $X+a$ sets of time, and the optional \oarg{\#1} receives a value of $X$, then the extra time sets ignored, and it will return a warning.
+\begin{itemize}[topsep = 0pt]
+ \item If the course block's height is only one unit, that is $\meta{start number} = \meta{end number}$, the values of keys \keys{\cmdmac~location} and \keys{\cmdmac~teacher} will print on the same line with a comma (,) separated, and the value of the key \keys{\cmdmac~weeks} will be hidden.
+ \item If neither the key \keys{\cmdmac~location} nor the key \keys{\cmdmac~teacher} is assigned value, then the value of the key \keys{\cmdmac~subject} will print at the center of the course block.
+ \item Course blocks that are out of the timetable will not display, and it will return a warning.
\end{itemize}
-\subsubsection{The \cs{weeklist} command}
-
-\begin{example}
- \cs{weeklist}\oarg{default weeks}\marg{week list}
-\end{example}
-
-This command has two arguments. The first optional argument can determine the default number of weeks and print at every course block's southeast corner. The second mandatory argument can add workdays with corresponding width ratios at the top of the timetable. The following example is the format for inputting array
-
-\begin{Verbatim}
- \weeklist[Weeks 1 - 16]{Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5}
-\end{Verbatim}
-
-\begin{figure}[!ht]
- \centering
- \begin{tikzpicture}[every node/.style={font=\small\sffamily\scshape}]
- \draw [thick,->,>=stealth] (-5 in/15,0) -- (5 in,0);
- \draw (-5 in/15,-.1) --++ (0,.2) node [above] {\verb|-1/15|};
- \draw (0,-.1) --++ (0,.2) node [above] {\verb|0|};
- \draw (4*5 in/24,-.1) --++ (0,.2) node [above] {\verb|4x|};
- \draw (9*5 in/24,-.1) --++ (0,.2) node [above] {\verb|9x|};
- \draw (13*5 in/24,-.1) --++ (0,.2) node [above] {\verb|13x|};
- \draw (19*5 in/24,-.1) --++ (0,.2) node [above] {\verb|19x|};
- \draw (5 in,-.1) --++ (0,.2) node [above] {\verb|24x|};
- \node [above] at (2*5 in/24,0) {Mon};
- \node [above] at (6.5*5 in/24,0) {Tue};
- \node [above] at (11*5 in/24,0) {Wed};
- \node [above] at (16*5 in/24,0) {Thu};
- \node [above] at (21.5*5 in/24,0) {Fri};
- \end{tikzpicture}
-\end{figure}
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday}\oarg{intergal value}
+ \end{syntax}
-Now, the default value of the key \keys{weeks} is set to \cmd{Weeks 1 - 16}. If the number of workdays is larger than the ratios you input, then the extra workdays will be ignored and it will return a warning.
+ This command has an optional argument that can move the course blocks right \meta{intergal value} working days. The default value of the optional argument is \cmd{1} to move right \cmd{1} workday.
+\end{function}
-\subsection{Add course blocks}
+\clearpage\linespread{1.375}
-Using the \cs{course} command to add course blocks on the current workday. This command has two arguments.
+\section{Minimal Working Example}
-\begin{example}
- \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
-\end{example}
+The following MWE could generate a timetable of 13 lines but only the top 12 lines have been marked with time, and there are 5 workdays at the top of the timetable, ratios between them are $4:5:4:6:5$. The default value of the key \keys{\cmdmac~weeks} will be set to \cmd{Weeks 1 - 16}. A comment and two course blocks are added.
-The first optional argument accepts the following keys: \keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. The default value of the key \keys{color} is \cmd{DarkSlateGray}, and the default value of the key \keys{weeks} is determined by the first argument of the command \cs{weeklist}. The second and third mandatory arguments are the start and end numbers of the course, respectively. The following is a use case of the command \cs{course}
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
-\begin{Verbatim}
- \course [ color = DarkGreen, subject = listofitems,
- location = French, teacher = Christian Tellechea
- ] {10} {12}
-\end{Verbatim}
+ \begin{document}
-\begin{center}
- \noindent\fbox{
- \parbox{.94\linewidth}{\footnotesize
- Set the color of this course block to \cmd{DarkGreen}, the course name to \cmd{listofitems}, the class location to \cmd {French}, and the teacher to \cmd{Christian Tellechea}, starting from the \cmd{10}th class of the day and ending from the \cmd{12}th class of the same day.
- }
+ \timelist[13]
+ {
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+ 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+ 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ }
+ \weeklist[Weeks 1 - 16]
+ {
+ Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
}
-\end{center}
+ \more{Author: Mingyu Xia \& Lijun Guo}
+
+ \begin{tikzpicture}[remember picture, overlay]
+ \maketable
+ \course [ subject = Keep on {\TeX}ing
+ ] {10} {11}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{tikzpicture}
-\begin{itemize}
- \item One can switch to the next workday via the command \cs{newday}.
- \item If the course block's height is only one unit, that is $\marg{class start number} = \marg{class end number}$, the values of keys \keys{location} and \keys{teacher} will print on the same line with a comma (,) separated, and the value of the key \keys{weeks} will not be printed.
- \item If neither the key \cmd{location} nor the key \cmd{teacher} is assigned value, then the value of the key \keys{subject} will print at the center of the course block.
-\end{itemize}
+ \end{document}
+ \end{verbatim}
+\end{framed}
\includepdf[pages = 1]{litetable-demo.pdf}
diff --git a/macros/latex/contrib/litetable/doc/litetable-hk.pdf b/macros/latex/contrib/litetable/doc/litetable-hk.pdf
index 747410fdb4..ec0abe5f0a 100644
--- a/macros/latex/contrib/litetable/doc/litetable-hk.pdf
+++ b/macros/latex/contrib/litetable/doc/litetable-hk.pdf
Binary files differ
diff --git a/macros/latex/contrib/litetable/doc/litetable-hk.tex b/macros/latex/contrib/litetable/doc/litetable-hk.tex
index 8715b4ef51..507a196dd0 100644
--- a/macros/latex/contrib/litetable/doc/litetable-hk.tex
+++ b/macros/latex/contrib/litetable/doc/litetable-hk.tex
@@ -1,178 +1,149 @@
\documentclass[letterpaper]{l3doc}
+\hypersetup{urlcolor = teal, filecolor = violet}
\usepackage[mono = false]{libertine}
-\usepackage{geometry,pdfpages,tikz,tabularx,xfrac,hologo,authblk}
+\usepackage{pdfpages,hologo,framed}
\hologoFontSetup{general = \sffamily}
-\newenvironment{example}{\begin{list}{}{\leftmargin=3em}\item }{\end{list}}
-\fvset{xleftmargin = \parindent}
+\FrameSep = 0pt
\usepackage[fontset = none]{ctex}
-\setCJKmainfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKsansfont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
-\setCJKmonofont[AutoFakeBold = 4, AutoFakeSlant]{LXGW WenKai}
+\setCJKmainfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKsansfont[BoldFont = *-Bold]{LXGW WenKai}
+\setCJKmonofont[BoldFont = *-Bold]{LXGW WenKai}
\usepackage[os = mac]{menukeys}
+\AddToHook{env/function/before}{\vspace*{-.5\baselineskip}}
-\title{
- \cls{litetable} 文檔類:多彩嘅課程表
- \thanks{\url{https://github.com/xiamyphys/litetable}}
+\title
+{
+ \bfseries\cls{litetable} 文檔類:多彩嘅課程表
+ \footnote{\url{https://github.com/xiamyphys/litetable}}
}
-
-\author{夏明宇,杭州電子科技大學}
-
-\affil{\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}}
-
-\date{Version 3.0B, \today}
+\author
+{
+ 夏明宇 \texttt{<\href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com}>}
+ \thanks{\href{https://github.com/ljguo1020}{郭李軍}開發咗讀取 \meta{left} -> \meta{right} 型資料結構糢塊同低版本 \hologo{TeX} Live 相容糢塊.}
+}
+\date{Version 3.1A, \today}
\begin{document}
\maketitle
-\begin{abstract}
- 本文檔系 \cls{litetable} 文檔類嘅用户手冊放. 應該文檔類提供咗個多彩嘅課程表設計. 歡迎通過郵件 \href{mailto:xiamyphys@gmail.com}{xiamyphys@gmail.com} 或者 \href{https://github.com/xiamyphys/litetable/issues}{GitHub} 建議或者反饋bug. 本手冊提供英語、中文和\textbf{粵語}版本.
-\end{abstract}
-
\section{介紹}
-\subsection{所使宏包}
-
-應該文檔類基於 \cls{article} 文檔類. 要 \pkg{expl3},\pkg{xparse},\pkg{tikz},\pkg{listofitems} 同 \pkg{xcolor} 宏包.
+\cls{litetable} 文檔類提供咗個多彩嘅課程表設計,基於 \cls{article} 文檔類,由 \pkg{expl3} 和 \pkg{tikz} 構建. 相容發行版 \hologo{TeX} Live 2021 同更高版本,喺 \hologo{pdfLaTeX} 同 \hologo{XeLaTeX} 編譯器下均可正常運行. 本文檔系 \cls{litetable} 文檔類嘅用户手冊放,手冊放同時有\href{./litetable-en.pdf}{英文}同\href{./litetable-cn.pdf}{官話}版本\footnote{\href{https://qm.qq.com/q/RyssAhG4qy}{QQ Group: 760570712}}.
-\subsection{相容性}
-
-所使 \pkg{expl3} 宏包嘅版本使支持``e-type''變體,所以要文檔類唔可以喺 \hologo{TeX}Live 2023 同更早嘅版本上運行. 所用嘅測試平台為 macOS 15.1 / Overleaf / Ubuntu 22.04.2,並使用 \hologo{TeX}Live 2024 發行版,喺 \hologo{pdfLaTeX} 同 \hologo{XeLaTeX} 編譯器下均可正常運行. Windows 同 Unix 平台嘅相容性未知.
-
-\section{使用}
-
-\subsection{載入 \cls{litetable} 並建置課程表框架}
+\section{載入 \cls{litetable} 並建置課程表框架}
同載入其他文檔類一樣,只令寫下
-\begin{Verbatim}
+\begin{framed}
+ \begin{verbatim}
\documentclass{litetable}
-\end{Verbatim}
-
-跟住落嚟嘅命令需要帶有 \cmd{remember picture,overaly} 選項嘅 \cmd{tikzpicture} 環境.
-
-\subsubsection{命令:\cs{maketable}}
+ \end{verbatim}
+\end{framed}
-\begin{example}
- \cs{maketable}\marg{title}\oarg{semester}
-\end{example}
+如果用戶需要輸入中文,可自行載入 \pkg{ctex} 宏包並設置字型.
-此命令有兩個參數,可建置一個空白嘅課程表框架. 第一個可選參數可喺頁面嘅嘅右度角添加學期,第二個強制參數可指定標題.
+\begin{function}{\timelist,\weeklist}
+ \begin{syntax}
+ \cs{timelist}\oarg{rows}\marg{time list} \cs{timelist}\marg{time list}\oarg{rows}
+ \cs{weeklist}\oarg{default weeks}\marg{week list} \cs{weeklist}\marg{week list}\oarg{default weeks}
+ \end{syntax}
-\subsubsection{命令:\cs{more}}
+ 以上命令均有兩個參數. 命令 \cs{timelist} 嘅可選參數可直接決定課程表嘅行數,命令 \cs{weeklist} 嘅可選參數可決定預設嘅星期數目並會喺每課程塊嘅嘅右下角顯示. 兩個命令嘅強制參數均接受數組,可分別就系課程表嘅左側添加時間表、喺課程表嘅頂部添加對應寬度比例工作日.
+
+ 若命令 \cs{timelist} 中時間數組數字大於可選參數接受值,就多餘嘅時間數組將畀忽略,並返回一個警告. 如果只系課程表左側添加一部序號,令強制參數為空即可.
+\end{function}
-\begin{example}
+\begin{function}{\more}
+ \begin{syntax}
\cs{more}\marg{comment}
-\end{example}
-
-此命令可喺頁面嘅嘅右下角添加備注.
-
-\subsubsection{命令:\cs{timelist}}
-
-\begin{example}
- \cs{timelist}\oarg{rows}\marg{time list}
-\end{example}
-
-此命令有兩個參數,第一個可選參數可直接決定課程表嘅行數,第二個強制參數可喺課程表嘅左側添加時間表. 輸入數組嘅用例如下
-
-\begin{Verbatim}
- \timelist[13]{
- 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45,
- 10:50 -> 11:35, 11:40 -> 12:25, 13:30 -> 14:15,
- 14:20 -> 15:05, 15:15 -> 16:00, 16:05 -> 16:50,
- 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
- }
-\end{Verbatim}
-
-對於兩個參數唔同使用情況,\cls{litetable} 會以如下規則建置對應行數嘅課程表框架.
-
-\begin{table}[htbp]
- \centering
- \begin{tabularx}{.9\textwidth}{c X X}
- \toprule
- $\displaystyle\sfrac{\oarg{\#1}}{\marg{\#2}}$ &
- \multicolumn{1}{c}{使用} &
- \multicolumn{1}{c}{唔使用}\\
- \midrule
- 使用 &
- 效果與 \marg{\#2} 所描述嘅相同,但課程表嘅行數由 \oarg{\#1} 決定 &
- 效果與 \oarg{\#1} 所描述嘅相同\\
- \midrule
- 不使用 &
- 效果與 \marg{\#2} 所描述嘅相同&
- ERROR!\\
- \bottomrule
- \end{tabularx}
-\end{table}
-
-\begin{itemize}
- \item 若強制參數 \marg{\#2} 接受咗$X$組時間,可選參數 \oarg{\#1} 接受嘅值為$X+a$,就課程表嘅左側得$1 \sim X$行會顯示時間,後面幾行唔顯示時間.
- \item 若強制參數 \marg{\#2} 接受咗$X+a$組時間,可選參數 \oarg{\#1} 接收嘅值為$X$, 就課程表嘅左側得$X$行嘅課程表,多餘嘅時間組將畀忽略,並返回一個警告.
+ \end{syntax}
+
+ 此命令可喺頁面嘅嘅右下角添加備注.
+\end{function}
+
+\begin{function}{\maketable}
+ \begin{syntax}
+ \cs{maketable}\oarg{semester}\marg{title} \cs{maketable}\marg{title}\oarg{semester}
+ \end{syntax}
+
+ 此命令有兩個參數,可建置一個空白嘅課程表框架,使喺命令 \cs{timelist} 同 \cs{weeklist} 後,並喺帶有 \cmd{remember picture,overaly} 選項嘅 \env{tikzpicture} 環境中執行. 可選參數可喺頁面嘅嘅右度角添加學期,強制參數可指定標題.
+\end{function}
+
+\section{添加課程塊}
+
+\begin{function}{\course}
+ \begin{syntax}
+ \cs{course}\oarg{keyvals}\marg{start number}\marg{end number}
+ \end{syntax}
+
+ \cs{course} 命令可喺當前工作日添加課程塊,要喺命令 \cs{maketable} 後,並喺帶有 \cmd{remember picture,overaly} 選項嘅 \env{tikzpicture} 環境中執行.
+
+ 此命令有三個參數. 第一個可選參數接受下列鍵:\keys{\cmdmac~color} \keys{\cmdmac~subject} \keys{\cmdmac~location} \keys{\cmdmac~teacher} \keys{\cmdmac~weeks}. 鍵 \keys{\cmdmac~color} 默認值為 \cmd{teal},鍵 \keys{\cmdmac~weeks} 默認值由命令 \cs{weeklist} 嘅可選參數決定. 第二個同第三個強制參數勒分別為課程嘅開始同結束序號.
+
+ \cs{course} 命令嘅用例如下:將此課程塊嘅顏色設置為 \cmd{DarkSlateGray},此課程名為 \cmd{litetable},上堂地方為 \cmd{Hong Kong},老師為 \cmd{M.Y. Xia},喺當日嘅第 \cmd{8} 節課開始,第 \cmd{8} 節課結束.
+
+ \begin{framed}
+ \begin{verbatim}
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{verbatim}
+ \end{framed}
+
+\begin{itemize}[topsep = 0pt]
+ \item 若課程塊高度得一格,即$\marg{start number} = \marg{end number}$,就鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 嘅值將輸出喺同一行並以逗號 (,) 隔,鍵 \keys{\cmdmac~weeks} 嘅值將會隱藏.
+ \item 若鍵 \keys{\cmdmac~location} 同 \keys{\cmdmac~teacher} 均未賦值,就鍵 \keys{\cmdmac~subject} 嘅值將輸出喺課程塊中心.
+ \item 超出課程表工作日範圍嘅課程塊將唔會顯示,只會返回一條警告.
\end{itemize}
+\end{function}
-\subsubsection{命令:\cs{weeklist}}
-
-\begin{example}
- \cs{weeklist}\oarg{default weeks}\marg{week list}
-\end{example}
-
-此命令有兩個參數. 第一個可選參數可決定預設嘅星期數並會喺每課程塊嘅嘅右下角顯示,第二個強制參數可喺課程表嘅頂部添加對應寬度比例嘅工作日. 輸入數組嘅用例如下
-
-\begin{Verbatim}
- \weeklist[Weeks 1 - 16]{Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5}
-\end{Verbatim}
-
-\begin{figure}[!ht]
- \centering
- \begin{tikzpicture}[every node/.style={font=\small\sffamily\scshape}]
- \draw [thick,->,>=stealth] (-5 in/15,0) -- (5 in,0);
- \draw (-5 in/15,-.1) --++ (0,.2) node [above] {\verb|-1/15|};
- \draw (0,-.1) --++ (0,.2) node [above] {\verb|0|};
- \draw (4*5 in/24,-.1) --++ (0,.2) node [above] {\verb|4x|};
- \draw (9*5 in/24,-.1) --++ (0,.2) node [above] {\verb|9x|};
- \draw (13*5 in/24,-.1) --++ (0,.2) node [above] {\verb|13x|};
- \draw (19*5 in/24,-.1) --++ (0,.2) node [above] {\verb|19x|};
- \draw (5 in,-.1) --++ (0,.2) node [above] {\verb|24x|};
- \node [above] at (2*5 in/24,0) {Mon};
- \node [above] at (6.5*5 in/24,0) {Tue};
- \node [above] at (11*5 in/24,0) {Wed};
- \node [above] at (16*5 in/24,0) {Thu};
- \node [above] at (21.5*5 in/24,0) {Fri};
- \end{tikzpicture}
-\end{figure}
+\begin{function}{\newday}
+ \begin{syntax}
+ \cs{newday}\oarg{integral value}
+ \end{syntax}
-此時 \cs{course} 命令中鍵 \keys{weeks} 嘅默認值畀賦為 \cmd{Weeks 1 - 16}. 如果輸入工作日嘅數量過輸入嘅寬度比例數量多,就多餘工作日將畀忽略並返回一條警告.
+ 此命令有一個可選參數,可令其後面添加嘅課程塊後移 \meta{intergal value} 個工作日. 可選參數嘅默認值為\cmd{1},即後移\cmd{1}個工作日.
+\end{function}
-\subsection{添加課程塊}
+\clearpage
-使用 \cs{course} 命令喺當前工作日添加課程塊. 此命令有兩個參數.
+\section{最小工作範例}
-\begin{example}
- \cs{course}\oarg{keyvals}\marg{class start number}\oarg{class end number}
-\end{example}
+此MWE建置嘅课程表有13行但系得前12行标注时间,课程表顶部共有五个工作日,工作日之间嘅宽度比例为$4:5:4:6:5$,键 \keys{\cmdmac~weeks} 嘅默认值畀赋为 \cmd{Weeks 1 - 16}. 添加咗註解同兩個課程塊.
-第一個可選參數接受下列鍵:\keys{color} \keys{subject} \keys{location} \keys{teacher} \keys{weeks}. 鍵 \keys{color} 嘅默認值為 \cmd{DarkSlateGray},鍵 \keys{weeks} 嘅默認值由命令 \cs{weeklist} 嘅第一個參數決定. 第二個同第三個強制參數勒分別為課程嘅開始同結束序號. \cs{course} 命令嘅用例如下
+\begin{framed}
+ \begin{verbatim}
+ \documentclass{litetable}
-\begin{Verbatim}
- \course [ color = DarkGreen, subject = listofitems,
- location = French, teacher = Christian Tellechea
- ] {10} {12}
-\end{Verbatim}
+ \begin{document}
-\begin{center}
- \noindent\fbox{
- \parbox{.96\linewidth}{
- 將此課程塊嘅顏色設置為 \cmd{DarkGreen},此課程名為 \cmd{listofitems},上堂地方為 \cmd{French},老師為 \cmd{Christian Tellechea},喺當日嘅第 \cmd{10} 節課開始,第 \cmd{12} 節課結束.
- }
+ \timelist[13]
+ {
+ 08:05 -> 08:50, 08:55 -> 09:40, 10:00 -> 10:45, 10:50 -> 11:35,
+ 11:40 -> 12:25, 13:30 -> 14:15, 14:20 -> 15:05, 15:15 -> 16:00,
+ 16:05 -> 16:50, 18:30 -> 19:15, 19:20 -> 20:05, 20:10 -> 20:55
+ }
+ \weeklist[Weeks 1 - 16]
+ {
+ Mon -> 4, Tue -> 5, Wed -> 4, Thu -> 6, Fri -> 5
}
-\end{center}
+ \more{Author: Mingyu Xia \& Lijun Guo}
+
+ \begin{tikzpicture}[remember picture, overlay]
+ \maketable
+ \course [ subject = Keep on {\TeX}ing
+ ] {10} {11}
+ \newday
+ \course [ color = DarkSlateGray, subject = litetable,
+ location = Hong Kong, teacher = M.Y. Xia
+ ] {8} {8}
+ \end{tikzpicture}
-\begin{itemize}
- \item 可通過 \cs{newday} 命令切換到落個工作日.
- \item 若課程塊嘅高度淨系得個單位,即$\marg{class start number} = \marg{class end number}$,就鍵 \keys{location} 同 \keys{teacher} 嘅值將輸出喺同一行並以逗號 (,) 隔,鍵 \cmd{weeks} 嘅值將唔會輸出.
- \item 若鍵 \keys{location} 同 \keys{teacher} 均未賦值,就鍵 \keys{subject} 嘅值將輸出喺課程塊嘅中心.
-\end{itemize}
+ \end{document}
+ \end{verbatim}
+\end{framed}
\includepdf[pages = 1]{litetable-demo.pdf}
diff --git a/macros/latex/contrib/litetable/tex/litetable.cls b/macros/latex/contrib/litetable/tex/litetable.cls
index a87d3cb9bd..caa7059a98 100644
--- a/macros/latex/contrib/litetable/tex/litetable.cls
+++ b/macros/latex/contrib/litetable/tex/litetable.cls
@@ -1,5 +1,5 @@
%% ***********************************************************
-%% Copyright 2024 by Mingyu XIA <xiamyphys@gmail.com> *
+%% Copyright 2024 by M.Y. XIA <xiamyphys@gmail.com> *
%% *
%% This work may be distributed and/or modified under *
%% the conditions of the LaTeX Project Public License *
@@ -11,410 +11,429 @@
%% *
%% This work has the LPPL maintenance status `maintained'. *
%% *
-%% The Current Maintainer of this work is Mingyu XIA. *
+%% The Current Maintainer of this work is M.Y. XIA. *
%% *
%% This work consists of the files litetable.cls, *
%% and README.md. *
%% available at https://github.com/xiamyphys/litetable *
%% ***********************************************************
-\ProvidesExplClass{litetable}{2024/09/25}{3.0B}{Course Schedule}
-
-\ExplSyntaxOff
+\ProvidesExplClass{litetable}{2024/09/30}{3.1A}{Course Schedule}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
+
\LoadClass{article}
+
\pagestyle{empty}
-\RequirePackage{listofitems,tikz,xcolor}
-\ignoreemptyitems\setsepchar{,/->}
-\usetikzlibrary{calc}
-\definecolor{darkergray}{HTML}{F4F6F8}% Blocks
+\RequirePackage{tikz}
+\definecolor{darkergray}{HTML}{F4F6F8}
-\ExplSyntaxOn
+% Module for texlive 2021 and later: by @ljguo
+\cs_if_exist:NF \clist_put_right:Ne
+{ \cs_generate_variant:Nn \clist_put_right:Nn { Ne } }
+\cs_if_exist:NF \clist_set:Ne
+{ \cs_generate_variant:Nn \clist_set:Nn { Ne } }
+\cs_if_exist:NT \clist_count:e
+{ \cs_generate_variant:Nn \clist_count:n { e } }
+\cs_if_exist:NF \exp_args:NNNe
+{
+ \cs_new:Npn \exp_args:NNNe #1#2#3#4
+ {
+ \exp_after:wN #1
+ \exp_after:wN #2
+ \exp_after:wN #3
+ \tex_expanded:D { {#4} }
+ }
+}
-\int_new:N \l_time_num_int
+% Module for left -> right data structure: by @ljguo
+\cs_new_protected_nopar:Npn \__litetable_get_left:nN #1#2
+{
+ \group_begin:
+ \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } { #1 }
+ \exp_args:NNNe \group_end: \tl_set:Nn #2
+ { \seq_item:Nn \l__litetable_tmpa_seq { 1 } }
+}
+\cs_new_protected_nopar:Npn \__litetable_get_right:nN #1#2
+{
+ \group_begin:
+ \seq_set_split:Nnn \l__litetable_tmpa_seq { -> } { #1 }
+ \exp_args:NNNe \group_end: \tl_set:Nn #2
+ { \seq_item:Nn \l__litetable_tmpa_seq { 2 } }
+}
+\cs_generate_variant:Nn \__litetable_get_left:nN { e }
+\cs_generate_variant:Nn \__litetable_get_right:nN { e }
+
+\int_new:N \l__time_num_int
\dim_new:N \l__time_vunit_dim
-\msg_new:nnn {litetable} {timelist}
-{\noexpand\timelist~extra~time~group(s)~were~ignored}
-\NewDocumentCommand{\timelist}{om}
+\cs_new_protected:Npn \litetable_msg_new:nn #1#2
+{ \msg_new:nnn { litetable} { #1 } { #2 } }
+\cs_new_protected:Npn \litetable_msg_warning:n #1
+{ \msg_warning:nn { litetable } { #1 } }
+\litetable_msg_new:nn { timelist }
+{ \exp_not:N \timelist~extra~time~group(s)~were~ignored }
+\cs_new_protected_nopar:Npn \litetable_timelist:nn #1#2
{
- \IfBlankTF{#2}
+ \clist_set:Nn \l__litetable_timelist_clist { #2 }
+ \tl_if_empty:nTF { #1 }
+ {
+ \int_set:Nn \l__time_num_int
{
- \int_set:Nn \l_time_num_int { #1 }
- \tl_clear:N \@timelist
- }{
- \readlist*\@timelist{#2}
- \IfNoValueTF{#1}
- {
- \int_set:Nn \l_time_num_int {\@timelistlen}
- }{
- \int_set:Nn \l_time_num_int { #1 }
- \int_compare:nNnT {\@timelistlen} > {#1}
- {
- \msg_warning:nn {litetable} {timelist}
- }
- }
+ \clist_count:N \l__litetable_timelist_clist
}
- \dim_set:Nn \l__time_vunit_dim
+ }
+ {
+ \int_set:Nn \l__time_num_int { #1 }
+ \int_compare:nNnTF { #1 } <
+ { \clist_count:N \l__litetable_timelist_clist }
{
- \fp_eval:n {1/(2*\l_time_num_int+3.5)}\paperheight
- }
+ \int_set:Nn \l__time_num_int
+ {
+ \clist_count:N \l__litetable_timelist_clist
+ }
+ \litetable_msg_warning:n { timelist }
+ } { \int_set:Nn \l__time_num_int { #1 } }
+ }
+ \dim_set:Nn \l__time_vunit_dim
+ {
+ \fp_eval:n {1/(2*\l__time_num_int+3.5)}\paperheight
+ }
}
+\NewDocumentCommand \timelist { O{} m O{} }
+{ \litetable_timelist:nn { #1#3 } { #2 } }
-\clist_new:N \l__week_ratios_clist
+\clist_new:N \l__week_ratio_clist
\clist_new:N \l__week_accum_clist
\int_new:N \l__week_num_int
\dim_new:N \l__week_hunit_dim
-\NewDocumentCommand{\weeklist}{om}
-{
- \IfValueT{ #1 }{\tl_set:Nn \l_weeks_tl { #1 }}
- \readlist*\@weeklist{#2}
- \int_step_inline:nn {\@weeklistlen}
+\cs_new_protected_nopar:Npn \litetable_weeklist:nn #1#2
+{
+ \tl_set:Nn \l__default_weeks_tl { #1 }
+ \clist_set:Nn \l__litetable_weeklist_clist { #2 }
+ \int_step_inline:nn
+ {
+ \clist_count:N \l__litetable_weeklist_clist
+ }
+ {
+ \__litetable_get_right:eN
+ {
+ \clist_item:Nn \l__litetable_weeklist_clist {##1}
+ } \l__litetable_tmpb_tl
+ \clist_put_right:Ne \l__week_ratio_clist
{
- \clist_put_right:Ne \l__week_ratios_clist
- {
- \@weeklist[##1,2]
- }
+ \l__litetable_tmpb_tl
}
- \int_step_inline:nn {\@weeklistlen}
+ }
+ \int_step_inline:nn
+ {
+ \clist_count:N \l__litetable_weeklist_clist
+ }
+ {
+ \clist_clear:N \l__week_accumtmp_clist
+ \int_step_inline:nn { ##1 }
{
- \clist_clear:N \l__week_accumtmp_clist
- \int_step_inline:nn { ##1 }
- {
- \clist_put_right:Ne \l__week_accumtmp_clist
- {
- \clist_item:Nn \l__week_ratios_clist { ####1 }
- }
- }
- \clist_put_right:Ne \l__week_accum_clist
- {
- \int_eval:n
- {
- \clist_use:Nn \l__week_accumtmp_clist { + }
- }
- }
+ \clist_put_right:Ne \l__week_accumtmp_clist
+ {
+ \clist_item:Nn \l__week_ratio_clist { ####1 }
+ }
}
- \int_set:Nn \l__week_num_int
+ \clist_put_right:Ne \l__week_accum_clist
{
- \clist_item:Nn \l__week_accum_clist
- {
- \@weeklistlen
- }
+ \int_eval:n { \clist_use:Nn \l__week_accumtmp_clist { + } }
}
- \dim_set:Nn \l__week_hunit_dim
+ }
+ \int_set:Nn \l__week_num_int
+ {
+ \clist_item:Nn \l__week_accum_clist
{
- \fp_eval:n {1/\l__week_num_int*14/15}\paperwidth
+ \clist_count:N \l__litetable_weeklist_clist
}
+ }
+ \dim_set:Nn \l__week_hunit_dim
+ {
+ \fp_eval:n {1/\l__week_num_int*14/15}\paperwidth
+ }
}
+\NewDocumentCommand \weeklist { O{} m O{} }
+{ \litetable_weeklist:nn { #1#3 } { #2 } }
+
+\NewDocumentCommand \more { m }
+{ \tl_set:Nn \l__litetable_comment_tl { #1 } }
-\int_new:N \l__week_day_int
-\newcommand{\newday}{\int_incr:N \l__week_day_int}
-\NewDocumentCommand{\maketable}{om}{
- % Gray Block at top
- \fill [ darkergray ] (current~page.north~west)
- rectangle + (\paperwidth,{-1.5*\l__time_vunit_dim})
- node [ midway, black, font = \huge\bfseries ] {#2};
- \IfValueT{#1}% Semester
+\int_new:N \l__litetable_week_day_int
+\int_set:Nn \l__litetable_week_day_int {1}
+\NewDocumentCommand \newday { O {1} }
+{ \int_add:Nn \l__litetable_week_day_int { #1 } }
+
+\cs_new_protected_nopar:Npn \litetable_maketable:nn #1#2
+{
+ % Darker Block at top
+ \fill [ darkergray ] (current~page.north~west)
+ rectangle + (\paperwidth,-1.5\l__time_vunit_dim)
+ node [ midway, black, font = \huge\bfseries ] {#1};
+ \tl_if_empty:nF { #2 }% Semester
+ {
+ \node [ shift = {(-.02\paperwidth,-.75\l__time_vunit_dim)},
+ left, rectangle, fill = DarkBlue!10,
+ text = DarkBlue!60, inner~sep = 2ex,
+ rounded~corners = 8pt, font = \large
+ ] at (current~page.north~east)
+ {\ensuremath\rightleftharpoons\ #2};
+ }
+ % Darker Blocks
+ \int_step_inline:nnnn {0} {2} {\l__time_num_int}
+ {
+ \filldraw [ fill = darkergray, draw = gray, thick,
+ densely~dashed, line~cap = round
+ ] ([shift = {(-.4pt,{\fp_eval:n {
+ -2*##1-2.5}\l__time_vunit_dim})
+ }]current~page.north~west) rectangle +
+ ({\paperwidth+.8pt},-2*\l__time_vunit_dim);
+ }
+ % Classes numbering
+ \clist_if_empty:NTF {\l__litetable_timelist_clist}
+ {
+ \int_step_inline:nn {\l__time_num_int}
{
- \node [ left, rectangle, fill = DarkBlue!10,
- text = DarkBlue!60, inner~sep = 2ex,
- rounded~corners = 8pt, font = \large
- ] at ($
- (current~page.north~east)+
- (-.02\paperwidth,-.75*\l__time_vunit_dim)
- $) {\ensuremath\rightleftharpoons\ #1};
+ \node [ shift = {(\paperwidth/30,{\fp_eval:n {
+ -2*##1-1.5}\l__time_vunit_dim})
+ }, darkgray!80, font = \large\ttfamily\bfseries
+ ] at (current~page.north~west) {##1};
}
- % Darker Blocks
- \int_step_inline:nnnn {0} {2} {\l_time_num_int} {
- \filldraw [ fill = darkergray, draw = gray, thick,
- densely~dashed, line~cap = round
- ] ([yshift = -2*##1*\l__time_vunit_dim]$
- (current~page.north~west)+(-.4pt,0)+
- (0,-2.5*\l__time_vunit_dim)
- $) rectangle + ($
- (\paperwidth,-2*\l__time_vunit_dim)+
- (.8pt,0)
- $);
+ }
+ {
+ \int_step_inline:nn {\l__time_num_int}
+ {
+ \node [ shift = {(\paperwidth/30,\fp_eval:n {
+ -2*##1-1}\l__time_vunit_dim)
+ }, darkgray!80, font = \large\ttfamily\bfseries
+ ] at (current~page.north~west) {##1};
}
- \tl_if_empty:NTF {\@timelist}% Classes numbering
+ % Classes time
+ \int_step_inline:nn
{
- \int_step_inline:nn {\l_time_num_int} {
- \node [ yshift = -2*##1*\l__time_vunit_dim,
- darkgray!80, font = \bfseries\large\ttfamily
- ] at ($
- (current~page.north~west)+
- (\paperwidth/30,-1.5*\l__time_vunit_dim)
- $) {##1};
- }
- }{
- \int_step_inline:nn {\l_time_num_int} {
- \node [ yshift = -2*##1*\l__time_vunit_dim,
- darkgray!80, font = \bfseries\large\ttfamily
- ] at ($
- (current~page.north~west)+
- (\paperwidth/30,-\l__time_vunit_dim)
- $) {##1};
- }
- % Classes time
- \int_step_inline:nn {\@timelistlen} {
- \node [ yshift = -2*##1*\l__time_vunit_dim,
- gray, font = \ttfamily ,align = center]
- at ($
- (current~page.north~west)+
- (\paperwidth/30,-1.9*\l__time_vunit_dim)
- $) {\@timelist[##1,1]\\\@timelist[##1,2]};
- }
+ \clist_count:N \l__litetable_timelist_clist
}
- % Weekdays
- \int_step_inline:nn {\@weeklistlen}
{
- \node [ font = \large\bfseries,
- xshift = \clist_item:Nn \l__week_accum_clist {##1}/
- \l__week_num_int*14/15*\paperwidth
- ]
- at ($
- (current~page.north~west)-
- (\fp_eval:n {(
- \clist_item:Nn
- \l__week_ratios_clist { ##1 }
- /2)/\l__week_num_int*14/15-1/15
- }*\paperwidth,2*\l__time_vunit_dim)
- $) {\@weeklist[##1,1]};
+ \__litetable_get_left:eN
+ {
+ \clist_item:Nn \l__litetable_timelist_clist {##1}
+ } \l__litetable_tmpa_tl
+ \__litetable_get_right:eN
+ {
+ \clist_item:Nn \l__litetable_timelist_clist {##1}
+ } \l__litetable_tmpb_tl
+ \node [ shift = {(\paperwidth/30,\fp_eval:n {
+ -1.9-2*##1}\l__time_vunit_dim)
+ }, gray, font = \ttfamily ,align = center
+ ] at (current~page.north~west)
+ {\l__litetable_tmpa_tl\\\l__litetable_tmpb_tl};
}
+ }
+ % Weekdays
+ \int_step_inline:nn
+ {
+ \clist_count:N \l__litetable_weeklist_clist
+ }
+ {
+ \__litetable_get_left:eN
+ {
+ \clist_item:Nn \l__litetable_weeklist_clist {##1}
+ } \l__litetable_tmpa_tl
+ \node [ font = \large\bfseries,
+ shift = {({\fp_eval:n {
+ (\clist_item:Nn \l__week_accum_clist {##1}
+ -\clist_item:Nn \l__week_ratio_clist {##1}/2)/
+ \l__week_num_int*14/15+1/15}\paperwidth},
+ -2\l__time_vunit_dim)}
+ ] at (current~page.north~west)
+ { \l__litetable_tmpa_tl };
+ }
+ % Comment
+ \cs_if_exist:NT \l__litetable_comment_tl
+ {
+ \node [ yshift = .5*\l__time_vunit_dim,
+ left = 1ex, darkgray, font = \small\bfseries
+ ] at (current~page.south~east)
+ { \l__litetable_comment_tl };
+ }
+ \tl_gclear:N \l__litetable_comment_tl
}
+\NewDocumentCommand \maketable { O{} m O{} }
+{ \litetable_maketable:nn { #2 } { #1#3 } }
-\keys_define:nn{course}{
- color.tl_set:N = \l_color_tl,
- color.initial:n = teal,
- subject.tl_set:N = \l_subject_tl,
- teacher.tl_set:N = \l_teacher_tl,
- location.tl_set:N = \l_location_tl,
- weeks.tl_set:N = \l_weeks_tl,
- weeks.initial:n = \l_weeks_tl,
+\keys_define:nn { litetable / course }
+{
+ color.tl_set:N = \l__course_color_tl,
+ color.initial:n = teal,
+ subject.tl_set:N = \l__course_subject_tl,
+ teacher.tl_set:N = \l__course_teacher_tl,
+ location.tl_set:N = \l__course_location_tl,
+ weeks.tl_set:N = \l__default_weeks_tl,
+ weeks.initial:n = \l__default_weeks_tl,
}
\dim_new:N \l__course_infoshift_dim
-\NewDocumentCommand{\course}{O{}mm}
+\cs_new_protected_nopar:Npn \__litetable_course_block_aux:nn #1#2
{
- \group_begin:
- \keys_set:nn { course } { #1 }
- % Course block fg
- \fill [ \l_color_tl!60, rounded~corners = 8pt ] ($
- (current~page.north~west)+(.4pt,-.4pt)+
- (\fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }-
- \clist_item:Nn \l__week_ratios_clist
- {
- \l__week_day_int
- }
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-.5-2*#2}*\l__time_vunit_dim)
- $) rectangle ($
- (current~page.north~west)+(-.4pt,.4pt)+
- (\clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
- $);
- % Course block bg
- \fill [ \l_color_tl!10 ] ($
- (current~page.north~west)+(1.2pt,-.4pt)+
- (\fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }-
- \clist_item:Nn \l__week_ratios_clist
- {
- \l__week_day_int
- }
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-1-2*#2}*\l__time_vunit_dim)
- $) -- ($
- (current~page.north~west)+(-1.2pt,-.4pt)+
- (\clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-1-2*#2}*\l__time_vunit_dim)
- $) {[rounded~corners = 7.2pt] -- ($
- (current~page.north~west)+(-1.2pt,1.2pt)+
- (\clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
- $) -- ($
- (current~page.north~west)+(1.2pt,1.2pt)+
- (\fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }-
- \clist_item:Nn \l__week_ratios_clist
- {
- \l__week_day_int
- }
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
- $)} -- cycle;
- % Course info
- \tl_if_eq:NNTF {#2} {#3}% Single-unit height course block
+ % Course block fg
+ \begin{scope}
+ \clip [ preaction = {draw, ultra~thick, \l__course_color_tl!60},
+ preaction = {fill, \l__course_color_tl!10},
+ rounded~corners = 8pt ]
+ ([shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}
+ }\l__week_hunit_dim+\paperwidth/15+1.2pt,
+ \fp_eval:n {-.5-2*#1}\l__time_vunit_dim-1.2pt)
+ }]current~page.north~west) rectangle +
+ (\clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}\l__week_hunit_dim-2.4pt,
+ \fp_eval:n {2*(#1-#2-1)}\l__time_vunit_dim+2.4pt);
+ % Course block bg
+ \fill [ \l__course_color_tl!60 ]
+ ([shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-.5-2*#1}\l__time_vunit_dim)
+ }]current~page.north~west) rectangle +
+ (\clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}\l__week_hunit_dim,
+ -.5*\l__time_vunit_dim);
+ \end{scope}
+ % Course info
+ \tl_if_eq:NNTF {#1} {#2}% Single-unit height course block
+ {
+ \bool_if:nTF
+ {
+ \tl_if_empty_p:N \l__course_location_tl &&
+ \tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {\tl_set:Nn \l_shortcourse_anchor_tl { }}
+ {\tl_set:Nn \l_shortcourse_anchor_tl { above }}
+ \cs_if_exist:NT {\l__course_subject_tl }
{
- \bool_if:nTF
- {
- \tl_if_empty_p:N \l_location_tl &&
- \tl_if_empty_p:N \l_teacher_tl
- }{
- \tl_set:Nn \l_shortcourse_anchor_tl { }
- }{
- \tl_set:Nn \l_shortcourse_anchor_tl { above }
- }
- \cs_if_exist:NT {\l_subject_tl }
- {
- \node [ \l_shortcourse_anchor_tl,
- \l_color_tl!60, align = center,
- font = \large\bfseries ]
- at ($
- (current~page.north~west)+
- (\fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }-
- \clist_item:Nn \l__week_ratios_clist
- {
- \l__week_day_int
- }/2
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-1.75-#2-#3}*\l__time_vunit_dim)
- $) { \l_subject_tl };
- }
- \bool_if:nTF
- {
- !\tl_if_empty_p:N \l_location_tl &&
- !\tl_if_empty_p:N \l_teacher_tl
- }{
- \tl_set:Nn \l_shortcourse_sep_tl { ,~ }
- }{
- \tl_set:Nn \l_shortcourse_sep_tl { }
- }
- \node [ below, \l_color_tl!60, align = center ]
- at ($
- (current~page.north~west)+
- (\fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }-
- \clist_item:Nn \l__week_ratios_clist
- {
- \l__week_day_int
- }/2
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-1.75-#2-#3}*\l__time_vunit_dim)
- $) {
- \tl_if_exist:NT
- { \l_location_tl } { \l_location_tl }
- \l_shortcourse_sep_tl
- \tl_if_exist:NT
- { \l_teacher_tl } { \l_teacher_tl }
- };
- }{
- \bool_if:nTF% Multiply-unit height course block
- {
- \tl_if_empty_p:N \l_location_tl &&
- \tl_if_empty_p:N \l_teacher_tl
- }{
- \tl_set:Nn \l_course_anchor_tl {}
- \dim_set:Nn \l__course_infoshift_dim { 0pt }
- }{
- \tl_set:Nn \l_course_anchor_tl { above }
- \dim_set:Nn \l__course_infoshift_dim
- {
- .125\l__time_vunit_dim
- }
- }
- \cs_if_exist:NT { \l_subject_tl }
- {
- \node [ \l_course_anchor_tl,
- yshift = \l__course_infoshift_dim,
- \l_color_tl!60, align = center,
- font = \large\bfseries
- ] at ($
- (current~page.north~west)+
- (\fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }-
- \clist_item:Nn \l__week_ratios_clist
- {
- \l__week_day_int
- }/2
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-1.5-#2-#3}*\l__time_vunit_dim)
- $) { \l_subject_tl };
- }
- \bool_if:nTF
- {
- !\tl_if_empty_p:N \l_location_tl &&
- !\tl_if_empty_p:N \l_teacher_tl
- }{
- \tl_set:Nn \l_courseinfo_sep_tl { \\ }
- }{
- \tl_set:Nn \l_courseinfo_sep_tl { }
- }
- \node [ below, \l_color_tl!60, align = center ]
- at ($
- (current~page.north~west)+
- (\fp_eval:n
- {
- \clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }-
- \clist_item:Nn \l__week_ratios_clist
- {
- \l__week_day_int
- }/2
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-1.625-#2-#3}*\l__time_vunit_dim)
- $) {
- \tl_if_exist:NT
- { \l_location_tl } { \l_location_tl }
- \l_courseinfo_sep_tl
- \tl_if_exist:NT
- { \l_teacher_tl } { \l_teacher_tl }
- };
- \node [ above~left, \l_color_tl!60, outer~sep = .5ex ]
- at ($
- (current~page.north~west)+
- (\clist_item:Nn \l__week_accum_clist
- {
- \l__week_day_int
- }*\l__week_hunit_dim+\paperwidth/15,
- \fp_eval:n {-2.5-2*#3}*\l__time_vunit_dim)
- $) { \l_weeks_tl };
+ \node [ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.75-#1-#2}\l__time_vunit_dim)},
+ \l_shortcourse_anchor_tl, \l__course_color_tl!60,
+ align = center, font = \large\bfseries
+ ] at (current~page.north~west)
+ { \l__course_subject_tl };
}
- \group_end:
+ \bool_if:nTF
+ {
+ !\tl_if_empty_p:N \l__course_location_tl &&
+ !\tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {\tl_set:Nn \l_shortcourse_sep_tl { ,~ }}
+ {\tl_set:Nn \l_shortcourse_sep_tl { }}
+ \node [ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.75-#1-#2}\l__time_vunit_dim)},
+ below, \l__course_color_tl!60, align = center
+ ] at (current~page.north~west)
+ {
+ \tl_if_exist:NT { \l__course_location_tl }
+ { \l__course_location_tl }
+ \l_shortcourse_sep_tl
+ \tl_if_exist:NT { \l__course_teacher_tl }
+ { \l__course_teacher_tl }
+ };
+ }
+ {
+ \bool_if:nTF% Multiply-unit height course block
+ {
+ \tl_if_empty_p:N \l__course_location_tl &&
+ \tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {
+ \tl_set:Nn \l_course_anchor_tl {}
+ \dim_set:Nn \l__course_infoshift_dim { 0pt }
+ }
+ {
+ \tl_set:Nn \l_course_anchor_tl { above }
+ \dim_set:Nn \l__course_infoshift_dim { \l__time_vunit_dim/8 }
+ }
+ \cs_if_exist:NT { \l__course_subject_tl }
+ {
+ \node [ font = \large\bfseries, \l_course_anchor_tl,
+ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int }/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.5-#1-#2}\l__time_vunit_dim)},
+ yshift = \l__course_infoshift_dim,
+ \l__course_color_tl!60, align = center,
+ ] at (current~page.north~west)
+ { \l__course_subject_tl };
+ }
+ \bool_if:nTF
+ {
+ !\tl_if_empty_p:N \l__course_location_tl &&
+ !\tl_if_empty_p:N \l__course_teacher_tl
+ }
+ {
+ \tl_set:Nn \l_courseinfo_sep_tl { \\ }
+ }
+ {
+ \tl_set:Nn \l_courseinfo_sep_tl { }
+ }
+ \node [ below, \l__course_color_tl!60, align = center,
+ shift = {(\fp_eval:n {
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}-
+ \clist_item:Nn \l__week_ratio_clist
+ {\l__litetable_week_day_int}/2
+ }\l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-1.625-#1-#2}\l__time_vunit_dim
+ )}] at (current~page.north~west)
+ {
+ \tl_if_exist:NT { \l__course_location_tl }
+ { \l__course_location_tl }
+ \l_courseinfo_sep_tl
+ \tl_if_exist:NT { \l__course_teacher_tl }
+ { \l__course_teacher_tl }
+ };
+ \node [ above~left, \l__course_color_tl!60, outer~sep = .5ex,
+ shift = {(
+ \clist_item:Nn \l__week_accum_clist
+ {\l__litetable_week_day_int}
+ \l__week_hunit_dim+\paperwidth/15,
+ \fp_eval:n {-2.5-2*#2}\l__time_vunit_dim
+ )}] at (current~page.north~west) { \l__default_weeks_tl };
+ }
}
-
-\newcommand{\more}[1]% Additional info
-{
- \node [ left = 1ex, darkgray, font = \small\bfseries ]
- at ($
- (current~page.south~east)+(0,.5*\l__time_vunit_dim)
- $) {#1};
+\litetable_msg_new:nn { course }
+{ \exp_not:N \course~block(s)~exceed~workdays~were~ignored }
+\NewDocumentCommand \course { O{} m m }
+{
+ \group_begin:
+ \int_compare:nNnTF {\l__litetable_week_day_int-1} <
+ {\clist_count:N \l__litetable_weeklist_clist}
+ {
+ \keys_set:nn { litetable / course } { #1 }
+ \__litetable_course_block_aux:nn { #2 } { #3 }
+ }{
+ \litetable_msg_warning:n { course }
+ }
+ \group_end:
}
-\endinput \ No newline at end of file
+\endinput
+
+% End of file litetable.cls \ No newline at end of file
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
index 4bf4794746..4a558b98fb 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
index 93babe5651..4be7d7fac3 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
index f898d469ff..986283a9d5 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
index d6d43486b5..fe89538394 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
index 40bccc9b27..b9c29679d4 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
index 7db7d77fe6..81718e2d11 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
index 2f374cf5d9..ba209d6036 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
index 4b4c646f2c..856c4cd135 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
index 05d130a2e2..ad0c890ad0 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
index 71d98254ab..94600e8487 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
index c15ecd972a..440c2a3007 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
index 628b9d8129..4d701b7694 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
index 44004b5ff7..99f5ef9490 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
index 80c963349a..d9ad3802f7 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
index b8e89680ca..ddcb4d6afe 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
index 4268bec5a6..d5996aa000 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
index bdc046cad5..0b2c81696d 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
index 4bce5b95e6..7a05279fa0 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
index b917bf3559..29e450f72a 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 94d43ec98a..bfc2c8dbd0 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,13 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.3.22] - 2024-09-30
+
+### Fixed
+- Automatically set `unit-font-command` with `beamer` only when the user has
+ not manually adjusted (see issue
+ [\#748](https://github.com/josephwright/siunitx/issues/748))
+
## [v3.3.21] - 2024-08-20
### Fixed
@@ -2136,7 +2143,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.21...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.22...HEAD
+[v3.3.22]: https://github.com/josephwright/siunitx/compare/v3.3.21...v3.3.22
[v3.3.21]: https://github.com/josephwright/siunitx/compare/v3.3.20...v3.3.21
[v3.3.20]: https://github.com/josephwright/siunitx/compare/v3.3.19...v3.3.20
[v3.3.19]: https://github.com/josephwright/siunitx/compare/v3.3.18...v3.3.19
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index bef1e6afe6..cc2cd36afd 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-compound.dtx b/macros/latex/contrib/siunitx/siunitx-compound.dtx
index ec5a680516..6bca9a8417 100644
--- a/macros/latex/contrib/siunitx/siunitx-compound.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-compound.dtx
@@ -871,7 +871,6 @@
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\@@_print:N}
% \begin{macro}{\@@_print:nnN, \@@_print:nVN, \@@_print:enN, \@@_print:eeN}
diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index 4a7e2eb705..0cc2245559 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -4757,6 +4757,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Miscellaneous tools}
%
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 7faf5740da..6c440b8fd6 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -2997,7 +2997,10 @@
\str_if_eq:eeT
{ \exp_not:o { \familydefault } }
{ \exp_not:n { \sfdefault } }
- { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }
+ {
+ \tl_if_eq:VnT \l_siunitx_unit_font_tl { \mathrm }
+ { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }
+ }
}
{ }
}
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index eda108df6d..11bce0caf9 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -124,7 +124,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2024-08-20} {3.3.21}
+\ProvidesExplPackage {siunitx} {2024-09-30} {3.3.22}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 3454497b6f..4dd0e88018 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/README.md b/macros/latex/contrib/ucph-revy/README.md
index 3b0e47a0a4..d2b6baed04 100644
--- a/macros/latex/contrib/ucph-revy/README.md
+++ b/macros/latex/contrib/ucph-revy/README.md
@@ -1,6 +1,6 @@
Package ucph-revy
=================
-v1.0.1
+v1.0.2
A class for typesetting scripts, containing both lyrics and prose, in
the style used by the student revues (revy) at the Faculties of
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf
index 5b9426a4f3..1080060964 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf
index 8f252d20ff..d040dacefe 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf
index 3d09e9a2be..784e1235ca 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf
index 68c51ca12d..d2baff1111 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf
+++ b/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/ucph-revy/ucph-revy.dtx b/macros/latex/contrib/ucph-revy/ucph-revy.dtx
index 79a9a1aa0b..9fdb39549e 100644
--- a/macros/latex/contrib/ucph-revy/ucph-revy.dtx
+++ b/macros/latex/contrib/ucph-revy/ucph-revy.dtx
@@ -20,7 +20,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<class>\ProvidesClass{ucph-revy}
%<*class>
- [2024/02/07 v1.0.1 Fix occational divide by 0]
+ [2024/09/24 v1.0.2 A class for making musical manuscripts]
%</class>
%<*driver>
\documentclass[a4paper]{ltxdoc}
@@ -372,7 +372,7 @@
% betyder bliver gennemgået i sektion \ref{thumbindex}.
% \end{danish}
% \begin{english}
-% \cn\ inherits from the \texttt{article}\DescribeMacro{article}
+% \cn\ inherits from the \texttt{article}\DescribeMacro{article}\
% class, and accepts all its options. It sets \texttt{a4paper} and
% \texttt{11pt} by default, if not given any contrary options.
%
@@ -470,13 +470,14 @@
% \end{implementation}
%
% \begin{danish}
+% \changes{v1.0.2}{2024/09/24}{Skift fontenc til OT1}
% I eksemplet inkluderer vi fire pakker. De er ikke strengt
% nødvendige for at få \cn\ til at fungere, men de kommer næsten med
% sikkerhed til at gøre dit liv lettere.
%
% \medskip\noindent\begin{tabulary}{\textwidth}{lL}
% \verb|\usepackage[utf8]{inputenc}| & \\
-% \verb|\usepackage[T1]{fontenc}| &
+% \verb|\usepackage[OT1]{fontenc}| &
% Gør \LaTeX's håndtering af danske bogstaver mere moderne. \\
% \verb|\usepackage[danish]{babel}| &
% Fortæller \LaTeX\ en masse ting om dansk, bl.a. hvordan
@@ -490,13 +491,14 @@
% \end{tabulary}
% \end{danish}
% \begin{english}
+% \changes{v1.0.2}{2024/09/24}{Change fontenc to OT1}
% In the example, we've included three packages that aren't strictly
% necessary for \cn\ to function, but will probably make your life
% easier.
%
% \medskip\noindent\begin{tabulary}{\textwidth}{lL}
% \verb|\usepackage[utf8]{inputenc}| & \\
-% \verb|\usepackage[T1]{fontenc}| &
+% \verb|\usepackage[OT1]{fontenc}| &
% Modernize \LaTeX's handling of (particularly special)
% characters.\\
% \verb|\usepackage{hyperref}| &
@@ -700,23 +702,24 @@
% \begin{danish}
% For at sammenligningen kan fungere, er vi afhængige af, at
% tekstrepræsentationen ikke skifter undervejs. Det kan ske, hvis
-% \verb|.tex|--filen kalder \textsf{fontenc}, og titlerne
-% indeholder specialtegn. Den simple og effektive\footnote{Læs:
-% det er et hack, som ikke har givet mig problemer \emph{endnu}.}
-% løsning er bare at kalde \textsf{fontenc} selv, så der ikke er
-% plads til misforståelser.
+% \verb|.tex|--filen kalder
+% \DescribeMacro{fontenc}\textsf{fontenc}, og titlerne indeholder
+% specialtegn. Den simple og effektive\footnote{Læs: det er et
+% hack, som ikke har givet mig problemer \emph{endnu}.} løsning
+% er bare at kalde \textsf{fontenc} selv, så der ikke er plads til
+% misforståelser.
% \end{danish}
% \begin{english}
% For this comparing of titles to work, we depend of the text
% representation not changing between the \verb|\title|
% declaration and the time when the thumb index routine runs. It
-% might, though, if \textsf{fontenc} is called. To quickly knock
-% that problem on the head,\footnote{In a way that hasn't come
-% back to bite \emph{me} yet.} we'll just call \textsf{fontenc}
-% ourselves.
+% might, though, if \DescribeMacro{fontenc}\textsf{fontenc} is
+% called. To quickly knock that problem on the head,\footnote{In a
+% way that hasn't come back to bite \emph{me} yet.} we'll just
+% call \textsf{fontenc} ourselves.
% \end{english}
% \begin{macrocode}
- \RequirePackage[T1]{fontenc}
+ \RequirePackage[OT1]{fontenc}
% \end{macrocode}
%
% \begin{danish}
@@ -2927,22 +2930,51 @@
}{}
% \end{macrocode}
% \end{implementation}
+%
+% \begin{danish}
+% \subsection{Assorterede emner}
+% \subsubsection{\SaTyR}
+% \end{danish}
+% \begin{english}
+% \subsection{Miscellenia}
+% \subsubsection{\SaTyR}
+% \end{english}
+% \begin{macro}{\SaTyR}
+% \begin{danish}
+% \changes{v1.0.2}{2024/09/24}{SaTyR-makro}
+% Man skriver \SaTyR{}Revy ved at elske alle dyr, og derefter
+% skrive
+% \end{danish}
+% \begin{english}
+% \changes{v1.0.2}{2024/09/24}{SaTyR-macro}
+% \SaTyR{}Revy, which is produced by the students at the Faculty
+% of Science at the University of Copenhagen, is properly written
+% by saying
+% \end{english}
+% \begin{verbatim}
+%\SaTyR{}Revy
+% \end{verbatim}
+% \begin{implementation}
+% \begin{macrocode}
+\newcommand{\SaTyR}{S\hspace*{-.2ex}\raisebox{-.15em}{A}\hspace*{-.5ex}TyR}
+% \end{macrocode}
+% \end{implementation}
+% \end{macro}
% \iffalse
%<*driver>
\jump
%</driver>
% \fi
-%
% \begin{implementation}
-% \begin{danish}
-% \subsection{\texttt{.aux}--filen}
+% \begin{danish}
+% \subsubsection{\texttt{.aux}--filen}
% Til fremtidigt brug sørger vi for, at vores metadata også bliver
% skrevet ud til \texttt{.aux}--filen, når dokumentet er færdigt.
%
% Det er også her, vi sætter en \texttt{label} på den sidste side.
% \end{danish}
% \begin{english}
-% \subsection{The \texttt{.aux} file}
+% \subsubsection{The \texttt{.aux} file}
% For futue use, we will also ensure that our metadata is written
% to the \texttt{.aux} file at the end of the document.
%
@@ -2986,11 +3018,13 @@
% \end{implementation}
% \begin{danish}
% \section{Komplet eksempel}
+% \changes{v1.0.2}{2024/09/24}{Tilpasninger i eksempelfil}
% \label{fullex}
% \VerbatimInput{Eksempel.tex}
% \end{danish}
% \begin{english}
% \section{Complete example}
+% \changes{v1.0.2}{2024/09/24}{Minor adjustments in example file}
% \label{fullex}
% \VerbatimInput{Example.tex}
% \end{english}
@@ -3001,7 +3035,7 @@
\documentclass{ucph-revy}
\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
+\usepackage[OT1]{fontenc}
\usepackage[danish]{babel}
\usepackage{hyperref}
%<*driver>
@@ -3011,6 +3045,7 @@
\urlstyle{sf}
\version{1.0}
+%% følgende definitioner kan godt fjernes, hvis der ikke er brug for dem:
\revyname{FysikRevy\texttrademark}
\revyyear{2019}
\status{eksempel}
@@ -3033,6 +3068,7 @@
\role{I} Vred instruktør
\role{A9}[A--ni] Anine
\end{roles}
+%% props-miljøet kan fjernes, hvis der ikke er brug for det
\begin{props}
\prop{Hedegaard--hår}[Person, der skaffer]
\prop{Didgeridoo}[Anine]
@@ -3139,7 +3175,7 @@
\documentclass{ucph-revy}
\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
+\usepackage[OT1]{fontenc}
\usepackage{hyperref}
%<*driver>
\land
@@ -3148,6 +3184,7 @@
\urlstyle{sf}
\version{1.0}
+%% The settings below may be omitted if their inclusion is undesired
\revyname{The Meaning of Liff}
\revyyear{3001}
\title{Example}
@@ -3185,6 +3222,7 @@
\role{CC}[Eric] Crucified Criminal
\role{B}[Graham] Brian
\end{roles}
+%% The props environment may be omitted if found to be superfluous
\propname{Props:}
\begin{props}
\prop{Large sign}
diff --git a/macros/latex/contrib/zref-clever/CHANGELOG.md b/macros/latex/contrib/zref-clever/CHANGELOG.md
index 80b15591be..9b2d8e2c2c 100644
--- a/macros/latex/contrib/zref-clever/CHANGELOG.md
+++ b/macros/latex/contrib/zref-clever/CHANGELOG.md
@@ -1,6 +1,11 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.6...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.4.7...HEAD)
+
+## [v0.4.7](https://github.com/gusbrs/zref-clever/compare/v0.4.6...v0.4.7) (2024-09-30)
+
+### Changed
+- Inhibit missing name warning if `noname` option is in use.
## [v0.4.6](https://github.com/gusbrs/zref-clever/compare/v0.4.5...v0.4.6) (2024-08-23)
diff --git a/macros/latex/contrib/zref-clever/zref-clever-code.pdf b/macros/latex/contrib/zref-clever/zref-clever-code.pdf
index 4dc41ff5a8..a3885ad3d6 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-code.pdf
+++ b/macros/latex/contrib/zref-clever/zref-clever-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-clever/zref-clever-doc.pdf b/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
index e6c24bc473..78cc9f7d60 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
+++ b/macros/latex/contrib/zref-clever/zref-clever-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-clever/zref-clever-doc.tex b/macros/latex/contrib/zref-clever/zref-clever-doc.tex
index 7b8e27a15b..b91cceb551 100644
--- a/macros/latex/contrib/zref-clever/zref-clever-doc.tex
+++ b/macros/latex/contrib/zref-clever/zref-clever-doc.tex
@@ -2332,6 +2332,13 @@ handling. These are just the ones for which some special treatment was
required. Of course, this effort is bound to be incomplete (see
\zcref{sec:limitations}).
+Note that settings performed by the compatibility modules require special care
+if they are to be changed by users. Since the modules depend on what has been
+loaded or not in the document, the settings are done at
+\texttt{begindocument}. Hence, to override a setting performed by a
+compatibility module, the user must ensure their change comes after that,
+e.g.\ by adding their setting to the \texttt{begindocument} hook.
+
The purpose of outlining to some extend what the compatibility modules do is
twofold. First, some of them require usage adjustments for label setting,
which must be somehow conveyed in this documentation. Second, the kind and
diff --git a/macros/latex/contrib/zref-clever/zref-clever.dtx b/macros/latex/contrib/zref-clever/zref-clever.dtx
index 155d7141ee..2a35b27d48 100644
--- a/macros/latex/contrib/zref-clever/zref-clever.dtx
+++ b/macros/latex/contrib/zref-clever/zref-clever.dtx
@@ -171,7 +171,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-clever} {2024-08-23} {0.4.6}
+\ProvidesExplPackage {zref-clever} {2024-09-30} {0.4.7}
{Clever LaTeX cross-references based on zref}
% \end{macrocode}
%
@@ -7253,251 +7253,269 @@
%
% \begin{macro}{\@@_type_name_setup:}
% Auxiliary function to \cs{@@_typeset_refs_last_of_type:}. It is
-% responsible for setting the type name variable \cs{l_@@_type_name_tl} and
-% \cs{l_@@_name_in_link_bool}. If a type name can't be found,
-% \cs{l_@@_type_name_tl} is cleared. The function takes no arguments, but
-% is expected to be called in \cs{@@_typeset_refs_last_of_type:} right
-% before \cs{@@_get_ref_first:}, which is the main consumer of the variables
-% it sets, though not the only one (and hence this cannot be moved into
-% \cs{@@_get_ref_first:} itself). It also expects a number of relevant
-% variables to have been appropriately set, and which it uses, prominently
-% \cs{l_@@_type_first_label_type_tl}, but also the queue itself in
-% \cs{l_@@_typeset_queue_curr_tl}, which should be ``ready except for the
-% first label'', and the type counter \cs{l_@@_type_count_int}.
+% responsible for setting the type name variable \cs{l_@@_type_name_tl},
+% \cs{l_@@_name_in_link_bool}, and \cs{l_@@_type_name_missing_bool}. If a
+% type name can't be found, \cs{l_@@_type_name_tl} is cleared. The function
+% takes no arguments, but is expected to be called in
+% \cs{@@_typeset_refs_last_of_type:} right before \cs{@@_get_ref_first:},
+% which is the main consumer of the variables it sets, though not the only
+% one (and hence this cannot be moved into \cs{@@_get_ref_first:} itself).
+% It also expects a number of relevant variables to have been appropriately
+% set, and which it uses, prominently \cs{l_@@_type_first_label_type_tl},
+% but also the queue itself in \cs{l_@@_typeset_queue_curr_tl}, which should
+% be ``ready except for the first label'', and the type counter
+% \cs{l_@@_type_count_int}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_type_name_setup:
{
- \zref@ifrefundefined { \l_@@_type_first_label_tl }
+ \bool_if:nTF
+ { \l_@@_typeset_ref_bool && ! \l_@@_typeset_name_bool }
{
+ % `typeset=ref' / `noname' option
+ % Probably redundant, since in this case the type name is not being
+ % typeset. But, for completeness sake:
\tl_clear:N \l_@@_type_name_tl
+ \bool_set_false:N \l_@@_name_in_link_bool
\bool_set_true:N \l_@@_type_name_missing_bool
}
{
- \tl_if_eq:NnTF
- \l_@@_type_first_label_type_tl { zc@missingtype }
+ \zref@ifrefundefined { \l_@@_type_first_label_tl }
{
\tl_clear:N \l_@@_type_name_tl
\bool_set_true:N \l_@@_type_name_missing_bool
}
{
- % Determine whether we should use capitalization, abbreviation,
- % and plural.
- \bool_lazy_or:nnTF
- { \l_@@_cap_bool }
- {
- \l_@@_capfirst_bool &&
- \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
- }
- { \tl_set:Nn \l_@@_name_format_tl {Name} }
- { \tl_set:Nn \l_@@_name_format_tl {name} }
- % If the queue is empty, we have a singular, otherwise, plural.
- \tl_if_empty:NTF \l_@@_typeset_queue_curr_tl
- { \tl_put_right:Nn \l_@@_name_format_tl { -sg } }
- { \tl_put_right:Nn \l_@@_name_format_tl { -pl } }
- \bool_lazy_and:nnTF
- { \l_@@_abbrev_bool }
+ \tl_if_eq:NnTF
+ \l_@@_type_first_label_type_tl { zc@missingtype }
{
- ! \int_compare_p:nNn
- { \l_@@_type_count_int } = { 0 } ||
- ! \l_@@_noabbrev_first_bool
+ \tl_clear:N \l_@@_type_name_tl
+ \bool_set_true:N \l_@@_type_name_missing_bool
}
{
- \tl_set:NV \l_@@_name_format_fallback_tl
- \l_@@_name_format_tl
- \tl_put_right:Nn \l_@@_name_format_tl { -ab }
- }
- { \tl_clear:N \l_@@_name_format_fallback_tl }
-
- % Handle number and gender nudges.
- \bool_if:NT \l_@@_nudge_enabled_bool
- {
- \bool_if:NTF \l_@@_nudge_singular_bool
+ % Determine whether we should use capitalization,
+ % abbreviation, and plural.
+ \bool_lazy_or:nnTF
+ { \l_@@_cap_bool }
{
- \tl_if_empty:NF \l_@@_typeset_queue_curr_tl
- {
- \msg_warning:nne { zref-clever }
- { nudge-plural-when-sg }
- { \l_@@_type_first_label_type_tl }
- }
+ \l_@@_capfirst_bool &&
+ \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
}
+ { \tl_set:Nn \l_@@_name_format_tl {Name} }
+ { \tl_set:Nn \l_@@_name_format_tl {name} }
+ % If the queue is empty, we have a singular, otherwise,
+ % plural.
+ \tl_if_empty:NTF \l_@@_typeset_queue_curr_tl
+ { \tl_put_right:Nn \l_@@_name_format_tl { -sg } }
+ { \tl_put_right:Nn \l_@@_name_format_tl { -pl } }
+ \bool_lazy_and:nnTF
+ { \l_@@_abbrev_bool }
{
- \bool_lazy_all:nT
- {
- { \l_@@_nudge_comptosing_bool }
- { \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl }
- {
- \int_compare_p:nNn
- { \l_@@_label_count_int } > { 0 }
- }
- }
- {
- \msg_warning:nne { zref-clever }
- { nudge-comptosing }
- { \l_@@_type_first_label_type_tl }
- }
+ ! \int_compare_p:nNn
+ { \l_@@_type_count_int } = { 0 } ||
+ ! \l_@@_noabbrev_first_bool
}
- \bool_lazy_and:nnT
- { \l_@@_nudge_gender_bool }
- { ! \tl_if_empty_p:N \l_@@_ref_gender_tl }
{
- \@@_get_rf_opt_seq:neeN { gender }
- { \l_@@_type_first_label_type_tl }
- { \l_@@_ref_language_tl }
- \l_@@_type_name_gender_seq
- \seq_if_in:NVF
- \l_@@_type_name_gender_seq
- \l_@@_ref_gender_tl
+ \tl_set:NV \l_@@_name_format_fallback_tl
+ \l_@@_name_format_tl
+ \tl_put_right:Nn \l_@@_name_format_tl { -ab }
+ }
+ { \tl_clear:N \l_@@_name_format_fallback_tl }
+
+ % Handle number and gender nudges.
+ % Note that these nudges get disabled for `typeset=ref' /
+ % `noname' option, but in this case they are not really
+ % meaningful anyway.
+ \bool_if:NT \l_@@_nudge_enabled_bool
+ {
+ \bool_if:NTF \l_@@_nudge_singular_bool
{
- \seq_if_empty:NTF \l_@@_type_name_gender_seq
+ \tl_if_empty:NF \l_@@_typeset_queue_curr_tl
{
- \msg_warning:nneee { zref-clever }
- { nudge-gender-not-declared-for-type }
- { \l_@@_ref_gender_tl }
+ \msg_warning:nne { zref-clever }
+ { nudge-plural-when-sg }
{ \l_@@_type_first_label_type_tl }
- { \l_@@_ref_language_tl }
}
+ }
+ {
+ \bool_lazy_all:nT
{
- \msg_warning:nneeee { zref-clever }
- { nudge-gender-mismatch }
+ { \l_@@_nudge_comptosing_bool }
+ { \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl }
+ {
+ \int_compare_p:nNn
+ { \l_@@_label_count_int } > { 0 }
+ }
+ }
+ {
+ \msg_warning:nne { zref-clever }
+ { nudge-comptosing }
{ \l_@@_type_first_label_type_tl }
- { \l_@@_ref_gender_tl }
+ }
+ }
+ \bool_lazy_and:nnT
+ { \l_@@_nudge_gender_bool }
+ { ! \tl_if_empty_p:N \l_@@_ref_gender_tl }
+ {
+ \@@_get_rf_opt_seq:neeN { gender }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_ref_language_tl }
+ \l_@@_type_name_gender_seq
+ \seq_if_in:NVF
+ \l_@@_type_name_gender_seq
+ \l_@@_ref_gender_tl
+ {
+ \seq_if_empty:NTF \l_@@_type_name_gender_seq
{
- \seq_use:Nn
- \l_@@_type_name_gender_seq { ,~ }
+ \msg_warning:nneee { zref-clever }
+ { nudge-gender-not-declared-for-type }
+ { \l_@@_ref_gender_tl }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_ref_language_tl }
+ }
+ {
+ \msg_warning:nneeee { zref-clever }
+ { nudge-gender-mismatch }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_ref_gender_tl }
+ {
+ \seq_use:Nn
+ \l_@@_type_name_gender_seq { ,~ }
+ }
+ { \l_@@_ref_language_tl }
}
- { \l_@@_ref_language_tl }
}
}
}
- }
- \tl_if_empty:NTF \l_@@_name_format_fallback_tl
- {
- \@@_opt_tl_get:cNF
+ \tl_if_empty:NTF \l_@@_name_format_fallback_tl
{
- \@@_opt_varname_type:een
- { \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_tl }
- { tl }
- }
- \l_@@_type_name_tl
- {
- \tl_if_empty:NF \l_@@_ref_decl_case_tl
- {
- \tl_put_left:Nn \l_@@_name_format_tl { - }
- \tl_put_left:NV \l_@@_name_format_tl
- \l_@@_ref_decl_case_tl
- }
\@@_opt_tl_get:cNF
{
- \@@_opt_varname_lang_type:eeen
- { \l_@@_ref_language_tl }
+ \@@_opt_varname_type:een
{ \l_@@_type_first_label_type_tl }
{ \l_@@_name_format_tl }
{ tl }
}
\l_@@_type_name_tl
{
- \tl_clear:N \l_@@_type_name_tl
- \bool_set_true:N \l_@@_type_name_missing_bool
- \msg_warning:nnee { zref-clever } { missing-name }
- { \l_@@_name_format_tl }
- { \l_@@_type_first_label_type_tl }
+ \tl_if_empty:NF \l_@@_ref_decl_case_tl
+ {
+ \tl_put_left:Nn \l_@@_name_format_tl { - }
+ \tl_put_left:NV \l_@@_name_format_tl
+ \l_@@_ref_decl_case_tl
+ }
+ \@@_opt_tl_get:cNF
+ {
+ \@@_opt_varname_lang_type:eeen
+ { \l_@@_ref_language_tl }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_name_format_tl }
+ { tl }
+ }
+ \l_@@_type_name_tl
+ {
+ \tl_clear:N \l_@@_type_name_tl
+ \bool_set_true:N \l_@@_type_name_missing_bool
+ \msg_warning:nnee { zref-clever } { missing-name }
+ { \l_@@_name_format_tl }
+ { \l_@@_type_first_label_type_tl }
+ }
}
}
- }
- {
- \@@_opt_tl_get:cNF
- {
- \@@_opt_varname_type:een
- { \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_tl }
- { tl }
- }
- \l_@@_type_name_tl
{
\@@_opt_tl_get:cNF
{
\@@_opt_varname_type:een
{ \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_fallback_tl }
+ { \l_@@_name_format_tl }
{ tl }
}
\l_@@_type_name_tl
{
- \tl_if_empty:NF \l_@@_ref_decl_case_tl
- {
- \tl_put_left:Nn
- \l_@@_name_format_tl { - }
- \tl_put_left:NV \l_@@_name_format_tl
- \l_@@_ref_decl_case_tl
- \tl_put_left:Nn
- \l_@@_name_format_fallback_tl { - }
- \tl_put_left:NV
- \l_@@_name_format_fallback_tl
- \l_@@_ref_decl_case_tl
- }
\@@_opt_tl_get:cNF
{
- \@@_opt_varname_lang_type:eeen
- { \l_@@_ref_language_tl }
+ \@@_opt_varname_type:een
{ \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_tl }
+ { \l_@@_name_format_fallback_tl }
{ tl }
}
\l_@@_type_name_tl
{
+ \tl_if_empty:NF \l_@@_ref_decl_case_tl
+ {
+ \tl_put_left:Nn
+ \l_@@_name_format_tl { - }
+ \tl_put_left:NV \l_@@_name_format_tl
+ \l_@@_ref_decl_case_tl
+ \tl_put_left:Nn
+ \l_@@_name_format_fallback_tl { - }
+ \tl_put_left:NV
+ \l_@@_name_format_fallback_tl
+ \l_@@_ref_decl_case_tl
+ }
\@@_opt_tl_get:cNF
{
\@@_opt_varname_lang_type:eeen
{ \l_@@_ref_language_tl }
{ \l_@@_type_first_label_type_tl }
- { \l_@@_name_format_fallback_tl }
+ { \l_@@_name_format_tl }
{ tl }
}
\l_@@_type_name_tl
{
- \tl_clear:N \l_@@_type_name_tl
- \bool_set_true:N
- \l_@@_type_name_missing_bool
- \msg_warning:nnee { zref-clever }
- { missing-name }
- { \l_@@_name_format_tl }
- { \l_@@_type_first_label_type_tl }
+ \@@_opt_tl_get:cNF
+ {
+ \@@_opt_varname_lang_type:eeen
+ { \l_@@_ref_language_tl }
+ { \l_@@_type_first_label_type_tl }
+ { \l_@@_name_format_fallback_tl }
+ { tl }
+ }
+ \l_@@_type_name_tl
+ {
+ \tl_clear:N \l_@@_type_name_tl
+ \bool_set_true:N
+ \l_@@_type_name_missing_bool
+ \msg_warning:nnee { zref-clever }
+ { missing-name }
+ { \l_@@_name_format_tl }
+ { \l_@@_type_first_label_type_tl }
+ }
}
}
}
}
}
}
- }
- % Signal whether the type name is to be included in the hyperlink or not.
- \bool_lazy_any:nTF
- {
- { ! \l_@@_hyperlink_bool }
- { \l_@@_link_star_bool }
- { \tl_if_empty_p:N \l_@@_type_name_tl }
- { \str_if_eq_p:Vn \l_@@_nameinlink_str { false } }
- }
- { \bool_set_false:N \l_@@_name_in_link_bool }
- {
+ % Signal whether the type name is to be included in the hyperlink or
+ % not.
\bool_lazy_any:nTF
{
- { \str_if_eq_p:Vn \l_@@_nameinlink_str { true } }
- {
- \str_if_eq_p:Vn \l_@@_nameinlink_str { tsingle } &&
- \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl
- }
- {
- \str_if_eq_p:Vn \l_@@_nameinlink_str { single } &&
- \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl &&
- \l_@@_typeset_last_bool &&
- \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
- }
+ { ! \l_@@_hyperlink_bool }
+ { \l_@@_link_star_bool }
+ { \tl_if_empty_p:N \l_@@_type_name_tl }
+ { \str_if_eq_p:Vn \l_@@_nameinlink_str { false } }
}
- { \bool_set_true:N \l_@@_name_in_link_bool }
{ \bool_set_false:N \l_@@_name_in_link_bool }
+ {
+ \bool_lazy_any:nTF
+ {
+ { \str_if_eq_p:Vn \l_@@_nameinlink_str { true } }
+ {
+ \str_if_eq_p:Vn \l_@@_nameinlink_str { tsingle } &&
+ \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl
+ }
+ {
+ \str_if_eq_p:Vn \l_@@_nameinlink_str { single } &&
+ \tl_if_empty_p:N \l_@@_typeset_queue_curr_tl &&
+ \l_@@_typeset_last_bool &&
+ \int_compare_p:nNn { \l_@@_type_count_int } = { 0 }
+ }
+ }
+ { \bool_set_true:N \l_@@_name_in_link_bool }
+ { \bool_set_false:N \l_@@_name_in_link_bool }
+ }
}
}
% \end{macrocode}