summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-12-24 03:02:52 +0000
committerNorbert Preining <norbert@preining.info>2024-12-24 03:02:52 +0000
commit81a7ccd5ab5c04e2749fb3f4c99f816b4c1acae6 (patch)
treeb441c124bfbaffeee7b0d4d59e0091611ce3592c /macros
parent35102b68291783e779cfef5f390ec522610e2786 (diff)
CTAN sync 202412240302
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/colorblind/ChangeLog13
-rw-r--r--macros/latex/contrib/colorblind/README.md2
-rw-r--r--macros/latex/contrib/colorblind/colorblind.sty811
-rw-r--r--macros/latex/contrib/colorblind/colorblind_doc.pdfbin0 -> 129981 bytes
-rw-r--r--macros/latex/contrib/colorblind/colorblind_doc.tex422
-rw-r--r--macros/latex/contrib/colorblind/documentation.pdfbin105258 -> 0 bytes
-rw-r--r--macros/latex/contrib/colorblind/documentation.tex365
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx8
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin651938 -> 651935 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex4
-rw-r--r--macros/latex/contrib/exesheet/exesheet.dtx171
-rw-r--r--macros/latex/contrib/exesheet/exesheet.pdfbin342355 -> 348338 bytes
-rw-r--r--macros/latex/contrib/pageslts/README10
-rw-r--r--macros/latex/contrib/pageslts/pageslts-example.pdfbin316387 -> 316385 bytes
-rw-r--r--macros/latex/contrib/pageslts/pageslts.dtx61
-rw-r--r--macros/latex/contrib/pageslts/pageslts.pdfbin616268 -> 616599 bytes
-rw-r--r--macros/xetex/latex/hduthesis/README.md21
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/abstract.tex12
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/contents.tex345
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source.tex18
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source/a1.tex224
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source/a2.tex88
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source/a3.tex231
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source/a4.tex4
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source/a5.tex4
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source/a6.tex28
-rw-r--r--macros/xetex/latex/hduthesis/doc/cha/source/a7.tex35
-rw-r--r--macros/xetex/latex/hduthesis/doc/hduthesis.pdfbin857818 -> 960114 bytes
-rw-r--r--macros/xetex/latex/hduthesis/doc/hduthesis.tex250
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/abstract.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/abstract.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/cha1.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/cha1.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/cha2.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/cha2.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/cha3.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/cha3.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/cha4.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/cha4.tex)4
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/cha5.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/cha5.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/cha6.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/cha6.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/cha7.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/cha7.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/cha/thanks.tex (renamed from macros/xetex/latex/hduthesis/examples/cha/thanks.tex)0
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0145.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0145.png)bin18951 -> 18951 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0162.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0162.png)bin14808 -> 14808 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0163.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0163.png)bin6806 -> 6806 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0236.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0236.png)bin4712 -> 4712 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0284.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0284.png)bin6290 -> 6290 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0285.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0285.png)bin11282 -> 11282 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0289.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0289.png)bin17271 -> 17271 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0419.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0419.png)bin13508 -> 13508 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0439.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0439.png)bin9503 -> 9503 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/figures/image-0440.png (renamed from macros/xetex/latex/hduthesis/examples/figures/image-0440.png)bin13350 -> 13350 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/hduthesis-bc.pdf (renamed from macros/xetex/latex/hduthesis/examples/hduthesis-bc.pdf)bin478706 -> 489599 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/hduthesis-bc.tex (renamed from macros/xetex/latex/hduthesis/examples/hduthesis-bc.tex)5
-rw-r--r--macros/xetex/latex/hduthesis/example/hduthesis-pg.pdf (renamed from macros/xetex/latex/hduthesis/examples/hduthesis-pg.pdf)bin153643 -> 182025 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/hduthesis-pg.tex (renamed from macros/xetex/latex/hduthesis/examples/hduthesis-pg.tex)7
-rw-r--r--macros/xetex/latex/hduthesis/example/hduthesis-stationery.pdfbin0 -> 175923 bytes
-rw-r--r--macros/xetex/latex/hduthesis/example/hduthesis-stationery.tex (renamed from macros/xetex/latex/hduthesis/examples/hduthesis-stationery.tex)17
-rw-r--r--macros/xetex/latex/hduthesis/example/reference.bib (renamed from macros/xetex/latex/hduthesis/examples/reference.bib)0
-rw-r--r--macros/xetex/latex/hduthesis/examples/hduthesis-stationery.pdfbin179443 -> 0 bytes
-rw-r--r--macros/xetex/latex/hduthesis/tex/hduthesis-bc.config-module.code.tex58
-rw-r--r--macros/xetex/latex/hduthesis/tex/hduthesis-hdu.l3doc-module.code.tex63
-rw-r--r--macros/xetex/latex/hduthesis/tex/hduthesis-hdu.stationery-module.code.tex115
-rw-r--r--macros/xetex/latex/hduthesis/tex/hduthesis-layout-module.code.tex53
-rw-r--r--macros/xetex/latex/hduthesis/tex/hduthesis-pg.config-module.code.tex99
-rw-r--r--macros/xetex/latex/hduthesis/tex/hduthesis-typeset-module.code.tex14
-rw-r--r--macros/xetex/latex/hduthesis/tex/hduthesis.cls30
64 files changed, 2308 insertions, 1286 deletions
diff --git a/macros/latex/contrib/colorblind/ChangeLog b/macros/latex/contrib/colorblind/ChangeLog
index a864cd215e..bdef33e32f 100644
--- a/macros/latex/contrib/colorblind/ChangeLog
+++ b/macros/latex/contrib/colorblind/ChangeLog
@@ -1,7 +1,16 @@
Package `colorblind` by Simon Pfahler
-https://github.com/simon-pfahler/colorblind
+https://github.com/simon-pfahler/colorblind/issues
History
=======
+2024/12/23 v1.1
+* Redefine default colors unless the option `keep-defaults` is specified
+* Refactor documentation
+* Minor bug fixes
+
+2024/05/16 v1.0.1
+* Add package options `pgf` and `no-tikz` to give more control over which
+packages are loaded
+
2024/05/12 v1.0
-* First published release.
+* Initial published release
diff --git a/macros/latex/contrib/colorblind/README.md b/macros/latex/contrib/colorblind/README.md
index 0fd83d42f8..b8ba60d9fb 100644
--- a/macros/latex/contrib/colorblind/README.md
+++ b/macros/latex/contrib/colorblind/README.md
@@ -1,6 +1,6 @@
## Package `colorblind` by Simon Pfahler
-Version 2024-05-12 v1.0
+Version 2024-12-24 v1.1
In colorblind-safe documents, the contents are presented in a way that the same information is conveyed to readers regardless of a potential color vision deficiency.
This package provides the tools necessary for colorblind-safe typesetting in LaTeX.
diff --git a/macros/latex/contrib/colorblind/colorblind.sty b/macros/latex/contrib/colorblind/colorblind.sty
index a549ea06f9..0f3401a115 100644
--- a/macros/latex/contrib/colorblind/colorblind.sty
+++ b/macros/latex/contrib/colorblind/colorblind.sty
@@ -4,395 +4,458 @@
%% ----------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{colorblind}[2024/05/12 Easy colorblind-safe typesetting]
+\ProvidesPackage{colorblind}[2024/12/23 Easy colorblind-safe typesetting]
\RequirePackage{xcolor}
\RequirePackage{ifthen}
-\RequirePackage{tikz}
-\usetikzlibrary{math}
-\RequirePackage{pgfplots}
-\pgfplotsset{compat=1.18}
-\DeclareOption{Tol}{
-%>>> Color schemes by Paul Tol, source: https://personal.sron.nl/~pault
-%
-%>>> Qualitative color schemes
-%
-% Bright Qualitative color scheme
-\providecolorset{RGB}{T-Q-B}{}{%
- 1,68,119,170;%
- 2,102,204,238;%
- 3,34,136,51;%
- 4,204,187,68;%
- 5,238,102,119;%
- 6,170,51,119;%
- 0,187,187,187%
-}
-%
-% High-contrast qualitative color scheme
-\providecolorset{RGB}{T-Q-HC}{}{%
- 1,255,255,255;%
- 2,221,170,51;%
- 3,187,85,102;%
- 4,0,68,136;%
- 0,0,0,0%
-}
-%
-% Vibrant qualitative color scheme
-\providecolorset{RGB}{T-Q-V}{}{%
- 1,0,119,187;%
- 2,51,187,238;%
- 3,0,153,136;%
- 4,238,119,51;%
- 5,204,51,17;%
- 6,238,51,119;%
- 0,187,187,187%
-}
-%
-% Muted qualitative color scheme
-\providecolorset{RGB}{T-Q-M}{}{%
- 1,51,34,136;%
- 2,136,204,238;%
- 3,68,170,153;%
- 4,153,153,51;%
- 5,221,204,119;%
- 6,204,102,119;%
- 7,136,34,85;%
- 8,170,68,153;%
- 0,221,221,221%
-}
-%
-% Medium-contrast qualitative color scheme
-\providecolorset{RGB}{T-Q-MC}{}{%
- 1,255,255,255;%
- 2,238,204,102;%
- 3,238,153,170;%
- 4,102,153,204;%
- 5,153,119,0;%
- 6,153,68,85;%
- 7,0,68,136;%
- 0,0,0,0%
-}
-%
-% Pale qualitative color scheme, for highlighting
-\providecolorset{RGB}{T-Q-PH}{}{%
- 1,187,204,238;%
- 2,204,238,255;%
- 3,204,221,170;%
- 4,238,238,187;%
- 5,255,204,204;%
- 0,221,221,221%
-}
-%
-% Dark qualitative color scheme, for text colors
-\providecolorset{RGB}{T-Q-DT}{}{%
- 1,34,34,85;%
- 2,34,85,85;%
- 3,34,85,34;%
- 4,102,102,51;%
- 5,102,51,51;%
- 0,85,85,85%
-}
-%
-% Light qualitative color scheme
-\providecolorset{RGB}{T-Q-L}{}{%
- 1,119,170,221;%
- 2,153,221,255;%
- 3,68,187,153;%
- 4,187,204,51;%
- 5,170,170,0;%
- 6,238,221,136;%
- 7,238,136,102;%
- 8,255,170,187;%
- 0,221,221,221%
-}
-%
-%<<< Qualitative color schemes
-%
-%>>> Diverging color schemes
-%
-% Sunset diverging color scheme
-\providecolorset{RGB}{T-D-S}{}{%
- 1,54,75,154;%
- 2,74,123,183;%
- 3,110,166,205;%
- 4,152,202,225;%
- 5,194,228,239;%
- 6,234,236,204;%
- 7,254,218,139;%
- 8,253,179,102;%
- 9,246,126,75;%
- 10,221,61,45;%
- 11,165,0,38;%
- 0,255,255,255%
-}
-\pgfplotsset{
- colormap={T-D-S}{color(0)=(T-D-S1) color(1)=(T-D-S2) color(2)=(T-D-S3) color(3)=(T-D-S4) color(4)=(T-D-S5) color(5)=(T-D-S6) color(6)=(T-D-S7) color(7)=(T-D-S8) color(8)=(T-D-S9) color(9)=(T-D-S10) color(10)=(T-D-S11)}
-}
-%
-% Nightfall diverging color scheme
-\providecolorset{RGB}{T-D-N}{}{%
- 1,18,90,86;%
- 2,0,118,123;%
- 3,35,143,157;%
- 4,66,167,198;%
- 5,96,188,233;%
- 6,157,204,239;%
- 7,198,219,237;%
- 8,222,230,231;%
- 9,236,234,218;%
- 10,240,230,178;%
- 11,249,213,118;%
- 12,255,185,84;%
- 13,253,154,68;%
- 14,245,118,52;%
- 15,233,76,31;%
- 16,209,24,7;%
- 17,160,24,19;%
- 0,255,255,255%
-}
-\pgfplotsset{
- colormap={T-D-N}{color(0)=(T-D-N1) color(1)=(T-D-N2) color(2)=(T-D-N3) color(3)=(T-D-N4) color(4)=(T-D-N5) color(5)=(T-D-N6) color(6)=(T-D-N7) color(7)=(T-D-N8) color(8)=(T-D-N9) color(9)=(T-D-N10) color(10)=(T-D-N11) color(11)=(T-D-N12) color(12)=(T-D-N13) color(13)=(T-D-N14) color(14)=(T-D-N15) color(15)=(T-D-N16) color(16)=(T-D-N17)}
-}
-%
-% BuRd diverging color scheme
-\providecolorset{RGB}{T-D-BR}{}{%
- 1,32,102,172;%
- 2,67,147,195;%
- 3,146,197,222;%
- 4,209,229,240;%
- 5,247,247,247;%
- 6,253,219,199;%
- 7,244,165,130;%
- 8,214,96,77;%
- 9,178,24,43;%
- 0,255,238,153%
-}
-\pgfplotsset{
- colormap={T-D-BR}{color(0)=(T-D-BR1) color(1)=(T-D-BR2) color(2)=(T-D-BR3) color(3)=(T-D-BR4) color(4)=(T-D-BR5) color(5)=(T-D-BR6) color(6)=(T-D-BR7) color(7)=(T-D-BR8) color(8)=(T-D-BR9)}
-}
-%
-% PRGn diverging color scheme
-\providecolorset{RGB}{T-D-PG}{}{%
- 1,118,42,131;%
- 2,153,112,171;%
- 3,194,165,207;%
- 4,231,212,232;%
- 5,247,247,247;%
- 6,217,240,211;%
- 7,172,211,158;%
- 8,90,174,97;%
- 9,27,120,55;%
- 0,255,238,153%
-}
-\pgfplotsset{
- colormap={T-D-PG}{color(0)=(T-D-PG1) color(1)=(T-D-PG2) color(2)=(T-D-PG3) color(3)=(T-D-PG4) color(4)=(T-D-PG5) color(5)=(T-D-PG6) color(6)=(T-D-PG7) color(7)=(T-D-PG8) color(8)=(T-D-PG9)}
+\newif\iftikz
+\tikztrue
+\DeclareOption{no-tikz}{
+ \tikzfalse
}
-%
-%<<< Diverging color schemes
-%
-%>>> Sequential color schemes
-%
-% YlOrBr sequential color scheme
-\providecolorset{RGB}{T-S-YOB}{}{%
- 1,255,255,229;%
- 2,255,247,188;%
- 3,254,227,145;%
- 4,254,196,79;%
- 5,251,154,41;%
- 6,236,112,20;%
- 7,204,76,2;%
- 8,153,52,4;%
- 9,102,37,6;%
- 0,136,136,136%
-}
-\pgfplotsset{
- colormap={T-S-YOB}{color(0)=(T-S-YOB1) color(1)=(T-S-YOB2) color(2)=(T-S-YOB3) color(3)=(T-S-YOB4) color(4)=(T-S-YOB5) color(5)=(T-S-YOB6) color(6)=(T-S-YOB7) color(7)=(T-S-YOB8) color(8)=(T-S-YOB9)}
-}
-%
-% Iridescent sequential color scheme
-\providecolorset{RGB}{T-S-IR}{}{%
- 1,254,251,233;%
- 2,252,247,213;%
- 3,245,243,193;%
- 4,234,240,181;%
- 5,221,236,191;%
- 6,208,231,202;%
- 7,194,227,210;%
- 8,181,221,216;%
- 9,168,216,220;%
- 10,155,210,225;%
- 11,141,203,228;%
- 12,129,196,231;%
- 13,123,188,231;%
- 14,126,178,228;%
- 15,136,165,221;%
- 16,147,152,210;%
- 17,155,138,196;%
- 18,157,125,178;%
- 19,154,112,158;%
- 20,144,99,136;%
- 21,128,87,112;%
- 22,104,73,87;%
- 23,70,53,58;%
- 0,153,153,153%
-}
-\pgfplotsset{
- colormap={T-S-IR}{color(0)=(T-S-IR1) color(1)=(T-S-IR2) color(2)=(T-S-IR3) color(3)=(T-S-IR4) color(4)=(T-S-IR5) color(5)=(T-S-IR6) color(6)=(T-S-IR7) color(7)=(T-S-IR8) color(8)=(T-S-IR9) color(9)=(T-S-IR10) color(10)=(T-S-IR11) color(11)=(T-S-IR12) color(12)=(T-S-IR13) color(13)=(T-S-IR14) color(14)=(T-S-IR15) color(15)=(T-S-IR16) color(16)=(T-S-IR17) color(17)=(T-S-IR18) color(18)=(T-S-IR19) color(19)=(T-S-IR20) color(20)=(T-S-IR21) color(21)=(T-S-IR22) color(22)=(T-S-IR23)}
-}
-%
-% Incandescent sequential color scheme
-\providecolorset{RGB}{T-S-IN}{}{%
- 1,206,255,255;%
- 2,198,247,214;%
- 3,162,244,155;%
- 4,187,228,83;%
- 5,213,206,4;%
- 6,231,181,3;%
- 7,241,153,3;%
- 8,246,121,11;%
- 9,249,73,2;%
- 10,228,5,21;%
- 11,168,0,3;%
- 0,136,136,136%
-}
-\pgfplotsset{
- colormap={T-S-IN}{color(0)=(T-S-IN1) color(1)=(T-S-IN2) color(2)=(T-S-IN3) color(3)=(T-S-IN4) color(4)=(T-S-IN5) color(5)=(T-S-IN6) color(6)=(T-S-IN7) color(7)=(T-S-IN8) color(8)=(T-S-IN9) color(9)=(T-S-IN10) color(10)=(T-S-IN11)}
-}
-%
-% Discrete rainbow color scheme
-\providecolorset{RGB}{T-S-DR}{}{%
- 1,209,187,215;%
- 2,174,118,163;%
- 3,136,46,114;%
- 4,25,101,176;%
- 5,82,137,199;%
- 6,123,175,222;%
- 7,78,178,101;%
- 8,144,201,135;%
- 9,202,224,171;%
- 10,247,240,86;%
- 11,246,193,65;%
- 12,241,147,45;%
- 13,232,96,28;%
- 14,220,5,12;%
- 0,119,119,119%
-}
-%
-\providecolorset{RGB}{T-S-SR}{}{%
- 1,232,236,251;%
- 2,221,216,239;%
- 3,209,193,225;%
- 4,195,168,209;%
- 5,181,143,194;%
- 6,167,120,180;%
- 7,155,98,167;%
- 8,140,78,153;%
- 9,111,76,155;%
- 10,96,89,169;%
- 11,85,104,184;%
- 12,78,121,197;%
- 13,77,138,198;%
- 14,78,150,188;%
- 15,84,158,179;%
- 16,89,165,169;%
- 17,96,171,158;%
- 18,105,177,144;%
- 19,119,183,125;%
- 20,140,188,104;%
- 21,166,190,84;%
- 22,190,188,72;%
- 23,209,181,65;%
- 24,221,170,60;%
- 25,228,156,57;%
- 26,231,140,53;%
- 27,230,121,50;%
- 28,228,99,45;%
- 29,223,72,40;%
- 30,218,34,34;%
- 31,184,34,30;%
- 32,149,33,27;%
- 33,114,30,23;%
- 34,82,26,19;%
- 0,102,102,102%
+
+\newif\ifpgf
+\pgffalse
+\DeclareOption{pgf}{
+ \pgftrue
}
-\pgfplotsset{
- colormap={T-S-SR}{color(0)=(T-S-SR1) color(1)=(T-S-SR2) color(2)=(T-S-SR3) color(3)=(T-S-SR4) color(4)=(T-S-SR5) color(5)=(T-S-SR6) color(6)=(T-S-SR7) color(7)=(T-S-SR8) color(8)=(T-S-SR9) color(9)=(T-S-SR10) color(10)=(T-S-SR11) color(11)=(T-S-SR12) color(12)=(T-S-SR13) color(13)=(T-S-SR14) color(14)=(T-S-SR15) color(15)=(T-S-SR16) color(16)=(T-S-SR17) color(17)=(T-S-SR18) color(18)=(T-S-SR19) color(19)=(T-S-SR20) color(20)=(T-S-SR21) color(21)=(T-S-SR22) color(22)=(T-S-SR23) color(23)=(T-S-SR24) color(24)=(T-S-SR25) color(25)=(T-S-SR26) color(26)=(T-S-SR27) color(27)=(T-S-SR28) color(28)=(T-S-SR29) color(29)=(T-S-SR30) color(30)=(T-S-SR31) color(31)=(T-S-SR32) color(32)=(T-S-SR33) color(33)=(T-S-SR34)}
+
+\newif\ifredefinedefaults
+\redefinedefaultstrue
+\DeclareOption{keep-defaults}{
+ \redefinedefaultsfalse
}
-%
-%<<< Sequential color schemes
-%
-%<<< Color schemes by Paul Tol, source: https://personal.sron.nl/~pault
+
+\newif\ifTolColors
+\TolColorsfalse
+\DeclareOption{Tol}{
+ \TolColorstrue
+ %>>> Color schemes by Paul Tol, source: https://personal.sron.nl/~pault
+ %
+ %>>> Qualitative color schemes
+ %
+ % Bright Qualitative color scheme
+ \providecolorset{RGB}{T-Q-B}{}{%
+ 1,68,119,170;%
+ 2,102,204,238;%
+ 3,34,136,51;%
+ 4,204,187,68;%
+ 5,238,102,119;%
+ 6,170,51,119;%
+ 0,187,187,187%
+ }
+ %
+ % High-contrast qualitative color scheme
+ \providecolorset{RGB}{T-Q-HC}{}{%
+ 1,255,255,255;%
+ 2,221,170,51;%
+ 3,187,85,102;%
+ 4,0,68,136;%
+ 0,0,0,0%
+ }
+ %
+ % Vibrant qualitative color scheme
+ \providecolorset{RGB}{T-Q-V}{}{%
+ 1,0,119,187;%
+ 2,51,187,238;%
+ 3,0,153,136;%
+ 4,238,119,51;%
+ 5,204,51,17;%
+ 6,238,51,119;%
+ 0,187,187,187%
+ }
+ %
+ % Muted qualitative color scheme
+ \providecolorset{RGB}{T-Q-M}{}{%
+ 1,51,34,136;%
+ 2,136,204,238;%
+ 3,68,170,153;%
+ 4,17,119,51;%
+ 5,153,153,51;%
+ 6,221,204,119;%
+ 7,204,102,119;%
+ 8,136,34,85;%
+ 9,170,68,153;%
+ 0,221,221,221%
+ }
+ %
+ % Medium-contrast qualitative color scheme
+ \providecolorset{RGB}{T-Q-MC}{}{%
+ 1,255,255,255;%
+ 2,238,204,102;%
+ 3,238,153,170;%
+ 4,102,153,204;%
+ 5,153,119,0;%
+ 6,153,68,85;%
+ 7,0,68,136;%
+ 0,0,0,0%
+ }
+ %
+ % Pale qualitative color scheme, for highlighting
+ \providecolorset{RGB}{T-Q-PH}{}{%
+ 1,187,204,238;%
+ 2,204,238,255;%
+ 3,204,221,170;%
+ 4,238,238,187;%
+ 5,255,204,204;%
+ 0,221,221,221%
+ }
+ %
+ % Dark qualitative color scheme, for text colors
+ \providecolorset{RGB}{T-Q-DT}{}{%
+ 1,34,34,85;%
+ 2,34,85,85;%
+ 3,34,85,34;%
+ 4,102,102,51;%
+ 5,102,51,51;%
+ 0,85,85,85%
+ }
+ %
+ % Light qualitative color scheme
+ \providecolorset{RGB}{T-Q-L}{}{%
+ 1,119,170,221;%
+ 2,153,221,255;%
+ 3,68,187,153;%
+ 4,187,204,51;%
+ 5,170,170,0;%
+ 6,238,221,136;%
+ 7,238,136,102;%
+ 8,255,170,187;%
+ 0,221,221,221%
+ }
+ %
+ %<<< Qualitative color schemes
+ %
+ %>>> Diverging color schemes
+ %
+ % Sunset diverging color scheme
+ \providecolorset{RGB}{T-D-S}{}{%
+ 1,54,75,154;%
+ 2,74,123,183;%
+ 3,110,166,205;%
+ 4,152,202,225;%
+ 5,194,228,239;%
+ 6,234,236,204;%
+ 7,254,218,139;%
+ 8,253,179,102;%
+ 9,246,126,75;%
+ 10,221,61,45;%
+ 11,165,0,38;%
+ 0,255,255,255%
+ }
+ %
+ % Nightfall diverging color scheme
+ \providecolorset{RGB}{T-D-N}{}{%
+ 1,18,90,86;%
+ 2,0,118,123;%
+ 3,35,143,157;%
+ 4,66,167,198;%
+ 5,96,188,233;%
+ 6,157,204,239;%
+ 7,198,219,237;%
+ 8,222,230,231;%
+ 9,236,234,218;%
+ 10,240,230,178;%
+ 11,249,213,118;%
+ 12,255,185,84;%
+ 13,253,154,68;%
+ 14,245,118,52;%
+ 15,233,76,31;%
+ 16,209,24,7;%
+ 17,160,24,19;%
+ 0,255,255,255%
+ }
+ %
+ % BuRd diverging color scheme
+ \providecolorset{RGB}{T-D-BR}{}{%
+ 1,32,102,172;%
+ 2,67,147,195;%
+ 3,146,197,222;%
+ 4,209,229,240;%
+ 5,247,247,247;%
+ 6,253,219,199;%
+ 7,244,165,130;%
+ 8,214,96,77;%
+ 9,178,24,43;%
+ 0,255,238,153%
+ }
+ %
+ % PRGn diverging color scheme
+ \providecolorset{RGB}{T-D-PG}{}{%
+ 1,118,42,131;%
+ 2,153,112,171;%
+ 3,194,165,207;%
+ 4,231,212,232;%
+ 5,247,247,247;%
+ 6,217,240,211;%
+ 7,172,211,158;%
+ 8,90,174,97;%
+ 9,27,120,55;%
+ 0,255,238,153%
+ }
+ %
+ %<<< Diverging color schemes
+ %
+ %>>> Sequential color schemes
+ %
+ % YlOrBr sequential color scheme
+ \providecolorset{RGB}{T-S-YOB}{}{%
+ 1,255,255,229;%
+ 2,255,247,188;%
+ 3,254,227,145;%
+ 4,254,196,79;%
+ 5,251,154,41;%
+ 6,236,112,20;%
+ 7,204,76,2;%
+ 8,153,52,4;%
+ 9,102,37,6;%
+ 0,136,136,136%
+ }
+ %
+ % Iridescent sequential color scheme
+ \providecolorset{RGB}{T-S-IR}{}{%
+ 1,254,251,233;%
+ 2,252,247,213;%
+ 3,245,243,193;%
+ 4,234,240,181;%
+ 5,221,236,191;%
+ 6,208,231,202;%
+ 7,194,227,210;%
+ 8,181,221,216;%
+ 9,168,216,220;%
+ 10,155,210,225;%
+ 11,141,203,228;%
+ 12,129,196,231;%
+ 13,123,188,231;%
+ 14,126,178,228;%
+ 15,136,165,221;%
+ 16,147,152,210;%
+ 17,155,138,196;%
+ 18,157,125,178;%
+ 19,154,112,158;%
+ 20,144,99,136;%
+ 21,128,87,112;%
+ 22,104,73,87;%
+ 23,70,53,58;%
+ 0,153,153,153%
+ }
+ %
+ % Incandescent sequential color scheme
+ \providecolorset{RGB}{T-S-IN}{}{%
+ 1,206,255,255;%
+ 2,198,247,214;%
+ 3,162,244,155;%
+ 4,187,228,83;%
+ 5,213,206,4;%
+ 6,231,181,3;%
+ 7,241,153,3;%
+ 8,246,121,11;%
+ 9,249,73,2;%
+ 10,228,5,21;%
+ 11,168,0,3;%
+ 0,136,136,136%
+ }
+ %
+ % Discrete rainbow color scheme
+ \providecolorset{RGB}{T-S-DR}{}{%
+ 1,209,187,215;%
+ 2,174,118,163;%
+ 3,136,46,114;%
+ 4,25,101,176;%
+ 5,82,137,199;%
+ 6,123,175,222;%
+ 7,78,178,101;%
+ 8,144,201,135;%
+ 9,202,224,171;%
+ 10,247,240,86;%
+ 11,246,193,65;%
+ 12,241,147,45;%
+ 13,232,96,28;%
+ 14,220,5,12;%
+ 0,119,119,119%
+ }
+ %
+ % Smooth rainbow color scheme
+ \providecolorset{RGB}{T-S-SR}{}{%
+ 1,232,236,251;%
+ 2,221,216,239;%
+ 3,209,193,225;%
+ 4,195,168,209;%
+ 5,181,143,194;%
+ 6,167,120,180;%
+ 7,155,98,167;%
+ 8,140,78,153;%
+ 9,111,76,155;%
+ 10,96,89,169;%
+ 11,85,104,184;%
+ 12,78,121,197;%
+ 13,77,138,198;%
+ 14,78,150,188;%
+ 15,84,158,179;%
+ 16,89,165,169;%
+ 17,96,171,158;%
+ 18,105,177,144;%
+ 19,119,183,125;%
+ 20,140,188,104;%
+ 21,166,190,84;%
+ 22,190,188,72;%
+ 23,209,181,65;%
+ 24,221,170,60;%
+ 25,228,156,57;%
+ 26,231,140,53;%
+ 27,230,121,50;%
+ 28,228,99,45;%
+ 29,223,72,40;%
+ 30,218,34,34;%
+ 31,184,34,30;%
+ 32,149,33,27;%
+ 33,114,30,23;%
+ 34,82,26,19;%
+ 0,102,102,102%
+ }
+ %
+ %<<< Sequential color schemes
+ %
+ %<<< Color schemes by Paul Tol, source: https://personal.sron.nl/~pault
}
\DeclareOption{OkabeIto}{
-%>>> Qualitative color scheme by Okabe and Ito
-\providecolorset{RGB}{OI}{}{%
- 1,230,159,0;%
- 2,86,180,233;%
- 3,0,158,115;%
- 4,240,228,66;%
- 5,0,114,178;%
- 6,213,94,0;%
- 7,204,121,167;%
- 0,0,0,0%
-}
-%<<< Qualitative color scheme by Okabe and Ito
+ %>>> Qualitative color scheme by Okabe and Ito
+ \providecolorset{RGB}{OI}{}{%
+ 1,230,159,0;%
+ 2,86,180,233;%
+ 3,0,158,115;%
+ 4,240,228,66;%
+ 5,0,114,178;%
+ 6,213,94,0;%
+ 7,204,121,167;%
+ 0,0,0,0%
+ }
+ %<<< Qualitative color scheme by Okabe and Ito
}
\DeclareOption*{\PackageWarning{colorblind}{Unknown '\CurrentOption'}}
\ProcessOptions\relax
-%>>> Function to print a discrete color scheme
-\newcommand\@drawSchemeRadius{0.7cm}
-\newcommand\@drawSchemeOffset{1cm}
-\newcounter{ColorNum}
-\newcommand\drawScheme[1]{%
- \tikz{%
- \node[inner sep=1, fill=red] at (-1.2*\@drawSchemeRadius,2.3*\@drawSchemeRadius) {R};
- \node[inner sep=1, fill=green] at (-1.2*\@drawSchemeRadius, 1.8*\@drawSchemeRadius) {G};
- \node[inner sep=1, fill=blue] at (-1.2*\@drawSchemeRadius,1.3*\@drawSchemeRadius) {B};
- \setcounter{ColorNum}{1}%
- \whiledo{%
- \@ifundefined{\string\color@#1\theColorNum}{\boolean{false}}{\boolean{true}}%
- }{%
- \extractcolorspecs{#1\the\value{ColorNum}}{\modelspec}{\colorspec}%
- \tikzmath{
- int \r, \g, \b;
- \r = round(255*array({\colorspec},0));
- \g = round(255*array({\colorspec},1));
- \b = round(255*array({\colorspec},2));
- }%
- \node at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,2.3*\@drawSchemeRadius) {\r};
- \node at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,1.8*\@drawSchemeRadius) {\g};
- \node at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,1.3*\@drawSchemeRadius) {\b};
- \draw[fill=#1\the\value{ColorNum}] (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,0) circle (\@drawSchemeRadius);%
- \node[rotate=25, anchor=north east] at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,-1*\@drawSchemeRadius) {#1\theColorNum};%
- \stepcounter{ColorNum}%
- }%
- \extractcolorspecs{#10}{\modelspec}{\colorspec}%
- \tikzmath{
- int \r, \g, \b;
- \r = round(255*array({\colorspec},0));
- \g = round(255*array({\colorspec},1));
- \b = round(255*array({\colorspec},2));
- }%
- \node at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,2.3*\@drawSchemeRadius) {\r};
- \node at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,1.8*\@drawSchemeRadius) {\g};
- \node at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,1.3*\@drawSchemeRadius) {\b};
- \draw[fill=#10] (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,0) circle(\@drawSchemeRadius);%
- \node[rotate=25, anchor=north east] at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset, -1*\@drawSchemeRadius) {#10};%
- }%
-}
-%<<< Function to print a discrete color scheme
+\ifredefinedefaults
+ % This redefines the default colors by removing most of them and setting
+ % the remaining to colors from the qualitative Vibrant color scheme by Tol.
+ \xdefinecolor{blue}{RGB}{68,119,170}
+ \xdefinecolor{cyan}{RGB}{102,204,238}
+ \xdefinecolor{green}{RGB}{34,136,51}
+ \xdefinecolor{yellow}{RGB}{204,187,68}
+ \xdefinecolor{red}{RGB}{238,102,119}
+ \xdefinecolor{violet}{RGB}{170,51,119}
+ \xdefinecolor{gray}{RGB}{187,187,187}
+ \xdefinecolor{orange}{RGB}{0,0,0}
+ \xdefinecolor{brown}{RGB}{0,0,0}
+ \xdefinecolor{darkgray}{RGB}{0,0,0}
+ \xdefinecolor{lightgray}{RGB}{0,0,0}
+ \xdefinecolor{lime}{RGB}{0,0,0}
+ \xdefinecolor{magenta}{RGB}{0,0,0}
+ \xdefinecolor{olive}{RGB}{0,0,0}
+ \xdefinecolor{pink}{RGB}{0,0,0}
+ \xdefinecolor{purple}{RGB}{0,0,0}
+ \xdefinecolor{teal}{RGB}{0,0,0}
+\fi
-%>>> Function to print a continuous color scheme
-\newcommand\drawSchemeC[2][0.5\textwidth]{%
- \tikz{%
- \pgfplotscolorbardrawstandalone[colormap name=#2, colorbar horizontal, colorbar style={width=#1, ticks=none}]%
- \draw[fill=#20] (#1+0.5*\@drawSchemeOffset,-0.55cm) circle(0.5*\@drawSchemeRadius);%
- }%
-}
-%<<< Function to print a continuous color scheme
+% define continuous colormaps and command to plot them if `pgf` option is given
+\ifpgf
+ % do nothing if option `Tol` was not provided, since then no applicable color schemes exist
+ \ifTolColors
+ \RequirePackage{pgfplots}
+ \pgfplotsset{compat=1.18}
+ % Sunset diverging colormap
+ \pgfplotsset{
+ colormap={T-D-S}{color(0)=(T-D-S1) color(1)=(T-D-S2) color(2)=(T-D-S3) color(3)=(T-D-S4) color(4)=(T-D-S5) color(5)=(T-D-S6) color(6)=(T-D-S7) color(7)=(T-D-S8) color(8)=(T-D-S9) color(9)=(T-D-S10) color(10)=(T-D-S11)}
+ }
+ % Nightfall diverging colormap
+ \pgfplotsset{
+ colormap={T-D-N}{color(0)=(T-D-N1) color(1)=(T-D-N2) color(2)=(T-D-N3) color(3)=(T-D-N4) color(4)=(T-D-N5) color(5)=(T-D-N6) color(6)=(T-D-N7) color(7)=(T-D-N8) color(8)=(T-D-N9) color(9)=(T-D-N10) color(10)=(T-D-N11) color(11)=(T-D-N12) color(12)=(T-D-N13) color(13)=(T-D-N14) color(14)=(T-D-N15) color(15)=(T-D-N16) color(16)=(T-D-N17)}
+ }
+ % BuRd diverging colormap
+ \pgfplotsset{
+ colormap={T-D-BR}{color(0)=(T-D-BR1) color(1)=(T-D-BR2) color(2)=(T-D-BR3) color(3)=(T-D-BR4) color(4)=(T-D-BR5) color(5)=(T-D-BR6) color(6)=(T-D-BR7) color(7)=(T-D-BR8) color(8)=(T-D-BR9)}
+ }
+ % PRGn diverging colormap
+ \pgfplotsset{
+ colormap={T-D-PG}{color(0)=(T-D-PG1) color(1)=(T-D-PG2) color(2)=(T-D-PG3) color(3)=(T-D-PG4) color(4)=(T-D-PG5) color(5)=(T-D-PG6) color(6)=(T-D-PG7) color(7)=(T-D-PG8) color(8)=(T-D-PG9)}
+ }
+ % YlOrBr sequential colormap
+ \pgfplotsset{
+ colormap={T-S-YOB}{color(0)=(T-S-YOB1) color(1)=(T-S-YOB2) color(2)=(T-S-YOB3) color(3)=(T-S-YOB4) color(4)=(T-S-YOB5) color(5)=(T-S-YOB6) color(6)=(T-S-YOB7) color(7)=(T-S-YOB8) color(8)=(T-S-YOB9)}
+ }
+ % Iridescent sequential colormap
+ \pgfplotsset{
+ colormap={T-S-IR}{color(0)=(T-S-IR1) color(1)=(T-S-IR2) color(2)=(T-S-IR3) color(3)=(T-S-IR4) color(4)=(T-S-IR5) color(5)=(T-S-IR6) color(6)=(T-S-IR7) color(7)=(T-S-IR8) color(8)=(T-S-IR9) color(9)=(T-S-IR10) color(10)=(T-S-IR11) color(11)=(T-S-IR12) color(12)=(T-S-IR13) color(13)=(T-S-IR14) color(14)=(T-S-IR15) color(15)=(T-S-IR16) color(16)=(T-S-IR17) color(17)=(T-S-IR18) color(18)=(T-S-IR19) color(19)=(T-S-IR20) color(20)=(T-S-IR21) color(21)=(T-S-IR22) color(22)=(T-S-IR23)}
+ }
+ % Incandescent sequential colormap
+ \pgfplotsset{
+ colormap={T-S-IN}{color(0)=(T-S-IN1) color(1)=(T-S-IN2) color(2)=(T-S-IN3) color(3)=(T-S-IN4) color(4)=(T-S-IN5) color(5)=(T-S-IN6) color(6)=(T-S-IN7) color(7)=(T-S-IN8) color(8)=(T-S-IN9) color(9)=(T-S-IN10) color(10)=(T-S-IN11)}
+ }
+ % Smooth Rainbow sequential colormap
+ \pgfplotsset{
+ colormap={T-S-SR}{color(0)=(T-S-SR1) color(1)=(T-S-SR2) color(2)=(T-S-SR3) color(3)=(T-S-SR4) color(4)=(T-S-SR5) color(5)=(T-S-SR6) color(6)=(T-S-SR7) color(7)=(T-S-SR8) color(8)=(T-S-SR9) color(9)=(T-S-SR10) color(10)=(T-S-SR11) color(11)=(T-S-SR12) color(12)=(T-S-SR13) color(13)=(T-S-SR14) color(14)=(T-S-SR15) color(15)=(T-S-SR16) color(16)=(T-S-SR17) color(17)=(T-S-SR18) color(18)=(T-S-SR19) color(19)=(T-S-SR20) color(20)=(T-S-SR21) color(21)=(T-S-SR22) color(22)=(T-S-SR23) color(23)=(T-S-SR24) color(24)=(T-S-SR25) color(25)=(T-S-SR26) color(26)=(T-S-SR27) color(27)=(T-S-SR28) color(28)=(T-S-SR29) color(29)=(T-S-SR30) color(30)=(T-S-SR31) color(31)=(T-S-SR32) color(32)=(T-S-SR33) color(33)=(T-S-SR34)}
+ }
+ %
+ %>>> Function to print a continuous color scheme
+ \newcommand\drawSchemeC[2][0.5\textwidth]{%
+ \tikz{%
+ \pgfplotscolorbardrawstandalone[colormap name=#2, colorbar horizontal, colorbar style={width=#1, ticks=none}]%
+ \draw[fill=#20] (#1+0.5*\@drawSchemeOffset,-0.55cm) circle(0.5*\@drawSchemeRadius);%
+ }%
+ }
+ %<<< Function to print a continuous color scheme
+ \fi
+\fi
+
+% define command to draw discrete color schemes when tikz is enabled
+\iftikz
+ \RequirePackage{tikz}
+ \usetikzlibrary{math}
+ %>>> Function to print a discrete color scheme
+ \newcommand\@drawSchemeRadius{0.7cm}
+ \newcommand\@drawSchemeOffset{1cm}
+ \newcounter{ColorNum}
+ \newcommand\drawScheme[1]{%
+ \tikz{%
+ \node[inner sep=1, fill=red] at (-1.2*\@drawSchemeRadius,2.3*\@drawSchemeRadius) {R};
+ \node[inner sep=1, fill=green] at (-1.2*\@drawSchemeRadius, 1.8*\@drawSchemeRadius) {G};
+ \node[inner sep=1, fill=blue] at (-1.2*\@drawSchemeRadius,1.3*\@drawSchemeRadius) {B};
+ \setcounter{ColorNum}{1}%
+ \whiledo{%
+ \@ifundefined{\string\color@#1\theColorNum}{\boolean{false}}{\boolean{true}}%
+ }{%
+ \extractcolorspecs{#1\the\value{ColorNum}}{\modelspec}{\colorspec}%
+ \tikzmath{
+ int \r, \g, \b;
+ \r = round(255*array({\colorspec},0));
+ \g = round(255*array({\colorspec},1));
+ \b = round(255*array({\colorspec},2));
+ }%
+ \node at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,2.3*\@drawSchemeRadius) {\r};
+ \node at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,1.8*\@drawSchemeRadius) {\g};
+ \node at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,1.3*\@drawSchemeRadius) {\b};
+ \draw[fill=#1\the\value{ColorNum}] (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,0) circle (\@drawSchemeRadius);%
+ \node[rotate=25, anchor=north east] at (\value{ColorNum}*\@drawSchemeOffset-\@drawSchemeOffset,-1*\@drawSchemeRadius) {#1\theColorNum};%
+ \stepcounter{ColorNum}%
+ }%
+ \extractcolorspecs{#10}{\modelspec}{\colorspec}%
+ \tikzmath{
+ int \r, \g, \b;
+ \r = round(255*array({\colorspec},0));
+ \g = round(255*array({\colorspec},1));
+ \b = round(255*array({\colorspec},2));
+ }%
+ \node at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,2.3*\@drawSchemeRadius) {\r};
+ \node at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,1.8*\@drawSchemeRadius) {\g};
+ \node at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,1.3*\@drawSchemeRadius) {\b};
+ \draw[fill=#10] (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset,0) circle(\@drawSchemeRadius);%
+ \node[rotate=25, anchor=north east] at (\value{ColorNum}*\@drawSchemeOffset-0.5*\@drawSchemeOffset, -1*\@drawSchemeRadius) {#10};%
+ }%
+ }
+ %<<< Function to print a discrete color scheme
+\fi
\endinput
diff --git a/macros/latex/contrib/colorblind/colorblind_doc.pdf b/macros/latex/contrib/colorblind/colorblind_doc.pdf
new file mode 100644
index 0000000000..0ecc058ae8
--- /dev/null
+++ b/macros/latex/contrib/colorblind/colorblind_doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorblind/colorblind_doc.tex b/macros/latex/contrib/colorblind/colorblind_doc.tex
new file mode 100644
index 0000000000..311de4ad34
--- /dev/null
+++ b/macros/latex/contrib/colorblind/colorblind_doc.tex
@@ -0,0 +1,422 @@
+%%
+%% ----------------------------------------------------------------
+%% Copyright (C) 2023-2024 by Simon Pfahler <simon.pfahler at ur dot de>
+%% ----------------------------------------------------------------
+%%
+%! TeX program = lualatex
+\DocumentMetadata{lang = en-us}
+\documentclass{scrartcl}
+\usepackage[left=4.5cm,right=3cm,top=3cm,bottom=3cm, marginpar=4cm]{geometry}
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{1ex}
+
+\usepackage{xcolor}
+\usepackage{soul}
+
+\usepackage{tikz}
+\usetikzlibrary{positioning, shapes, fit, arrows.meta, decorations.pathmorphing, math}
+\pgfdeclarelayer{bg}
+\pgfsetlayers{bg,main}
+
+\usepackage{pgfplots, pgfplotstable}
+\pgfplotsset{compat=1.18}
+
+%%%% from https://tex.stackexchange.com/questions/355713/pgfplots-show-error-marker-in-legend
+\pgfplotsset{error bar legend/.style={%
+ /pgfplots/legend image code/.prefix code={%
+ \pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}%
+ \draw[%
+ /pgfplots/every error bar,
+ mark=\pgfplotserrorbarsmark,
+ /pgfplots/error bars/error mark options,
+ sharp plot,
+ ##1
+ ] plot coordinates {(0.3cm, -0.15cm) (0.3cm, 0.15cm)};%
+ }
+ }
+}
+%%%%
+
+\pgfplotsset{custom area legend/.style={%
+ /pgfplots/legend image code/.prefix code={%
+ \fill[##1, draw=white] plot coordinates {(0cm, -0.1cm) (0.6cm,-0.1cm) (0.6cm, 0.1cm) (0cm, 0.1cm)};%
+ }
+ }
+}
+
+\def\w{420pt}
+
+\usepackage{hyperref}
+\hypersetup{
+ pdftitle={Easy colorblind-safe typesetting: the colorblind package},
+ pdfauthor={Simon Pfahler},
+}
+\usepackage{cleveref}
+
+\usepackage{csquotes}
+\usepackage[backend=biber, style=numeric-comp, seconds=true, sorting=none, subentry=true, doi=false, alldates=iso]{biblatex}
+\renewcommand*{\entrysetpunct}{\\[5pt]}
+\addbibresource{bib.bib}
+
+\usepackage[keep-defaults, Tol, OkabeIto, pgf]{colorblind}
+
+\newcommand\colorblind{\textbf{colorblind} }
+\newcommand\hlc[2][T-Q-PH4]{{%
+ \colorlet{foo}{#1}%
+ \sethlcolor{foo}\hl{#2}}%
+}
+
+\reversemarginpar
+\newcommand\marg[1]{\leavevmode\marginpar{\raggedleft #1}}
+\newcommand\tbs{\textbackslash}
+\newcommand\cs[1]{\texttt{\tbs#1}}
+
+\title{Easy colorblind-safe typesetting:\\ the \colorblind package}
+\author{Simon Pfahler}
+\date{\today\\Version 1.1}
+
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+ In colorblind-safe documents, the contents are presented in a way that the same information is conveyed to readers regardless of a potential color vision deficiency.
+ This package provides some useful tools for colorblind-safe typesetting in \LaTeX.
+ It provides color schemes for a wide range of applications.
+ The most commonly used schemes are qualitative schemes, providing easily distinguishable colors for use in graphics, but also for text coloring or highlighting.
+ Additionally, diverging and sequential schemes are provided, which can be used for encoding quantitative information using colors.
+ This package incorporates colorblind-safeness into the writing process, making it both less cumbersome and less error-prone.
+\end{abstract}
+
+\tableofcontents
+\clearpage
+
+\section{Introduction}
+\subsection{For the impatient}
+Writing good colorblind-safe documents can be a tricky task.
+It is a good starting point to realize that the default \LaTeX\ colors like \hlc[red]{red} or \hlc[blue]{blue} should be avoided.
+This is why for the impatient, simply loading this package without specifying any options (i.e.\ \cs{usepackage\{colorblind\}}) redefines the default colors to more sensible alternatives.
+\footnote{Where no suitable redefinition was possible for a builtin named color, the definition is changed to black.}
+
+\begin{figure}[ht]
+ \centering
+ \begin{tikzpicture}
+ \node[inner sep=1, fill=red] at (-1.2*0.7cm,2.3*0.7cm) {R};
+ \node[inner sep=1, fill=green] at (-1.2*0.7cm, 1.8*0.7cm) {G};
+ \node[inner sep=1, fill=blue] at (-1.2*0.7cm,1.3*0.7cm) {B};
+
+ \node at (1*1cm-1cm,2.3*0.7cm) {68};
+ \node at (1*1cm-1cm,1.8*0.7cm) {119};
+ \node at (1*1cm-1cm,1.3*0.7cm) {170};
+ \draw[fill=T-Q-B1] (1*1cm-1cm,0) circle (0.7cm);
+ \node[rotate=25, anchor=north east] at (1*1cm-1cm,-1*0.7cm) {\vphantom{bp}blue};
+
+ \node at (2*1cm-1cm,2.3*0.7cm) {102};
+ \node at (2*1cm-1cm,1.8*0.7cm) {204};
+ \node at (2*1cm-1cm,1.3*0.7cm) {238};
+ \draw[fill=T-Q-B2] (2*1cm-1cm,0) circle (0.7cm);
+ \node[rotate=25, anchor=north east] at (2*1cm-1cm,-1*0.7cm) {\vphantom{bp}cyan};
+
+ \node at (3*1cm-1cm,2.3*0.7cm) {34};
+ \node at (3*1cm-1cm,1.8*0.7cm) {136};
+ \node at (3*1cm-1cm,1.3*0.7cm) {51};
+ \draw[fill=T-Q-B3] (3*1cm-1cm,0) circle (0.7cm);
+ \node[rotate=25, anchor=north east] at (3*1cm-1cm,-1*0.7cm) {\vphantom{bp}green};
+
+ \node at (4*1cm-1cm,2.3*0.7cm) {204};
+ \node at (4*1cm-1cm,1.8*0.7cm) {187};
+ \node at (4*1cm-1cm,1.3*0.7cm) {68};
+ \draw[fill=T-Q-B4] (4*1cm-1cm,0) circle (0.7cm);
+ \node[rotate=25, anchor=north east] at (4*1cm-1cm,-1*0.7cm) {\vphantom{bp}yellow};
+
+ \node at (5*1cm-1cm,2.3*0.7cm) {238};
+ \node at (5*1cm-1cm,1.8*0.7cm) {102};
+ \node at (5*1cm-1cm,1.3*0.7cm) {119};
+ \draw[fill=T-Q-B5] (5*1cm-1cm,0) circle (0.7cm);
+ \node[rotate=25, anchor=north east] at (5*1cm-1cm,-1*0.7cm) {\vphantom{bp}red};
+
+ \node at (6*1cm-1cm,2.3*0.7cm) {170};
+ \node at (6*1cm-1cm,1.8*0.7cm) {51};
+ \node at (6*1cm-1cm,1.3*0.7cm) {119};
+ \draw[fill=T-Q-B6] (6*1cm-1cm,0) circle (0.7cm);
+ \node[rotate=25, anchor=north east] at (6*1cm-1cm,-1*0.7cm) {\vphantom{bp}violet};
+
+ \node at (7*1cm-1cm,2.3*0.7cm) {187};
+ \node at (7*1cm-1cm,1.8*0.7cm) {187};
+ \node at (7*1cm-1cm,1.3*0.7cm) {187};
+ \draw[fill=T-Q-B0] (7*1cm-1cm,0) circle (0.7cm);
+ \node[rotate=25, anchor=north east] at (7*1cm-1cm,-1*0.7cm) {\vphantom{bp}gray};
+
+ \end{tikzpicture}
+ \caption{Redefinitions of the default \LaTeX\ colors.}
+\end{figure}
+
+It should be noted that this is a very brute-force way of trying to achieve colorblind-safeness.
+If you care about this topic (which you should), the rest of this document provides details on how colorblind-safeness is best achieved in different scenarios.
+
+\subsection{Package options}
+\marg{\texttt{Tol}\\\texttt{OkabeIto}}%
+The \colorblind package provides the color schemes by Paul Tol~\cite{Tol} and the Okabe Ito color palette~\cite{Ichihara_2008}.
+By default, no schemes are loaded.
+Providing one of the options \texttt{Tol} or \texttt{OkabeIto} loads all corresponding schemes.
+
+\marg{\texttt{pgf}}%
+If the option \texttt{pgf} is provided, continuous colormaps are defined for use with \texttt{pgfplots} (or \texttt{TikZ}).
+Also, the command \cs{drawSchemeC} for drawing continuous color schemes is only defined when the option is provided and continuous color schemes are available (through providing the \texttt{Tol} option).
+Continuous versions of color schemes are only available when the colors are allowed to be interpolated, see below for details.
+
+\marg{\texttt{no-tikz}}%
+The package uses \texttt{TikZ} to draw the discrete versions of color schemes.
+Providing the option \texttt{no-tikz} disables this, the command \cs{drawScheme} is not defined in this case.
+
+\marg{\texttt{keep-defaults}}%
+The package redefines the default colors like \hlc[T-Q-PH5]{red} or \hlc[T-Q-PH1]{blue} to be colorblind-safe. By specifying this option, the defaults are not changed.
+
+\subsection{Overview}
+As an example for how to use the colors, we look at the \emph{bright qualitative} color scheme by Tol.
+\cref{fig:T-Q-Bexample} shows the colors in the scheme.
+
+\begin{figure}[ht]
+ \centering
+ \drawScheme{T-Q-B}
+ \caption{Bright qualitative color scheme by Tol.}
+ \label{fig:T-Q-Bexample}
+\end{figure}
+
+All colors in this model start with \texttt{T-Q-B}, indicating that it is a scheme by \textbf{T}ol, that it is a \textbf{q}ualitative scheme, and that it is the \textbf{b}right scheme.
+The colors in the scheme are specified by a number following the scheme name, in this case ranging from \texttt{T-Q-B1} to \texttt{T-Q-B6} for the non-grey colors.
+The additional color \texttt{T-Q-B0} provides a color that can be used, e.g., to indicate bad data.
+
+There are two reasons why color names are not based on natural color names (e.g., ``\hlc[T-Q-PH1]{blue}''):
+\begin{enumerate}
+ \item Certain colors (\hlc[T-Q-PH3]{green}, \hlc[T-Q-PH5]{red}) are often used by people with full color vision to convey certain meanings (\hlc[T-Q-PH3]{good}, \hlc[T-Q-PH5]{bad}).
+ This meaning is difficult for people with color vision deficiencies to pick up.
+ By not using natural color names, it is easier to write colorblind-safe documents that do not make use of said connotations.
+ \item Natural color names can be cumbersome, e.g., when slight variations of a color are used. It is annoying having to look up if a color is called, e.g., \hlc[T-Q-PH1]{blue} or \hlc[T-Q-PH2]{cyan}.
+\end{enumerate}
+
+These colors are used the same way as any other colors. To change the text color to \texttt{T-Q-B1} for example, use \cs{color\{T-Q-B1\}}.
+
+\section{Guidelines}\label{sec:guidelines}
+In this section, we provide some general guidelines for colorblind-safe design.
+
+Color vision deficiencies apper in many different variations and grades of severity, up to monochromacy, where different colors can only be distinguished via their perceived brightness.
+This means that while the color schemes provided by this package are easier to distinguish for the most common color vision deficiencies, information encoded only in color can never be truely colorblind safe.
+This leads us to the most important rule in colorblind-safe design:
+\begin{center}
+ \setlength{\fboxrule}{1pt}
+ \textbf{Rule 1}:
+ \fbox{\parbox{0.65\columnwidth}{
+ Always provide information in more ways than just color.
+ }}
+\end{center}
+
+If this rule is satisfied in a document, it is by construction guaranteed to be colorblind-safe.
+However, this does not mean that it is \emph{convenient} for people with color vision deficiencies to extract the information.
+In order to achieve the best possible result, a few more rules should be considered when using color.
+\begin{center}
+ \setlength{\fboxrule}{1pt}
+ \textbf{Rule 2}:
+ \fbox{\parbox{0.65\columnwidth}{
+ Stick to a color scheme.
+ \begin{itemize}
+ \item[(\textbf{a})] Do not mix colors within a scheme.
+ \item[(\textbf{b})] Do not use shades of colors.
+ \end{itemize}
+ }}
+\end{center}
+
+Colors within colorblind-safe color schemes are designed to be eaily distinguishable for people with the most common color vision deficiencies, so we should only use colors from one color scheme in any given visual unit.
+In extension, even colors from the same scheme should not be mixed, since this makes it harder to distinguish them.
+Even if the result of the mixing is easily distinguishable for people with normal color vision, the same might not be true under certain color vision deficiencies.
+For the same reaseon, shades of colors (i.e.\ mixings with black or white) should be avoided, because the brightness of colors is also used to make sure the colors are distinguishable.
+
+\begin{center}
+ \setlength{\fboxrule}{1pt}
+ \textbf{Rule 3}:
+ \fbox{\parbox{0.65\columnwidth}{
+ Do not use color for information and aesthetics simultaneously.
+ }}
+\end{center}
+
+Color is often also used for aesthetic reasons, e.g., on a scientific poster.
+This is usually unproblematic, as the color does not convey information in this case.
+However, if color is used to convey information in a visual unit, avoid using additional color for aesthetic purposes, as this makes it more difficult to extract the information encoded in the color.
+
+\begin{center}
+ \setlength{\fboxrule}{1pt}
+ \textbf{Rule 4}:
+ \fbox{\parbox{0.65\columnwidth}{
+ Do not use rainbow color schemes.
+ }}
+\end{center}
+
+Due to the many different colors in a rainbow color scheme, they are inevitably difficult to distinguish for people with color vision deficiencies.
+Therefore, it is best to avoid them.
+If a rainbow color scheme has to be used at all cost, Paul Tol (and thus also the \texttt{colorblind} package) provides both a discrete as well as a continuous version~\cite{Tol}, which are optimized to be as distinguishable as possible.
+
+By following these four simple rules, we can ensure that the information encoded in a document is presented in a colorblind-safe way, and that it is reasonably convenient for people affected by color vision deficiencies to extract the information.
+As a side node, following these rules leads to documents that do not suffer from information loss when printed in black and white, which is usually also desirable.
+
+\section{Provided color schemes}\label{sec:colors}
+The color schemes provided are split into three groups:
+\begin{itemize}
+ \item Qualitative schemes:\newline
+ These schemes are used to convey qualitative information, such as different data sources, countries or manufacturers.
+ They should usually be used for coloring text or distinguishing different lines/bars in a plot.
+ \item Diverging color schemes:\newline
+ When quantitative data ranges between two extremes, and the middle is being considered ``neutral'', a diverging color scheme should be used.
+ Examples for this kind of data might be test grades, temperatures or pH values.
+ \item Sequential color schemes:\newline
+ For quantitative data without an important midpoint, sequential color schemes should be preferred over diverging ones.
+ This is especially true for quantites that start from $0$.
+ They can be used to denote for example velocities, concentrations or pressures.
+\end{itemize}
+
+For each type of schemes, this package provides a range of options.
+\Cref{sec:Tol_schemes} shows the schemes designed by Paul Tol~\cite{Tol}, which include qualitative, diverging and sequential schemes (see \cref{sec:T-Q,sec:T-D,sec:T-S}).
+In \cref{sec:OkabeIto}, the Okabe Ito color scheme~\cite{Ichihara_2008} is provided, which is probably the most famous qualitative colorblind-safe color scheme due to it being mentioned in various articles in high-ranking journals.
+
+All of the schemes are colorblind-safe, and some are optimized for printout or designed for a particular purpose.
+This is denoted under the scheme name.\clearpage
+
+\subsection{Paul Tol's color schemes}\label{sec:Tol_schemes}
+
+\subsubsection{Qualitative color schemes}\label{sec:T-Q}
+\begin{minipage}{0.5\textwidth}
+ \centering
+ \scalebox{0.7}{\drawScheme{T-Q-B}}\\
+ \textbf{B}right\\
+ \phantom{pb}
+\end{minipage}\hfill%
+\begin{minipage}{0.5\textwidth}
+ \centering
+ \scalebox{0.7}{\drawScheme{T-Q-V}}\\
+ \textbf{V}ibrant
+\end{minipage}
+
+\begin{minipage}{0.5\textwidth}
+ \centering
+ \scalebox{0.7}{\drawScheme{T-Q-HC}}\\
+ \textbf{H}igh-\textbf{C}ontrast\\
+ works for black and white printout
+\end{minipage}\hfill%
+\begin{minipage}{0.5\textwidth}
+ \centering
+ \scalebox{0.7}{\drawScheme{T-Q-MC}}\\
+ \textbf{M}edium-\textbf{C}ontrast\\
+ works for black and white printout
+\end{minipage}
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-Q-M}}\\
+ \textbf{M}uted
+\end{center}
+
+\begin{minipage}{0.5\textwidth}
+ \centering
+ \scalebox{0.7}{\drawScheme{T-Q-PH}}\\
+ \textbf{P}ale \textbf{H}ighlight\\
+ specifically for text background
+\end{minipage}\hfill%
+\begin{minipage}{0.5\textwidth}
+ \centering
+ \scalebox{0.7}{\drawScheme{T-Q-DT}}\\
+ \textbf{D}ark \textbf{T}ext\\
+ specifically for text color
+\end{minipage}
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-Q-L}}\\
+ \textbf{L}ight\\
+ less distinguishable than other schemes,\\ mostly meant for filling in labelled cells
+\end{center}\clearpage
+
+\subsubsection{Diverging color schemes}\label{sec:T-D}
+For diverging schemes, when a continuous scheme is needed, the colors are allowed to be linearly interpolated.
+When using the option \texttt{pgf}, the interpolations are available as colormaps with the names of their color scheme.
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-D-S}}\\
+ \drawSchemeC[0.6\textwidth]{T-D-S}\\
+ \textbf{S}unset
+\end{center}
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-D-N}}\\
+ \drawSchemeC[0.9\textwidth]{T-D-N}\\
+ \textbf{N}ightfall
+\end{center}
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-D-BR}}\\
+ \drawSchemeC[0.5\textwidth]{T-D-BR}\\
+ \textbf{B}u\textbf{R}d
+\end{center}
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-D-PG}}\\
+ \drawSchemeC[0.5\textwidth]{T-D-PG}\\
+ \textbf{P}R\textbf{G}n
+\end{center}\clearpage
+
+\subsubsection{Sequential color schemes}\label{sec:T-S}
+For most sequential schemes, a continuous scheme can be obtained again by linearly interpolating the colors.
+The only exception to this is the \emph{discrete rainbow} scheme, which has an explicitly continuos variation, the \emph{smooth rainbow} scheme.
+When using the option \texttt{pgf}, the interpolations are available as colormaps with the names of their color scheme.
+
+When the discrete scheme is not shown, this is because there are too many colors in it.
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-S-YOB}}\\
+ \drawSchemeC[0.5\textwidth]{T-S-YOB}\\
+ \textbf{Y}l\textbf{O}r\textbf{B}r
+\end{center}
+
+\begin{center}
+ \drawSchemeC[0.9\textwidth]{T-S-IR}\\
+ \textbf{Ir}idescent
+\end{center}
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-S-IN}}\\
+ \drawSchemeC[0.6\textwidth]{T-S-IN}\\
+ \textbf{In}candescent\\
+ not print-friendly
+\end{center}
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{T-S-DR}}\\
+ \textbf{D}iscrete \textbf{R}ainbow\\
+ Do not interpolate!
+\end{center}
+
+\begin{center}
+ \drawSchemeC[\textwidth]{T-S-SR}\\
+ \textbf{S}mooth \textbf{R}ainbow\\
+\end{center}\clearpage
+
+\subsection{Okabe Ito qualitative color scheme}\label{sec:OkabeIto}
+This is the qualitative color scheme commonly known as the \emph{Okabe Ito} color palette~\cite{Ichihara_2008}.
+
+\begin{center}
+ \scalebox{0.7}{\drawScheme{OI}}\\
+ \textbf{O}kabe \textbf{I}to
+\end{center}
+
+\section{Provided commands}
+\marg{\cs{drawScheme\{...\}}}%
+The discrete visualizations of color schemes given in this documentation are created with the command \cs{drawScheme\{...\}}.
+The name of the color scheme should be provided to the command, e.g.\ \cs{drawScheme\{T-Q-B\}} to print the \emph{qualitative bright} scheme by Tol.
+Note that this command is not available when the package option \texttt{no-tikz} is used.
+
+\marg{\cs{drawSchemeC\{...\}}}%
+The continuous visualizations of color schemes given in this documentation are created with the command \cs{drawSchemeC\{...\}}.
+The name of the color scheme should be provided to the command, e.g.\ \cs{drawSchemeC\{T-D-S\}} to print the \emph{diverging sunset} scheme by Tol.
+Note that this command only works for color schemes that are allowed to be interpolated, and that the command is only available when the package option \texttt{pgf} is used.
+
+\clearpage
+\printbibliography
+
+\end{document}
diff --git a/macros/latex/contrib/colorblind/documentation.pdf b/macros/latex/contrib/colorblind/documentation.pdf
deleted file mode 100644
index f35c947328..0000000000
--- a/macros/latex/contrib/colorblind/documentation.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/colorblind/documentation.tex b/macros/latex/contrib/colorblind/documentation.tex
deleted file mode 100644
index a04188b570..0000000000
--- a/macros/latex/contrib/colorblind/documentation.tex
+++ /dev/null
@@ -1,365 +0,0 @@
-%%
-%% ----------------------------------------------------------------
-%% Copyright (C) 2023-2024 by Simon Pfahler <simon.pfahler at ur dot de>
-%% ----------------------------------------------------------------
-%%
-%! TeX program = lualatex
-\documentclass{scrartcl}
-\usepackage[left=4cm,right=3cm,top=3cm,bottom=3cm, marginpar=3cm]{geometry}
-\setlength{\parindent}{0pt}
-\setlength{\parskip}{1ex}
-
-\usepackage{cprotect}
-\usepackage{tikz}
-\usetikzlibrary{math}
-
-\usepackage{xcolor}
-\usepackage{soul}
-
-\usepackage{tikz}
-\usetikzlibrary{positioning, shapes, fit, arrows.meta, decorations.pathmorphing}
-\pgfdeclarelayer{bg}
-\pgfsetlayers{bg,main}
-
-\usepackage{pgfplots, pgfplotstable}
-\pgfplotsset{compat=1.18}
-
-%%%% from https://tex.stackexchange.com/questions/355713/pgfplots-show-error-marker-in-legend
-\pgfplotsset{error bar legend/.style={%
- /pgfplots/legend image code/.prefix code={%
- \pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}%
- \draw[%
- /pgfplots/every error bar,
- mark=\pgfplotserrorbarsmark,
- /pgfplots/error bars/error mark options,
- sharp plot,
- ##1
- ] plot coordinates {(0.3cm, -0.15cm) (0.3cm, 0.15cm)};%
- }
- }
-}
-%%%%
-
-\pgfplotsset{custom area legend/.style={%
- /pgfplots/legend image code/.prefix code={%
- \fill[##1, draw=white] plot coordinates {(0cm, -0.1cm) (0.6cm,-0.1cm) (0.6cm, 0.1cm) (0cm, 0.1cm)};%
- }
- }
-}
-
-\def\w{420pt}
-
-\usepackage{hyperref}
-\hypersetup{
- pdftitle={Easy colorblind-safe typesetting: the colorblind package},
- pdfauthor={Simon Pfahler},
-}
-\usepackage{cleveref}
-
-\usepackage{csquotes}
-\usepackage[backend=biber, style=numeric-comp, seconds=true, sorting=none, subentry=true, doi=false, alldates=iso]{biblatex}
-\renewcommand*{\entrysetpunct}{\\[5pt]}
-\addbibresource{bib.bib}
-
-\usepackage[Tol, OkabeIto]{colorblind}
-
-\newcommand\colorblind{\textbf{colorblind} }
-\newcommand\hlc[2][T-Q-PH4]{{%
- \colorlet{foo}{#1}%
- \sethlcolor{foo}\hl{#2}}%
-}
-
-\reversemarginpar
-\newcommand\marg[1]{\leavevmode\marginpar{\raggedleft #1}}
-\newcommand\tbs{\textbackslash}
-
-\title{Easy colorblind-safe typesetting:\\ the \colorblind package}
-\author{Simon Pfahler}
-\date{\today\\Version 1.0}
-
-
-\begin{document}
-
-\maketitle
-
-\begin{abstract}
- In colorblind-safe documents, the contents are presented in a way that the same information is conveyed to readers regardless of a potential color vision deficiency.
- This package provides the tools necessary for colorblind-safe typesetting in \LaTeX.
- It provides color schemes for a wide range of applications.
- The most commonly used schemes are qualitative schemes, providing easily distinguishable colors for use in graphics, but also for text coloring or highlighting.
- Additionally, diverging and sequential schemes are included which can be used for encoding quantitative information using colors.
- This package incorporates colorblind-safeness into the writing process, making it both less cumbersome and less error-prone.
-\end{abstract}
-
-\tableofcontents
-\clearpage
-
-\section{Introduction}
-\subsection{Package options}
-\cprotect\marg{\verb!Tol!\\\verb!OkabeIto!}%
-The \colorblind package provides the color schemes by Paul Tol~\cite{Tol} and the Okabe Ito color palette~\cite{Ichihara_2008}.
-By default, no schemes are loaded.
-Providing one of the options \verb!Tol! or \verb!OkabeIto! loads all corresponding schemes.
-
-\subsection{Overview}
-As an example for how to use the colors, we look at the \emph{bright qualitative} color scheme by Tol.
-\cref{fig:T-Q-Bexample} shows the colors in the scheme
-
-\begin{figure}[ht]
- \centering
- \drawScheme{T-Q-B}
- \caption{Bright qualitative color scheme by Tol.}
- \label{fig:T-Q-Bexample}
-\end{figure}
-
-All colors in this model start with \verb!T-Q-B!, indicating that it is a scheme by \textbf{T}ol, that it is a \textbf{q}ualitative scheme, and that it is the \textbf{b}right scheme.
-The colors in the scheme are specified by a number following the scheme name, in this case ranging from \verb!T-Q-B1! to \verb!T-Q-B6! for the non-grey colors.
-The additional color \verb!T-Q-B0! provides a color that can be used, e.g., to indicate bad data.
-
-There are two reasons why color names are not based on natural color names (e.g., ``\hlc[T-Q-PH1]{blue}''):
-\begin{enumerate}
- \item Certain colors (\hlc[T-Q-PH3]{green}, \hlc[T-Q-PH5]{red}) are often used by people with full color vision to convey certain meanings (\hlc[T-Q-PH3]{good}, \hlc[T-Q-PH5]{bad}).
- This meaning is difficult for people with color vision deficiencies to pick up.
- By not using natural color names, it is easier to write colorblind-safe documents that do not make use of said connotations.
- \item Natural color names can be cumbersome, e.g., when multiple variations of a primary color are used. It is annoying having to look up if a color is called, e.g., \hlc[T-Q-PH1]{blue} or \hlc[T-Q-PH2]{cyan}.
-\end{enumerate}
-
-These colors are used the same way as any other colors. To change the text color to \verb!T-Q-B1! for example, use \verb!\color{T-Q-B1}!.
-
-\section{Guidelines}
-On its own, using colorblind-safe colors is not sufficient for making a document truly colorblind-safe.
-This section provides some general rules to follow for colorblind-safe typesetting.
-
-These rules apply to each visual unit of a document individually.
-A visual unit may be a graphic, a table or a paragraph of text.
-It might be advisable to be consistent also between different visual units (e.g., use the same color scheme for all graphics), but this is more of an aesthetic argument and is not strictly necessary for a colorblind-safe document.
-
-The most important rules are:
-\begin{enumerate}
- \item \hlc{Do not mix the colors in qualitative schemes!}\newline
- The colors in each scheme are defined with the purpose of being easily distinguishable.
- Mixing of colors, e.g., \verb?T-Q-B1!50!T-Q-B5? interferes with this.
- A special case of this is that qualitative colors should not be mixed in order to convey quantitative information.
- In this case, a suitable non-qualitative color scheme (i.e.\ a diverging or sequential scheme) should be used.
- \item \hlc{Only use colors from one color scheme for a given visual unit!}\newline
- The colors between different schemes are not tuned to be distinguishable.
- Using colors from multiple schemes therefore defies the point of this package.
- \item \hlc{Do not use shades of colors!}\newline
- Saturation and brightness are also used for distinguishability, so mixings involving \verb!white! and \verb!black! should also be avoided.
-\end{enumerate}
-
-The first two rules should be ensured in any visual unit. If the need for more colors arises, a different color scheme should be used alltogether.
-While the third rule should also be followed in most scenarios, there are some situations that might allow for breaking this rule. As an example, consider \cref{fig:errorbar_plot}, where the error band is colored with a lighter shade of the original color.
-This is ok because only few colors are used in the plot and the colors are not necessary for conveying the message of the plot.
-
-\begin{figure}[ht]
- \centering
- \begin{tikzpicture}
- \begin{axis}[
- width=0.4*\w,
- height=0.28*\w,
- scale only axis=true,
- xlabel = {x},
- ylabel = {y},
- x label style = {yshift=2mm},
- y label style = {yshift=-2mm},
- clip marker paths=true,
- axis on top
- ]
-
- \fill[T-Q-B5!20] (0,0.1068558) -- (40,0.1068558) -- (40,0.0668558) -- (0,0.0668558) -- cycle;
- \draw[T-Q-B5] (0,0.0868558) -- (40,0.0868558);
-
- \addplot[color=T-Q-B1, mark=*, only marks, forget plot]
- plot[/pgfplots/error bars/.cd, x dir=none, y dir=both, y explicit,
- error mark=-, error bar style={color=T-Q-B1}]
- coordinates {
- (4,0.263148) +- (0.120064,0.120064)
- (8,0.159158) +- (0.0621894,0.0621894)
- (12,0.129892) +- (0.0543303,0.0543303)
- (16,0.112302) +- (0.0358508,0.0358508)
- (20,0.098435) +- (0.02648,0.02648)
- (24,0.0909784) +- (0.0215048,0.0215048)
- (28,0.0894657) +- (0.0212992,0.0212992)
- (32,0.0869343) +- (0.0202553,0.0202553)
- };
- \addlegendimage{T-Q-B1, mark=*, only marks, error bar legend};
- \addlegendentry{data};
- \addlegendimage{draw=T-Q-B5, fill=T-Q-B5!20, custom area legend};
- \addlegendentry{reference};
-
- \end{axis}
- \end{tikzpicture}
- \cprotect\caption{This plot breaks rule 3 by using the shade \verb?T-Q-B5!20? for the error band of the reference, but it is still colorblind-safe.}
- \label{fig:errorbar_plot}
-\end{figure}
-
-There are additional guidelines that should be kept in mind when typesetting colorblind-safe documents.
-Their importance may vary between different applications, so try to follow them as best as possible, at your own judgement.
-In no particular order, they are:
-\begin{itemize}
- \item \hlc{Do not convey information only through color!}\newline
- When possible, encode the information the color provides also in a different way, e.g., through text, patterns or symbols.
- \item \hlc{Do not use color for information and aesthetics simultaneously!}\newline
- Color is often also used for aesthetic reasons, e.g., on a scientific poster.
- While this is ok in principle, do not mix information and aesthetics within the same visual unit, as this makes it more difficult to extract the encoded information.
- \item \hlc{Do not use rainbow color schemes!}\newline
- Due to the many different colors in a rainbow color scheme, they are very difficult to distinguish for people with color vision deficiencies (even when the scheme is tuned for this purpose).
- Therefore, it is best to avoid them.
- If you insist on using them, Paul Tol provides both a sequential as well as a continuous version, which are optimized to be as distinguishable as possible.
-\end{itemize}
-
-\section{Provided color schemes}\label{sec:colors}
-The color schemes provided are split into three groups:
-\begin{itemize}
- \item Qualitative schemes:\newline
- These schemes are used to convey qualitative information, such as different data sources, countries or manufacturers.
- They should usually be used for coloring text or distinguishing different lines/bars in a plot.
- \item Diverging color schemes:\newline
- When quantitative data ranges between two extremes, and the middle is being considered ``neutral'', a diverging color scheme should be used.
- Examples for this kind of data might be test grades, temperatures or pH values.
- \item Sequential color schemes:\newline
- For quantitative data without an important midpoint, sequential color schemes should be preferred over diverging ones.
- This is especially true for quantites that start from $0$.
- They can be used to denote for example velocities, concentrations or pressures.
-\end{itemize}
-
-For each type of schemes, this package provides a range of options.
-\Cref{sec:Tol_schemes} shows the schemes designed by Paul Tol~\cite{Tol}, which include qualitative, diverging and sequential schemes (see \cref{sec:T-Q,sec:T-D,sec:T-S}).
-In \cref{sec:OkabeIto}, the Okabe Ito color scheme~\cite{Ichihara_2008} is provided, which is probably the most famous qualitative colorblind-safe color scheme due to it being mentioned in various articles in high-ranking journals.
-
-All of the schemes are colorblind-safe, and some are optimized for printout or designed for a particular purpose.
-This is denoted under the scheme name.\clearpage
-
-\subsection{Paul Tol's color schemes}\label{sec:Tol_schemes}
-
-\subsubsection{Qualitative color schemes}\label{sec:T-Q}
-\begin{minipage}{0.5\textwidth}
- \centering
- \scalebox{0.7}{\drawScheme{T-Q-B}}\\
- \textbf{B}right\\
- \phantom{pb}
-\end{minipage}\hfill%
-\begin{minipage}{0.5\textwidth}
- \centering
- \scalebox{0.7}{\drawScheme{T-Q-V}}\\
- \textbf{V}ibrant
-\end{minipage}
-
-\begin{minipage}{0.5\textwidth}
- \centering
- \scalebox{0.7}{\drawScheme{T-Q-HC}}\\
- \textbf{H}igh-\textbf{C}ontrast\\
- works for black and white printout
-\end{minipage}\hfill%
-\begin{minipage}{0.5\textwidth}
- \centering
- \scalebox{0.7}{\drawScheme{T-Q-MC}}\\
- \textbf{M}edium-\textbf{C}ontrast\\
- works for black and white printout
-\end{minipage}
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-Q-M}}\\
- \textbf{M}uted
-\end{center}
-
-\begin{minipage}{0.5\textwidth}
- \centering
- \scalebox{0.7}{\drawScheme{T-Q-PH}}\\
- \textbf{P}ale \textbf{H}ighlight\\
- specifically for text background
-\end{minipage}\hfill%
-\begin{minipage}{0.5\textwidth}
- \centering
- \scalebox{0.7}{\drawScheme{T-Q-DT}}\\
- \textbf{D}ark \textbf{T}ext\\
- specifically for text color
-\end{minipage}
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-Q-L}}\\
- \textbf{L}ight\\
- less distinguishable than other schemes,\\ mostly meant for filling in labelled cells
-\end{center}\clearpage
-
-\subsubsection{Diverging color schemes}\label{sec:T-D}
-For diverging schemes, when a continuous palette is needed, the colors are allowed to be linearly interpolated.
-When using \verb!pgfplots! (or \verb!TikZ!), the interpolations are available as colormaps with the names of their color scheme.
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-D-S}}\\
- \drawSchemeC[0.6\textwidth]{T-D-S}\\
- \textbf{S}unset
-\end{center}
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-D-N}}\\
- \drawSchemeC[0.9\textwidth]{T-D-N}\\
- \textbf{N}ightfall
-\end{center}
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-D-BR}}\\
- \drawSchemeC[0.5\textwidth]{T-D-BR}\\
- \textbf{B}u\textbf{R}d
-\end{center}\clearpage
-
-\subsubsection{Sequential color schemes}\label{sec:T-S}
-For most sequential schemes, a continuous palette can be obtained again by linearly interpolating the colors.
-The only exception to this is the \emph{discrete rainbow} scheme, which has an explicitly continuos variation, the \emph{smooth rainbow} scheme.
-When using \verb!pgfplots!, the interpolations are available as colormaps with the names of their color scheme.
-
-When the discrete scheme is not shown, this is because there are too many colors in them.
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-S-YOB}}\\
- \drawSchemeC[0.5\textwidth]{T-S-YOB}\\
- \textbf{Y}l\textbf{O}r\textbf{B}r
-\end{center}
-
-\begin{center}
- \drawSchemeC[0.9\textwidth]{T-S-IR}\\
- \textbf{Ir}idescent
-\end{center}
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-S-IN}}\\
- \drawSchemeC[0.6\textwidth]{T-S-IN}\\
- \textbf{In}candescent\\
- not print-friendly
-\end{center}
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{T-S-DR}}\\
- \textbf{D}iscrete \textbf{R}ainbow\\
- Do not interpolate!
-\end{center}
-
-\begin{center}
- \drawSchemeC[\textwidth]{T-S-SR}\\
- \textbf{S}mooth \textbf{R}ainbow\\
-\end{center}
-
-\subsection{Okabe Ito qualitative color scheme}\label{sec:OkabeIto}
-This is the qualitative color scheme commonly known as the \emph{Okabe Ito} color palette~\cite{Ichihara_2008}.
-
-\begin{center}
- \scalebox{0.7}{\drawScheme{OI}}\\
- \textbf{O}kabe \textbf{I}to
-\end{center}
-
-\section{Provided commands}
-\cprotect\marg{\verb!\drawScheme{...}!}%
-The discrete visualizations of color schemes given in this documentation are created with the command \verb!\drawScheme{...}!.
-The name of the color scheme should be provided to the command, e.g.\ \verb!\drawScheme{T-Q-B}! to print the \emph{qualitative bright} scheme by Tol.
-
-\cprotect\marg{\verb!\drawSchemeC{...}!}%
-The continuous visualizations of color schemes given in this documentation are created with the command \verb!\drawSchemeC{...}!.
-The name of the color scheme should be provided to the command, e.g.\ \verb!\drawSchemeC{T-D-S}! to print the \emph{diverging sunset} scheme by Tol.
-Note that this command only works for color schemes that are allowed to be interpolated.
-
-\clearpage
-\printbibliography
-
-\end{document}
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index dce421d3b4..bd0b1b68e2 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 (v2024hx)
+Easily typesetting Chinese theses or books (v2024hz)
## 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 2cd88bcc15..e3146b967d 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/12/22}{2024hx}
+\ProvidesExplClass{easybook}{2024/12/23}{2024hz}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -308,7 +308,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/12/22}{2024hx}
+\ProvidesExplPackage{easybase}{2024/12/23}{2024hz}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1647,7 +1647,7 @@
\clist_if_exist:cT { l__eb_toc_outer_kv_#1_clist }
{ \keys_set:nv { eb/tocouter } { l__eb_toc_outer_kv_#1_clist } }
}
-\cs_new_protected:Npn \eb_toc_kv_set:nn
+\cs_new_protected:Npn \eb_toc_kv_set:nn #1#2
{
\eb_toc_outer_kv_initial:n {#1}
\IfValueT{#2}{\keys_set:nn { eb/tocouter } {#2}}
@@ -3008,7 +3008,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/12/22}{2024hx}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/12/23}{2024hz}
{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 686760c0a4..01f70dc7a8 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 2ca7066d43..0dcf45bc12 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 = v2024hx,
- date = 2024/12/22,
+ version = v2024hz,
+ date = 2024/12/23,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
diff --git a/macros/latex/contrib/exesheet/exesheet.dtx b/macros/latex/contrib/exesheet/exesheet.dtx
index d3c92b9ef3..00a2b3afd8 100644
--- a/macros/latex/contrib/exesheet/exesheet.dtx
+++ b/macros/latex/contrib/exesheet/exesheet.dtx
@@ -23,16 +23,17 @@
%<class>\ProvidesClass{exesheet}
%<package>\ProvidesPackage{exesheet}
%<*class|package>
-[2024/02/13 v2.7 .dtx Typesetting exercise or exam sheets]
+[2024/12/22 v2.8 Typesetting exercise or exam sheets]
%</class|package>
%<*driver>
-\documentclass{ltxdoc}
-%
-% uncomment the following lines if you want to use the exesheet class instead of ltxdoc
-%\usepackage{doc}
-%\AtBeginDocument{\MakeShortVerb{\|}}
-%\providecommand\marg[1]{{\ttfamily\{}\meta{#1}{\ttfamily\}}}
-%\providecommand\oarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}
+\documentclass{article}
+
+% comment the following lines to use the ltxdoc class instead of the doc package
+\usepackage{hypdoc}
+\AtBeginDocument{\MakeShortVerb{\|}}
+\providecommand\marg[1]{{\ttfamily\{}\meta{#1}{\ttfamily\}}}
+\providecommand\oarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}
+
\usepackage[exetoc=false,marginwidth=unset,display=notes]{exesheet}
\usepackage{schooldocs}
\usepackage[utf8]{inputenc}
@@ -85,24 +86,6 @@
%</driver>
% \fi
%
-% \CheckSum{1206}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
% \changes{v0.0}{2010/09/01}{Initial personal version}
% \changes{v0.9}{2020/01/02}{Initial documentation in French}
% \changes{v1.0}{2020/07/22}{Initial public version with documentation in English}
@@ -184,6 +167,11 @@
% - babel-french option 'StandardLists=true' works now if french is passed in documentclass
% - completion of the comparison with other packages}
%
+% \changes{v2.8}{2024/12/22}{
+% - improvements in answers environment
+% - starred environments tablenuma* and tablitem* no longer supported
+% - character table and checksum removed from dtx file (useless)}
+%
% \GetFileInfo{exesheet.dtx}
%
% \maketitle
@@ -259,6 +247,7 @@
% \psframe(-0.25,1.3)(12.75,-0.3)
% Try this first command; easy!
%
+% \bigskip
% To bring optional text closer to the exercise number,
% you can employ |\unskip| which removes any preceding space.
% Take a look at the following example, achieved with
@@ -269,13 +258,13 @@
%
% \bigskip
% \DescribeMacro{\exercisename}
-% The term ``\exercisename'' is automatically translated into various languages
+% The word ``\exercisename'' is automatically translated into various languages
% \footnote{Currently, translation is integrated into the package
% for the following languages: French, German, Spanish, Italian, and Portuguese.}
% depending on the language that is loaded (via \textsf{babel} or \textsf{polyglossia}).
% You can alter it by modifying |\exercisename|.
-% A better approach is to use macros from the \textsf{translations}
-% package by Clemens Niederberger~\cite{TRAN} (which allows dynamic language switching),
+% A better approach is to use macros from the \mbox{\textsf{translations}}
+% package by Clemens Niederberger~\cite{TRAN} (which allows language switching),
% \eg |\DeclareTranslation{swedish}{exesheet-exercise}{\"Ovning}}|.
%
% \smallskip
@@ -288,7 +277,7 @@
% \smallskip
% \DescribeMacro{\theexercise}
% If you wish to alter only the numbering style, you can redefine
-% the |\theexercise| command based on the |exercise| counter.
+% |\theexercise| which is based on the |exercise| counter.
%
% \smallskip
% \DescribeMacro{\labelexercisestyle}
@@ -442,7 +431,7 @@
% that allows, among others things,
% the typesetting of alternative list labels. For instance, typing
% |\begin{enumerate}[label=\alph*),font=\itshape\normalfont]|
-% will yield the labels ``\emph{a)}, \emph{b)}, \emph{c)}\ldots''.
+% will produce the labels ``\emph{a)}, \emph{b)}, \emph{c)}\ldots''.
% There are many other options available
% (see the \textsf{enumitem}~\cite{ENUM} package documentation)
% \footnote{Labels can also be modified using a ``shortlabel'' argument,
@@ -522,7 +511,7 @@
% Clemens Niederberger~\cite{TASK}.
% The usage of the optional argument \meta{opt} is
% explained in the documentation of this package.
-% For example, similar to the \textsf{enumitem} package~\cite{ENUM},
+% For example, similar to the \mbox{\textsf{enumitem}} package~\cite{ENUM},
% |label=\arabic*)| produces an Arabic numbering
% followed by a closing parenthesis.
% Additionally there are numerous possibilities for arranging items in original ways.
@@ -534,7 +523,7 @@
% Notice that numbering occurs line by line in this context.
%
% \exercise
-% \psframe(-0.25,1.3)(12.75,-2.8)
+% \psframe(-0.25,1.3)(12.75,-2.7)
% Calculate the derivative of the following functions:
% \begin{tablenum1}(3)
% \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$,
@@ -568,26 +557,31 @@
% When \texttt{setlist=true}, place these commands \emph{after} |\begin{document}|.
%
% \medskip
-% \DescribeEnv{tablenuma*} \DescribeEnv{tablitem*}
% When you intend to utilize \texttt{tablenuma} (or \texttt{tablitem})
% immediately after inserting the |\item| command
% within an \texttt{enumerate} environment,
-% a vertical misplacement may occur.
-% To achieve proper vertical spacing in such cases, we offer
-% the starred environments \texttt{tablenuma*} and \texttt{tablitem*},
-% with corrected alignment as shown below:
-%
-% \noindent\psframe(-0.25,0.05)(12.75,-0.97)
-% \psline[linewidth=0.1pt,linecolor=green,linestyle=dashed](0, -0.6)(10.5, -0.6)
+% a vertical misplacement may occur as shown below:
% \begin{enumerate}
% \item
-% \begin{tablenuma*}(3) \item One \item Two \item Three \end{tablenuma*}
+% \begin{tablenuma}(3) \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$
+% \item $\ds g(x) = \ln \left( \frac{1-x}{1+x^2}\right)$,
+% \item $\ds h(x) = \int_{0}^{1}\mathrm{e}^{xy}\, \mathrm{d}y$.
+% \end{tablenuma}
% \end{enumerate}
+% To adjust the vertical alignment, include
+% |\mbox{}\vspace|\marg{height} just after |\item| and before invoking |\begin{tablenuma}|
+% (or |\begin{tablitem}|), where \meta{height} can be a positive or negative length.
+% Here we used |\vspace{-5.4ex}|.
%
-% \medskip
-% If the vertical alignment is still not perfect, include
-% |\mbox{}\vspace|\marg{height} just after |\item| and before invoking |\begin{tablenuma*}|
-% (or |\begin{tablitem*}|), where \meta{height} can be a positive or negative length.
+% \noindent\psframe(-0.25,0.15)(12.75,-1.05)
+% \psline[linewidth=0.1pt,linecolor=green,linestyle=dashed](0,-0.57)(12,-0.57)
+% \begin{enumerate}
+% \item \mbox{}\vspace{-5.4ex}
+% \begin{tablenuma}(3) \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$
+% \item $\ds g(x) = \ln \left( \frac{1-x}{1+x^2}\right)$,
+% \item $\ds h(x) = \int_{0}^{1}\mathrm{e}^{xy}\, \mathrm{d}y$.
+% \end{tablenuma}
+% \end{enumerate}
%
% \subsection{Items aligned by column: \texttt{colsenum}, \texttt{colsitem}}
% \DescribeEnv{colsenum}
@@ -602,7 +596,7 @@
% Here's an example with |\begin{colsenum}{3}|:
%
% \exercise
-% \psframe(-0.25,1.3)(12.75,-2.65)
+% \psframe(-0.25,1.3)(12.75,-2.7)
% Calculate the derivative of the following functions:
% \begin{colsenum}{3}
% \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$,
@@ -731,21 +725,21 @@
%
% \subsection{More about \texttt{answers} environments}
% Internally, we have utilized the |\comment| and |\endcomment| macros
-% from the \textsf{versions} package by Uwe Lück~\cite{VERS}.
-% ^^A Several other packages also enable selective management of code portions.
-% ^^A Notably, the \textsf{verbatim} package by Rainer Schöpf,
-% ^^A \textsf{comment} by Victor Eijkhout,
-% ^^A \textsf{version} by Donald Arseneau and Stephen Bellantoni,
-% ^^A \textsf{optional} by Donald Arseneau
-% ^^A and \textsf{codesection} by Matthias Pospiech.
+% from the \mbox{\textsf{versions}} package by Uwe Lück~\cite{VERS}.
+% Several other packages also enable selective management of code portions.
+% Notably, the \textsf{verbatim} package by Rainer Schöpf,
+% \textsf{comment} by Victor Eijkhout,
+% \textsf{version} by Donald Arseneau and Stephen Bellantoni,
+% \textsf{optional} by Donald Arseneau
+% and \textsf{codesection} by Matthias Pospiech.
% Moreover, the \textsf{versions} package~\cite{VERS} offers
% the |\excludeversion|\marg{env} and
% |\includeversion|\marg{env} macros which allow for the exclusion or inclusion of
% any environment \meta{env}. These ``optional'' environments
-% can be nested.
-% ^^A \footnote{The \textsf{codesection} package also supports
-% ^^A such nesting, including within the preamble, as well as the \textsf{optional} package,
-% ^^A but the latter manages only short sections of optional code.}.
+% can be nested
+% \footnote{The \textsf{codesection} package also supports
+% such nesting, including within the preamble, as well as the \textsf{optional} package,
+% but the latter manages only short sections of optional code.}.
%
% However the \texttt{questions} and \texttt{answers} environments
% serve a broader purpose beyond merely displaying or hiding text.
@@ -769,15 +763,6 @@
% other numbers for lower levels
% (which won't appear in the table of contents or in the PDF file’s summary).
%
-% Caution should be taken that, if the \texttt{questions} environment is not used
-% beforehand in the same exercise (or part),
-% the \texttt{answers} environment will consider the correction as global
-% for the entire sheet (or exercise) and will reset the \texttt{exercise}
-% (or \texttt{part}) counter.
-% This can be managed properly with the optional argument.
-% For example, use |\begin{answers}[2]| to prevent \texttt{exercise} counter reset,
-% or |\begin{answers}[3]| to prevent \texttt{subpart} counter reset.
-%
% \medskip
% \DescribeMacro{answers*}
% The starred version \texttt{answers*} doesn't display the
@@ -840,7 +825,7 @@
% In the following example, we used
% |\exercise[\points{5}]|:
% \exercise[\points{5}]
-% \psframe(-0.25,1.3)(12.75,-0.4)
+% \psframe(-0.25,1.3)(12.75,-0.35)
% Try to read this document to the end without drinking tea and you get five points.
%
% \bigskip
@@ -965,7 +950,7 @@
% single one by specifying the number of points as an optional argument of the |\note| command:
% |\note|\oarg{num}\marg{comment}.
%
-% The initial comment in the following example is generated (immediately after |\item|) using
+% The first comment in the following example is obtained using (immediately after |\item|)
% |\note[1]{0.5 for the anti-derivative\\0.5 for simplifying}|.
%
% \exercise[\totalexe{4}] \label{totalexe}
@@ -1266,7 +1251,8 @@
%
% \subsection{Comparison with other packages}\label{comparison}
%
-% In this section, we will provide an overview of the functionalities (as of today \today)
+% In this section, we will provide an overview of the functionalities (when version 2.7 of
+% this package was published, at February 13, 2024)
% of various packages or classes found in the `Exercise' or `Exam' sections
% of the CTAN archives
% (Comprehensive \TeX\ Archive Network).
@@ -1751,7 +1737,8 @@
\@ifundefined{frenchsetup}{}{\frenchsetup{StandardLists=true}}
% executed at begin doc if loaded before babel
\setlist[enumerate]{font=\enumfont}
- \setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,leftmargin=1.5em}
+ \setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,
+ leftmargin=1.5em}
\fi
% \end{macrocode}
@@ -1795,22 +1782,6 @@
label-align=right,
item-indent=2.5em,label-offset=0.5em,
after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablitem}[\item](2)
-
-% \end{macrocode}
-% \DescribeEnv{tablenuma*} \DescribeEnv{tablitem*}
-% The starred environments \texttt{tablenuma*} and \texttt{tablitem*}
-% are designed to be employed within an \texttt{enumerate} environment,
-% precisely at the outset of an |\item|, in order to achieve correct horizontal
-% alignment.
-% The length of |-1.667\baselineskip| has been tested with various font families and sizes.
-% The alignment is generally good.
-% \begin{macrocode}
-\newenvironment{tablenuma*}{%
- \mbox{}\vspace{-1.667\baselineskip}\begin{tablenuma}}{
- \end{tablenuma}}
-\newenvironment{tablitem*}{%
- \mbox{}\vspace{-1.667\baselineskip}\begin{tablitem}}{
- \end{tablitem}}
% \end{macrocode}
% \DescribeEnv{colsenum}\DescribeEnv{colsenum*}
@@ -1946,7 +1917,8 @@
\newcounter{@toclevel}
\newcommand{\set@toclevel}[1][]{
\ifthenelse{\equal{#1}{}}{
- \ifthenelse{\value{exercise} > \value{exe@ini}}{
+ \ifthenelse{\(\value{exercise} > \value{exe@ini}\)
+ \and \(\value{exe@ini} > 0 \)}{
\setcounter{@toclevel}{1}
}{% else
\ifthenelse{\equal{\the\@enumdepth}{0}}{
@@ -1971,14 +1943,14 @@
\ifexesheet@exetoc
\addcontentsline{toc}{section}{\correctionname}
\fi
- \setcounter{exercise}{0}
+ \setcounter{exercise}{\value{exe@ini}}
}{% else if
\ifthenelse{\value{@toclevel} = 2}{%
\subsection*{\correctionstyle\correctionname}
\ifexesheet@exetoc
\addcontentsline{toc}{subsection}{\correctionname}
\fi
- \setcounter{subpart}{0}
+ \setcounter{subpart}{\value{subpart@ini}}
}{% else if
\ifthenelse{\value{@toclevel} = 3}{%
\subsubsection*{\correctionstyle\correctionname}
@@ -1997,9 +1969,9 @@
% \begin{macrocode}
\newenvironment{answers}[1][]{% #1 is the optional level
\ifthenelse{\boolean{exesheet@answers}}{%
- \ifthenelse{\boolean{exesheet@questions}}{
- \set@toclevel[#1]
- \typeset@correctionname
+ \ifthenelse{\boolean{exesheet@questions}}{%
+ \set@toclevel[#1]%
+ \typeset@correctionname%
\correctionstyle%
\ifexesheet@setlist
\settasks{
@@ -2016,9 +1988,12 @@
\renewcommand{\columnseprulecolor}{%
\color{correctioncolor}}
\fi%
- }{}
+ }{}%
}{\comment}
-}{\ifthenelse{\boolean{exesheet@answers}}{}{\endcomment}}
+}{\ifthenelse{\boolean{exesheet@answers}}{%
+ \setcounter{exe@ini}{0}
+ \setcounter{subpart@ini}{0}
+ }{\endcomment}}
\newenvironment{answers*}{
\ifthenelse{\boolean{exesheet@answers}}{\correctionstyle}{\comment}
@@ -2096,7 +2071,7 @@
% and \texttt{noteragged} are handled using the following internal commands.
%
% \medskip
-% The \texttt{display} key option determines the value of the two booleans
+% The \texttt{display} key option determines the value of the booleans
% |exesheet@pts| and |exesheet@notes|.
% The |exesheet@pts| boolean controls the display of the content of |\pts|
% and optional arguments of |\note|,
@@ -2477,7 +2452,7 @@
% The test |#1 < 2| doesn't work with decimal numbers without |\lengthtest|,
% but it works with lengths.
% \end{macro}
-% \DescribeMacro{\pts}
+% \begin{macro}{\pts}
% \begin{macrocode}
\definecolor{ptscolor}{named}{red}
\newcommand{\ptsstyle}[1]{%
@@ -2496,7 +2471,7 @@
}
% \end{macrocode}
-%
+% \end{macro}
% \begin{macro}{\totalexe}
% In the subsequent macros that utilize
% |\marginpar|, the presence of percent symbols and |\ignorespaces| is essential
diff --git a/macros/latex/contrib/exesheet/exesheet.pdf b/macros/latex/contrib/exesheet/exesheet.pdf
index 8f1760acc1..0335f5f818 100644
--- a/macros/latex/contrib/exesheet/exesheet.pdf
+++ b/macros/latex/contrib/exesheet/exesheet.pdf
Binary files differ
diff --git a/macros/latex/contrib/pageslts/README b/macros/latex/contrib/pageslts/README
index 490ea9aaa5..8a28405692 100644
--- a/macros/latex/contrib/pageslts/README
+++ b/macros/latex/contrib/pageslts/README
@@ -1,4 +1,4 @@
-README for pageslts package, 2024-12-07, v2.0b
+README for pageslts package, 2024-12-23, v2.0c
TABLE OF CONTENTS
@@ -143,7 +143,7 @@ h) Copy the documentation files to
The pageslts.sty for LaTeX2e (i.e. all documents using the
pageslts package) requires:
-- TeXFormat LaTeX2e, 2024-06-01
+- TeXFormat LaTeX2e, 2024-11-01
- package undolabl, 2024-12-05, v1.0n,
https://ctan.org/pkg/undolabl
- if any of the options alphMult, AlphMulti, or fnsymbolmult
@@ -152,12 +152,12 @@ pageslts package) requires:
The pageslts-example.tex requires the same files as all
documents using the pageslts package, and additionally:
-- class article, 2024/02/08, v1.4n, from classes.dtx: https://ctan.org/pkg/classes
+- class article, 2024/06/29, v1.4n, from classes.dtx: https://ctan.org/pkg/classes
- package alphalph, 2019/12/09, v2.6, https://ctan.org/pkg/alphalph
- package lipsum, 2021-09-20, v2.7, https://ctan.org/pkg/lipsum
- package showkeys, 2024/05/23, v3.21, https://ctan.org/pkg/showkeys
-- package hyperref, 2024-10-30, v7.01k, https://ctan.org/pkg/hyperref
-- package pageslts, 2024-12-06, v2.0b, https://ctan.org/pkg/pageslts
+- package hyperref, 2024-11-05, v7.01l, https://ctan.org/pkg/hyperref
+- package pageslts, 2024-12-23, v2.0c, https://ctan.org/pkg/pageslts
(Well, it is the example file for this package, and because
you are reading the README for the pageslts package,
it can be assumed that you already have some version of it
diff --git a/macros/latex/contrib/pageslts/pageslts-example.pdf b/macros/latex/contrib/pageslts/pageslts-example.pdf
index ec37cf643a..780b255316 100644
--- a/macros/latex/contrib/pageslts/pageslts-example.pdf
+++ b/macros/latex/contrib/pageslts/pageslts-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/pageslts/pageslts.dtx b/macros/latex/contrib/pageslts/pageslts.dtx
index ac421fabe2..b2944ddc63 100644
--- a/macros/latex/contrib/pageslts/pageslts.dtx
+++ b/macros/latex/contrib/pageslts/pageslts.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: pageslts.dtx
-% Version: 2024-12-07 v2.0b
+% Version: 2024-12-23 v2.0c
% Info: Variants of last page labels
%
% Copyright © 2010 - 2024 by
@@ -54,7 +54,7 @@
\input docstrip.tex
\Msg{**********************************************************************************}
\Msg{* Installation *}
-\Msg{* Package: pageslts 2024-12-07 v2.0b Refers to special pages' numbers/names (HMM)*}
+\Msg{* Package: pageslts 2024-12-23 v2.0c Refers to special pages' numbers/names (HMM)*}
\Msg{**********************************************************************************}
\keepsilent
@@ -66,7 +66,7 @@
This is a generated file.
Project: pageslts
-Version: 2024-12-07 v2.0b
+Version: 2024-12-23 v2.0c
Info: Variants of last page labels
Copyright (C) 2010 - 2024 by
@@ -174,9 +174,9 @@ In memoriam
%
% \begin{macrocode}
%<*driver>
-\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\NeedsTeXFormat{LaTeX2e}[2024-11-01]
\ProvidesFile{pageslts.drv}%
- [2024-12-07 v2.0b Refers to special pages' numbers/names (HMM)]
+ [2024-12-23 v2.0c Refers to special pages' numbers/names (HMM)]
\documentclass[landscape]{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class
\usepackage{geometry}[2020/01/02]% v5.9 Page Geometry
\usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO)
@@ -251,7 +251,7 @@ In memoriam
% \renewcommand{\indent}{\hspace*{\ltsindent}}
%
% \title{The \xpackage{pageslts} package}
-% \date{2024-12-07 v2.0b}
+% \date{2024-12-23 v2.0c}
% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}}
%
% \maketitle
@@ -901,7 +901,7 @@ In memoriam
%
% \item[-]\DescribeMacro{totpages}
% The \xpackage{totpages} package provides a \texttt{totpages} label similar to
-% \texttt{LastPages}, but |\AtEndDocument| instead of hook |enddocument/afterlastpage|.
+% \texttt{LastPages}, but |\AtEndDocument| instead of hook |enddocument/|\linebreak |afterlastpage|.
% Therefore you should stay with \xpackage{pageslts}.
% The \xpackage{totpages} package additionally computes the number of paper sheets
% needed to (double) print the document (with one, two, three,\ldots{} pages on
@@ -980,11 +980,11 @@ In memoriam
% \section{Example}
% \begin{macrocode}
%<*example>
-\documentclass[british]{article}[2024/02/08]% v1.4n
+\documentclass[british]{article}[2024/06/29]% v1.4n
\usepackage{lipsum}[2021-09-20]% v2.7
\usepackage[draft]{showkeys}[2024/05/23]% v3.21
%% Use final instead of draft to hide the keys. %%
-\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-10-30]% v7.01k
+\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-11-05]% v7.01l
\makeatletter
\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
\hypersetup{extension=pdf,%
@@ -1001,7 +1001,7 @@ In memoriam
}}{\usepackage{url}[2013/09/16]}% v3.4
\makeatother
\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,%
- romanMult=true,RomanMulti=true]{pageslts}[2024-12-07]% v2.0b
+ romanMult=true,RomanMulti=true]{pageslts}[2024-12-23]% v2.0c
%% These are the default options. %%
\makeatletter
@@ -1043,7 +1043,7 @@ In memoriam
\markboth{Example for pageslts}{Example for pageslts}
This example demonstrates the most common uses of package\newline
-\textsf{pageslts}, v2.0b as of 2024-12-07 (HMM);\newline
+\textsf{pageslts}, v2.0c as of 2024-12-23 (HMM);\newline
\url{https://ctan.org/pkg/pageslts}.\bigskip
The used options were \texttt{pagecontinue=true},
@@ -2361,7 +2361,7 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2024-06-01]
-\ProvidesPackage{pageslts}[2024-12-07 v2.0b Refers to special pages' numbers/names (HMM)]
+\ProvidesPackage{pageslts}[2024-12-23 v2.0c Refers to special pages' numbers/names (HMM)]
% \end{macrocode}
%
@@ -2386,10 +2386,10 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
%
% \begin{macrocode}
\DeclareKeys[pagesLTS]
- {alphMult .store = \pagesLTS@alphMult ,
- alphMult .usage = preamble ,
- AlphMulti .store = \pagesLTS@AlphMulti ,
- AlphMulti .usage = preamble ,
+ {alphMult .store = \pagesLTS@alphMult ,
+ alphMult .usage = preamble ,
+ AlphMulti .store = \pagesLTS@AlphMulti ,
+ AlphMulti .usage = preamble ,
pagecontinue .if = pagesLTS@pagecontinue ,
pagecontinue .usage = load ,
romanMult .if = pagesLTS@romanMult ,
@@ -2397,10 +2397,10 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
RomanMulti .if = pagesLTS@RomanMulti ,
RomanMulti .usage = load ,
fnsymbolmult .if = pagesLTS@fnsymbolmult ,
- fnsymbolmult .usage = load ,
+ fnsymbolmult .usage = load
}
-\SetKeys[pagesLTS]{alphMult=ab,AlphMulti=AB,pagecontinue=true,romanMult=true,romanMult=true,RomanMulti=true,fnsymbolmult=true}
+\SetKeys[pagesLTS]{alphMult=ab,AlphMulti=AB,pagecontinue=true,romanMult=true,RomanMulti=true,fnsymbolmult=true}
\DeclareUnknownKeyHandler[pagesLTS]{%
\PackageError{pageslts}{Unknown option "\CurrentOption"}{%
@@ -2847,7 +2847,8 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
%
% \begin{macrocode}
\AddToHookWithArguments{cmd/pagesLTS@ifcounter/before}{%
- \PackageError{pageslts}{Old command \string\pagesLTS@ifcounter\space used}{Replace by \string\pagesLTS@providecounter.}%
+ \PackageError{pageslts}{Old command \string\pagesLTS@ifcounter\space used}{%
+ Replace by \string\pagesLTS@providecounter.}%
}%
}
@@ -3797,7 +3798,7 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
% page numbering scheme as argument:
%
% \begin{macrocode}
- \pagenumbering{\pagesLTS@tmpQ}%
+ \expandafter\pagenumbering\expandafter{\pagesLTS@tmpQ}%
% \end{macrocode}
%
% This resets the page to one (if option |pagecontinue=false| was chosen),
@@ -4521,7 +4522,7 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
% \DescribeMacro{pageslts.dtx}
% For unpacking the |pageslts.dtx| file and constructing the documentation it is required:
% \begin{description}
-% \item[-] \TeX Format \LaTeXe{} 2024-06-01: \url{https://CTAN.org}
+% \item[-] \TeX Format \LaTeXe{} 2024-11-01: \url{https://CTAN.org}
%
% \item[-] document class \xclass{ltxdoc}, 2024/02/08, v2.1j, \url{https://ctan.org/pkg/ltxdoc}
%
@@ -4535,12 +4536,12 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
% \end{description}
%
% \DescribeMacro{pageslts.sty}
-% The |pageslts.sty| for \LaTeXe{} $\geq$ 2024-06-01 (i.\,e.~all documents using the
+% The |pageslts.sty| for \LaTeXe{} $\geq$ 2024-11-01 (i.\,e.~all documents using the
% \xpackage{pageslts} package) requires:
% \begin{description}
-% \item[-] \TeX{} Format \LaTeXe{} 2024-06-01, \url{https://CTAN.org}
+% \item[-] \TeX{} Format \LaTeXe{} 2024-11-01, \url{https://CTAN.org}
%
-% \item[-] package \xpackage{undolabl}, 2023-02-14, v1.0m, \url{https://ctan.org/pkg/undolabl}
+% \item[-] package \xpackage{undolabl}, 2024-12-05, v1.0n, \url{https://ctan.org/pkg/undolabl}
%
% \item[-] package \xpackage{kvoptions}, 2022-06-15, v3.15, \url{https://ctan.org/pkg/kvoptions}
%
@@ -4548,14 +4549,14 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
% package \xpackage{alphalph}, 2019/12/09, v2.6,\newline \url{https://ctan.org/pkg/alphalph}
%
% \item[-] if |\pagenumbering{silly}| shall be used, the \xpackage{sillypage} package
-% must be loaded, 2023-07-23, v1.7,\newline \url{https://www.ctan.org/pkg/sillypage}
+% must be loaded, 2024-07-23, v1.7,\newline \url{https://www.ctan.org/pkg/sillypage}
% \end{description}
%
% \DescribeMacro{pageslts-example.tex}
% The |pageslts-example.tex| requires the same files as all documents using the
% \xpackage{pageslts} package, and additionally:
% \begin{description}
-% \item[-] class \textsf{article}, 2024/02/08, v1.4n, from \textsf{classes.dtx}: \url{https://ctan.org/pkg/classes}
+% \item[-] class \textsf{article}, 2024/06/29, v1.4n, from \textsf{classes.dtx}: \url{https://ctan.org/pkg/classes}
%
% \item[-] package \xpackage{alphalph}, 2019/12/09, v2.6, \url{https://ctan.org/pkg/alphalph}
%
@@ -4563,9 +4564,9 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
%
% \item[-] package \xpackage{showkeys}, 2024/05/23, v3.21, \url{https://ctan.org/pkg/showkeys}
%
-% \item[-] package \xpackage{hyperref}, 2024-10-30, v7.01k, \url{https://ctan.org/pkg/hyperref}
+% \item[-] package \xpackage{hyperref}, 2024-11-05, v7.01l, \url{https://ctan.org/pkg/hyperref}
%
-% \item[-] package \xpackage{pageslts}, 2024-12-07, v2.0b, \url{https://ctan.org/pkg/pageslts}\newline
+% \item[-] package \xpackage{pageslts}, 2024-12-23, v2.0c, \url{https://ctan.org/pkg/pageslts}\newline
% (Well, it is the example file for this package, and because you are reading the
% documentation for the \xpackage{pageslts} package, it can be assumed that you already
% have some version of it~-- is it the current one?)
@@ -5036,6 +5037,10 @@ Last page's \textit{number} (LastPages): \lastpageref{LastPages}{\hskip3em }
% \item Missing |\if@filesw \fi| added.
% \item Recent \xpackage{undolabl} package ($\geq$ 2024-12-05 v1.0n) required!
% \end{Version}
+% \begin{Version}{2024-12-23 v2.0c}
+% \item Bug fix: Error handling for missing |\pagenumbering| now needs
+% two \mbox{\texttt{\textbackslash}|expandafter|\,s.}
+% \end{Version}
% \end{History}
% \bigskip
%
diff --git a/macros/latex/contrib/pageslts/pageslts.pdf b/macros/latex/contrib/pageslts/pageslts.pdf
index 491793e218..7046225de5 100644
--- a/macros/latex/contrib/pageslts/pageslts.pdf
+++ b/macros/latex/contrib/pageslts/pageslts.pdf
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/README.md b/macros/xetex/latex/hduthesis/README.md
index ed26215292..6a92084e29 100644
--- a/macros/xetex/latex/hduthesis/README.md
+++ b/macros/xetex/latex/hduthesis/README.md
@@ -1,7 +1,6 @@
## 杭州电子科技大学学位论文 LaTeX 模板
-杭州电子科技大学学位论文 LaTeX 模板以 `LaTeX-expl3` 构建.
-模板提供杭州电子科技大学学士和硕士学位论文模板.
+杭州电子科技大学学位论文 LaTeX 模板以 `LaTeX-expl3` 构建,提供杭州电子科技大学学士和硕士学位论文格式.
`hduThesiS` 的模块提供以下支持:
@@ -39,7 +38,7 @@ Modules of `hduThesiS` provide the following supports:
- `hdu.l3doc`: Configuration for class's `l3doc` manual
-**Welcome to pull requests [here](https://github.com/xiamyphys/hduthesis).**
+**Welcome to pull requests [here](https://github.com/myhsia/hduthesis).**
## License
@@ -53,18 +52,18 @@ The Current Maintainer of this work is [Mingyu Xia](https://www.ctan.org/author/
#### References
-> [1]. The LaTeX3 Interfaces
+> \[1\]. The LaTeX3 Interfaces
-> [2]. CTeX 宏集
+> \[2\]. CTeX 宏集
-> [3]. LaTeX for package and class authors current version
+> \[3\]. LaTeX for package and class authors current version
-> [4]. The LaTeX2e Sources
+> \[4\]. The LaTeX2e Sources
-> [4]. The LaTeX3 kernel: style guide for code authors
+> \[5\]. The LaTeX3 kernel: style guide for code authors
-> [5]. Package `etoolbox`, `geometry`, `tocloft`, `fancyhdr`, etc.
+> \[6\]. Package `etoolbox`, `geometry`, `tocloft`, `fancyhdr`, etc.
-> [6]. [毕业设计(论文)的写作规范及格式要求(含写作模板)](https://jwc.hdu.edu.cn/2022/0428/c4555a153813/page.htm)
+> \[7\]. [毕业设计(论文)的写作规范及格式要求(含写作模板)](https://jwc.hdu.edu.cn/2022/0428/c4555a153813/page.htm)
-> [7]. [杭州电子科技大学研究生学位论文格式统一要求(杭电研〔2012〕311号)](https://grs.hdu.edu.cn/2013/0507/c1730a51754/page.htm)
+> \[8\]. [杭州电子科技大学研究生学位论文格式统一要求(杭电研〔2012〕311号)](https://grs.hdu.edu.cn/2013/0507/c1730a51754/page.htm)
diff --git a/macros/xetex/latex/hduthesis/doc/cha/abstract.tex b/macros/xetex/latex/hduthesis/doc/cha/abstract.tex
new file mode 100644
index 0000000000..3bf688b19b
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/abstract.tex
@@ -0,0 +1,12 @@
+\begin{abstract}
+ \hologo{hduthesis} 是杭州电子科技大学学位论文 \hologo{LaTeX} 模板,支持学士、硕士学位论文排版.
+\end{abstract}
+
+\begin{center}
+ \small\bfseries 用户协议
+\end{center}
+\begin{enumerate} [ itemsep = 0pt ] \small
+ \item 本模板通过 LPPL 1.3c 协议开放源代码,您可以随意使用编译出的 PDF 文件.
+ \item 本模板根据杭州电子科技大学教务处颁发的 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 编写而成,作者不对使用本模板产生的格式审查问题负责. \emph{如果您所在的学院因论文查重、收录等原因要求提交 \file{.docx} 格式,不接收 \file{.pdf} 论文稿件,请勿执意使用本模板,避免因格式转换带来不必要的麻烦.} 使用本模板时,请按编译错误提示操作来勾选同意用户协议.
+ \item 欢迎前往 GitHub 提交反馈意见,为推动学校认证与规范化 \hologo{hduthesis} 贡献力量.
+\end{enumerate} \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/doc/cha/contents.tex b/macros/xetex/latex/hduthesis/doc/cha/contents.tex
new file mode 100644
index 0000000000..72a5eb84da
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/contents.tex
@@ -0,0 +1,345 @@
+\section{\hologo{hduthesis} 模板介绍}
+
+\hologo{hduthesis}(\textbf Hangzhou \textbf Dianzi \textbf University \hologo{LaTeX} \textbf{Thesis} Template) 是杭州电子科技大学学位论文 \underline{非官方} \hologo{LaTeX} 模板,以 \hologo{LaTeX3} 构建,支持学士和硕士学位论文排版.
+
+本模板文档将尽量完整地介绍模板的使用方法,如有不清楚之处,或者想提出改进建议,可以在 \href{https://github.com/myhsia/hduthesis/issues}{GitHub Issues} 提交反馈意见及贡献代码.
+
+对于未接触过 \hologo{LaTeX} 的初学者,推荐阅读
+\href{https://tug.ctan.org/info/lshort/english/lshort.pdf}
+ {\emph{The Not So Short Introduction to \hologo{LaTeX2e}}}
+(可在终端执行 \cmd{texdoc lshort} 获取)或者其中文版
+\href{http://mirrors.ctan.org/info/lshort/chinese/lshort-zh-cn.pdf}
+ {\emph{《一份(不太)简短的 \hologo{LaTeX2e} 介绍》}}
+(可在终端执行 \cmd{texdoc lshort-zh-cn} 获取).
+
+\subsection{模板组成}
+
+\hologo{hduthesis} 模板的 \file{./tex/} 文件夹中包含了模板的所有 Runtime 文件.
+其中,\file{hduthesis.cls} 是模板的核心文件,实质上并不提供主要功能,只用于对全局选项的控制加载模板的各个模块. 模板的功能模块如下
+
+\begin{tasks}(2)
+ \task! \file{typeset}:排版模块,用于控制字体和公式设置.
+ \task! \file{layout}:版面模块,用于提供封面所用到的盒子和对输入文档信息的处理.
+ \task \file{bc.config}:本科学位论文配置模块.
+ \task \file{pg.config}:硕士学位论文配置模块.
+ \task \file{hdu.l3doc}:用户手册模块.
+ \task \file{hdu.stationery}:信纸模块.
+\end{tasks}
+
+以上模块包含在 \file{hduthesis-}\meta{模块名}\file{-module.code.tex} 文件中.
+同时,\file{./tex/} 文件夹中还包含了 \file{hdulogo.pdf}、\file{hdutitle.pdf}、\file{hdumotto.pdf}、\file{hdubadge.pdf},分别提供杭州电子科技大学校徽、校名、校训和校牌的矢量图.
+\footnote
+ {
+ 这些矢量图均由 \href{https://www.hdu.edu.cn/666/list.htm}{校情纵览/校标规范} 所提供素材用 \href{https://inkscape.org}{Inkscape} 裁切制成. 如果你通过 \cmd{tlmgr} 安装了此模板,在其他文档类中也可以调用这些素材,并支持在 \hologo{XeLaTeX} 和 \hologo{pdfLaTeX} 编译器下使用 \cmd{Ti\textit k\/Z} 等方式设置透明度.
+ }
+
+模板预制的宏包有
+
+\begin{table}[htbp]
+ \centering \renewcommand* \arraystretch {.72}
+ \begin{tabularx}{\linewidth}{*{9}{>{\footnotesize}X}}
+ \toprule
+ \pkg{amssymb} & \pkg{bm} & \pkg{booktabs} &
+ \pkg{cancel} & \pkg{circuitikz} & \pkg{cleveref} &
+ \pkg{derivative} & \pkg{extarrows} & \pkg{fixdif} \\
+ \midrule
+ \pkg{hyperref} & \pkg{listings} & \pkg{mathtools} &
+ \pkg{multicol} & \pkg{pgfplots} & \pkg{physics2} &
+ \pkg{siunitx} & \multicolumn{2}{>{\footnotesize}l}{\pkg{unicode-math}}\\
+ \bottomrule
+ \end{tabularx}
+\end{table}
+
+\subsection{文件结构}
+
+\subsubsection{用户手册}
+
+\begin{center}
+ \begin{minipage}{.36\linewidth}
+ \dirtree
+ {%
+ .1 ./doc/.
+ .2 hduthesis.tex.
+ .2 hduthesis.pdf.
+ }
+ \end{minipage}
+ \hfill
+ \begin{minipage}{.6\linewidth}
+ \dirtree
+ {%
+ .1 ./example/.
+ .2 hduthesis-bc.tex, hduthesis-bc.pdf.
+ .2 hduthesis-pg.tex, hduthesis-pg.pdf.
+ }
+ \end{minipage}
+\end{center}
+
+\subsubsection{Runtime 文件}
+
+\dirtree
+ {%
+ .1 ./tex/.
+ .2 hduthesis.cls.
+ .2 hduthesis-typeset-module.code.
+ .2 hduthesis-layout-module.code.
+ .2 hduthesis-bc.config-module.code.
+ .2 hduthesis-pg.config-module.code.
+ .2 hduthesis-hdu.l3doc-module.code.
+ .2 hduthesis-hdu.stationery-module.code.
+ .2 hdulogo.pdf, hdutitle.pdf, hdumotto.pdf, hdubadge.pdf.
+ }
+
+\subsubsection{许可证}
+
+\dirtree
+ {%
+ .1 ./LICENSE, README.md.
+ }
+\section{模板安装}
+
+\subsection{系统要求}
+
+本模板支持在 \cmd{macOS}、\cmd{Windows}、\cmd{Linux}、\cmd{Overleaf}、\cmd{TeXPage} 等平台使用.
+\footnote
+ {
+ 所使用的测试平台为 \cmd{macOS Sequoia Version 15.3}、\cmd{Ubuntu 24.04.1 LTS}、\cmd{Overleaf} 上的 \hologo{TeX} Live 2024 发行版,本模板均可顺利编译.
+ }
+本模板最低兼容发行版 \hologo{TeX} Live 2022,推荐使用 \hologo{TeX} Live 2023 或更新版本.
+\footnote
+ { 发行版 \hologo{TeX} Live 2022 中不包含 \pkg{physics2} 宏包,无法快捷输入等高括号. }
+\footnote
+ {
+ 发行版 \hologo{TeX} Live 2022 中通过导言区设置中文字体伪粗体和伪斜体时可能遇到报错. 详情请见 3.2 节.
+ }
+\footnote
+ {
+ 根据 \emph{Plan for \hologo{TeX} Live 2025: 22feb: code freeze for final build, major bug fixes only; 1mar: final updates from CTAN, final doc tweaks.} 本模板将于 2025 年 2 月 22 日移除对 \hologo{TeX} Live 2022 的兼容,建议 \hologo{TeX} Live 2022 用户尽快升级至最新发行版.
+ }
+使用本模板生成学位论文,仅支持 \hologo{XeLaTeX} 编译;使用本模板生成信纸,支持 \hologo{pdfLaTeX} 编译.
+
+\subsection{标准安装}
+
+强烈建议您使用 \cmd{tlmgr} 进行安装与升级. 在终端(Terminal)执行以下命令即可安装最新版本的 \hologo{hduthesis} 模板.
+
+\begin{framed}
+ \begin{verbatim}
+ sudo tlmgr install hduthesis
+ \end{verbatim}
+\end{framed}
+
+Windows 系统用户无需 \verb|sudo|,请以管理员身份运行命令提示符. 有些时候,您需要手动更新 \cmd{tlmgr}
+
+\begin{framed}
+ \begin{verbatim}
+ sudo tlmgr update --self
+ \end{verbatim}
+\end{framed}
+
+才能正常使用 \cmd{tlmgr} 命令安装宏包.
+如果您的 \hologo{TeX} 发行版不支持 \cmd{tlmgr},请尽快升级您的 \hologo{TeX} 发行版.
+升级该模板,在终端(Terminal)执行以下命令即可
+
+\begin{framed}
+ \begin{verbatim}
+ sudo tlmgr update hduthesis
+ \end{verbatim}
+\end{framed}
+
+\subsection{手动安装}
+
+本模板已上传至 CTAN、GitHub 和 Gitee 平台. 可以直接从三个平台下载最新版本的 \hologo{hduthesis} 模板. 下载后,将 \file{./hduthesis/tex/} 文件夹中的所有 (runtime) 文件复制到 \file{./hduthesis/example/} 目录下,即可编译 \file{./hduthesis/example/} 文件夹中的样例.
+
+\section{全局选项}
+
+\subsection{用户协议}
+
+使用本模板编译本科、硕士学位论文时遇到``编译受阻''报错,请认真阅读封面的用户协议.
+添加选项 \cmd{agreed} 后(即\verb|\documentclass [ agreed ] { hduthesis }|),方可顺利编译,\emph{并默认您已同意用户协议}.
+
+使用 \hologo{hduthesis} 编译信纸和本用户手册时,无需 \cmd{agreed} 选项.
+
+\subsection{字体设置}
+
+用户可通过全局选项设置文档的数学和中文字体. 设置的方式为键值对,键 \keys{\cmdmac~math-font} 用于设置数学字体,键 \keys{\cmdmac~CJKmain-font} 用于设置中文字体,键 \keys{\cmdmac~CJKsans-font} 用于设置中文无衬线字体. 以下是设置示例.
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass
+ [
+ math-font = STIX Two Math, agreed,
+ CJKmain-font = {{Songti SC}[AutoFakeBold = 2.5, AutoFakeSlant]},
+ CJKsans-font = {{STHeiti}[AutoFakeBold = 2]}
+ ] {hduthesis}
+ \end{verbatim}
+\end{framed}
+
+如果你使用的是 \hologo{TeX} Live 2022,设置中文字体的伪粗体和伪斜体时可能会遇到报错.
+在此发行版中,最多能对两个选项中的其一赋强度值,且被赋值选项需放在未被赋值选项前.
+
+更加详细的字体设置请参考 \pkg{xeCJK} 宏包的文档.
+
+\section{文档信息设置}
+
+\begin{function}{\DocInfo}
+ \begin{syntax}
+ \cs{DocInfo}\marg{keyvals}
+ \end{syntax}
+
+ 此命令接收键值,用于设置文档信息. 键 \keys{\cmdmac~title} 用于设置论文标题,键 \keys{\cmdmac~department} 用于设置学院,键 \keys{\cmdmac~major} 用于设置专业,键 \keys{\cmdmac~class} 用于设置班级,键 \keys{\cmdmac~stdntid} 用于设置学号,键 \keys{\cmdmac~author} 用于设置作者,键 \keys{\cmdmac~supervisor} 用于设置导师,键 \keys{\cmdmac~bibsource} 用于设置插入参考文献文件源. 命令会根据输入的学号自动判断使用者为本科生/研究生.
+
+ 命令 \cs{DocInfo} 需在导言区中执行. 完成文档信息输入后,在 \verb|\begin{document}| 后执行命令 \cs{maketitle} 会调用所设置的键值自动生成 \emph*{论文封面} 和 \emph*{目录}.
+\end{function}
+
+本科生输入样例如下. 需要使用键 \keys{\cmdmac~title} 设置类型为毕业设计/毕业论文,使用斜线 (/) 分隔,如 \cmd{title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文}.
+
+\begin{framed}
+ \begin{verbatim}
+ \DocInfo
+ {
+ title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/
+ 本科毕业设计, department = 理学院, major = 物理学,
+ bibsource = reference, class = 英才班, stdntid = C668668E,
+ author = 申智能, supervisor = 教授:葉芷晴,
+ }
+ \end{verbatim}
+\end{framed}
+
+研究生输入样例如下. 硕士学位论文扉页需同时有英文版,因此需要在键 \keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~supervisor} 中分别输入中文和英文信息,中英信息使用斜线 (\cmd/) 分隔,指导教师职称和姓名之间用半角冒号 (\cmd:) 分隔.
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass { hduthesis }
+ \DocInfo
+ {
+ title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/
+ \hologo{LaTeX} Template for Thesis at
+ Hangzhou Dianzi University,
+ major = 物理学, stdntid = 216686680,
+ author = 申智能/SAN Chi Nan, bibsource = reference
+ supervisor = 教授:葉芷晴/Prof.:YIP Tsz Ching,
+ }
+ \end{verbatim}
+\end{framed}
+
+\subsection{生成封面 \& 扉页}
+
+在正文区域,使用命令 \cmd{maketitle} 即可生成论文封面和扉页. 生成的封面和扉页会根据所设置的文档信息自动生成.
+
+\DescribeMacro{\l__hduthesis_grade_int}
+封面上的论文完成日期和学生毕业年份会根据当前系统时间自动生成.
+针对本科论文,如果当前月份在8月及以前,毕业年份会显示今年;如果当前月份在9月及以后,毕业年份会显示次年. 在 \cs{DocInfo} 后对整型 \cs{l__hduthesis_grade_int} 重新赋值可手动更改毕业年份.
+
+\begin{syntax}
+ \cs{ExplSyntaxOn} \cs{int_set:Nn} \cs{l__hduthesis_grade_int} \marg{Year} \cs{ExplSyntaxOff}
+\end{syntax}
+
+\subsection{生成承诺书}
+
+\begin{function}{\commitment}
+ \begin{syntax}
+ \cs{commitment} \oarg{file1/yyyy-mm-dd, file2/yyyy-mm-dd, file3/yyyy-mm-dd}
+ \end{syntax}
+
+ 此命令用于生成承诺书. 命令的可选参数接收数组,用于指定签名文件和输入签名的日期. 签名文件和签名的日期之间用 \cmd{/} 分隔,多组签名之间用 \cmd{,} 分隔. 签名文件接收 \file{.pdf} / \file{.png} / \file{.jpg} 等格式. 日期的输入格式为 \texttt{yyyy-mm-dd}.
+\end{function}
+
+对于本科生,只需要签署 ``\emph*{诚信承诺}'' 一组签名;对于研生,则需要签署 ``\emph*{原创性声明}''、``\emph*{(作者同意)学位论文使用授权声明}'' 和 ``\emph*{(导师同意)学位论文使用授权声明}'' 三组签名. 使用用例如下
+
+\begin{framed}
+ \begin{verbatim}
+ % 本科生使用用例
+ ... \maketitle ... \commitment [ example-image-a/2024-05-31 ] ...
+ % 研究生使用用例
+ ... \maketitle ...
+ \commitment
+ [
+ example-image-a/2025-05-31, example-image-a/2025-05-31,
+ example-image-b/2025-06-01
+ ]
+ \end{verbatim}
+\end{framed}
+
+如果使用者暂未生成签名但是需要添加日期,则将签名文件留空即可,但分隔符 \cmd{/} 仍需保留. 例如
+\verb|\commitment [ /2024-05-31 ]|. 如果不需要添加日期,则直接留空即可.
+
+下两页分别为所生成的本科和硕士学位论文封面、扉页和承诺书缩略图. 可在终端执行 \cmd{texdoc hduthesis-bc} 和 \cmd{texdoc hduthesis-pg} 分别获取本科和硕士学位论文样例文件.
+
+\includepdfmerge
+ [ nup = 2x3, frame, linktodoc, scale = 0.96, delta = 1in .25in ]
+ { /Users/myhsia/Documents/GitHub/hduthesis/example/hduthesis-bc.pdf, 1-2,
+ /Users/myhsia/Documents/GitHub/hduthesis/example/hduthesis-pg.pdf, 1-4 }
+
+\section{章节设置}
+
+\subsection{输入中 / 英摘要}
+
+\DescribeEnv{abstract}
+环境 \env{abstract} 用于生成摘要,其可选参数可设置语言格式.
+
+\DescribeMacro{\keywords}
+命令 \cs{keywords} 需在 \env{abstract} 环境内执行,其会根据 \env{abstract} 环境所选择的语言,自动生成英文 / 中文格式的关键词.
+
+\begin{framed}
+ \begin{verbatim}
+ \begin{abstract}[en]...\keywords{keyword1, keyword2} \end{abstract}
+ \begin{abstract}[cn]...\keywords{关键词1, 关键词2} \end{abstract}
+ \end{verbatim}
+\end{framed}
+
+通过命令 \cs{keywords} 以半角逗号 (,) 为分隔输入关键词列表,输出时会根据所处 \env{abstract} 环境选择的语言不同,自动以半 / 全角分号分隔.
+
+\subsection{输入目录 \& 正文}
+
+通过命令 \cs{tableofcontents} 可生成目录. \cs{chapter}、\cs{section}、\cs{subsection} 等章节级次均按照 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 定制.
+
+\subsection{参考文献 \& 附录}
+
+通过命令 \cs{DocInfo} 指定 \file{.bib} 文件后使用命令 \cs{printbiblography} 即可输出参考文献列表. 参考文献格式已设置为 \cmd{gb7714-2015}. 若未指定参考文献 \file{.bib} 文件,为加速编译,\pkg{gbt7714} 宏包将不会加载.
+
+可以直接使用带有星号的章节命令生成附录章节,如 \verb|\chapter*{附录}|.
+
+\clearpage
+
+\section{附加模块}
+
+\subsection{杭州电子科技大学信纸}
+
+加载全局选项 \pkg{stationery},并进行文档信息设置,即可生成信纸. 可用于推荐信撰写或生成笔记纸.
+此模块无需 \pkg{agreed} 选项.
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass [ stationery ] { hduthesis }
+ \end{verbatim}
+\end{framed}
+
+与学士 / 硕士学位论文文档信息设置类似,使用 \cs{DocInfo} 命令,对信件主题、发件人、邮箱、日期和水印进行设置. 此时 \cs{DocInfo} 命令接受键
+\keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~mail}
+\keys{\cmdmac~date} \keys{\cmdmac~watermark}. 下页为生成信纸的样例.
+
+\begin{framed}
+ \begin{verbatim}
+ \DocInfo
+ {
+ title = Recommendation Letter for SAN Chi Nan,
+ author = YIP Tsz Ching, mail = email@server.domain,
+ date = {23\textsuperscript{th} December, 2024},
+ watermark = true
+ }
+ \end{verbatim}
+\end{framed}
+
+若要在信纸上添加笔记线,可使用命令 \cs{noteLine}\oarg{num},其可选参数接收笔记线的数量,默认值为20. 下两页分别为生成的信纸和笔记纸样例,可在终端执行 \cmd{texdoc hduthesis-stationery} 获取此样例文件.
+
+\subsection{用户手册}
+
+本手册为 \cls{hduthesis} 加载选项 \pkg{l3doc} 后生成,此模块无需 \pkg{agreed} 选项.
+
+\begin{framed}
+ \begin{verbatim}
+ \documentclass [ l3doc ] { hduthesis }
+ \end{verbatim}
+\end{framed}
+
+\includepdf[pages = -, nup = 1x2, angle = -90, frame, linktodoc, scale = 0.96, delta = 0in .25in]
+ {/Users/myhsia/Documents/GitHub/hduthesis/example/hduthesis-stationery} \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source.tex b/macros/xetex/latex/hduthesis/doc/cha/source.tex
new file mode 100644
index 0000000000..c92777877f
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source.tex
@@ -0,0 +1,18 @@
+\ExplSyntaxOn
+\pagecolor{black!\fpeval{100-3200/255}}
+\color{black!10} \color_select:n{black!10} \appendix
+\colorlet{bg}{black!\fpeval{100-2400/255}}
+\hypersetup
+ { filecolor = DarkGreen!40, urlcolor = MidnightBlue!40,
+ linkcolor = FireBrick!40 }
+\cfoot{\color_select:n{black!10} \thepage}
+\lhead{} \rhead{} \let \headrule \relax
+\pagestyle{fancy}
+\ExplSyntaxOff
+\section{实现细节}
+
+恭喜你已经阅读到了这部分!如你所见,页面已经变成了程序员视力友好颜色. 下面这些内容面向 \hologo{LaTeX} 宏包开发者或者对 \hologo{hduthesis} 开发感兴趣的用户,如果您有任何意见或建议或想法,都欢迎到 \href{https://github.com/myhsia/hduthesis/issues}{GitHub} 提交Issue. 您对模板开发或者本文档的撰写的任何贡献都会受到诚挚欢迎!
+
+\setlength {\parindent} {0em}
+
+\foreach \i in {1,...,7} { \input{cha/source/a\i.tex} } \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source/a1.tex b/macros/xetex/latex/hduthesis/doc/cha/source/a1.tex
new file mode 100644
index 0000000000..4bb5fd10be
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source/a1.tex
@@ -0,0 +1,224 @@
+\subsection{\file{hduthesis.cls} 的实现}
+
+文档类日期/版本号/开发者id
+\begin{minted} [ linenos, bgcolor = bg, breaklines ] {tex}
+ \def\hduthesis@date{2024/12/23}
+ \def\hduthesis@version{0.5.0}
+ \def\hduthesis@maintainerid{myhsia}
+\end{minted}
+
+调用 \pkg{etoolbox} 宏包用于给命令打补丁
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage{etoolbox}
+\end{minted}
+
+提供 \cls{hduthesis} 文档类,设置文档类日期、版本号
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \ProvidesExplClass{hduthesis} {\hduthesis@date} {\hduthesis@version}
+ {LaTeX Class for Thesis at Hangzhou Dianzi University}
+\end{minted}
+
+兼容 \hologo{TeX} Live 2022 及之后的版本. 当对应命令不存在时,在已有命令基础上新增变体
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_if_exist:NF \seq_set_split:Nne
+ { \cs_generate_variant:Nn \seq_set_split:Nnn { Nne } }
+ \cs_if_exist:NF \seq_set_split:Nee
+ { \cs_generate_variant:Nn \seq_set_split:Nnn { Nee } }
+ \cs_if_exist:NF \tl_set:Ne
+ { \cs_generate_variant:Nn \tl_set:Nn { Ne } }
+ \cs_if_exist:NF \tl_gset:Ne
+ { \cs_generate_variant:Nn \tl_gset:Nn { Ne } }
+\end{minted}
+
+定义新命令 \cs{hduthesis_msg_new:nn} 和 \cs{hduthesis_msg_error:nn} 用于新增错误消息和将错误消息广播到 Workspace
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected:Npn \hduthesis_msg_new:nn #1#2
+ { \msg_new:nnn { hduthesis } {#1} {#2} }
+ \cs_new_protected:Npn \hduthesis_msg_error:nn #1#2
+ { \msg_error:nnn { hduthesis } {#1} {#2} }
+\end{minted}
+
+新增错误消息:用户协议
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \hduthesis_msg_new:nn { 用户协议 }
+ { \exp_not:n
+ {
+ hduThesiS~ 编译受阻.~
+ 使用模板前请认真阅读模板说明文档封面上的「用户协议」~
+ 模板作者不对使用本模板产生的格式审查问题负责~
+ 添加选项 `agreed'[\documentclass[agreed]{hduthesis}]~
+ 即可顺利编译并默认代表您已同意本协议.~ 祝君科研顺利!~
+ 如遇问题,可邮件反馈至 xiamyphys@gmail.com.
+ }
+ }
+\end{minted}
+
+对命令 \cs{hduthesis_msg_error:nn} 新增 \cmd{nx} 变体
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_generate_variant:Nn \hduthesis_msg_error:nn { nx }
+\end{minted}
+
+新增错误消息:未找到模块
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \hduthesis_msg_new:nn { not found module }
+ { The~hduthesis~module~`#1'~not~found. }
+\end{minted}
+
+定义命令 \cs{hduthesis_load_module:n} 用于加载模块,若模块不存在则输出错误消息
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected_nopar:Npn \hduthesis_load_module:n #1
+ {
+ \file_if_exist_input:nF { hduthesis-##1-module.code.tex }
+ { \hduthesis_msg_error:nn { not found module } {##1} }
+ }
+\end{minted}
+
+定义命令 \cs{hduthesis_provide_module:n} 用于提供模块
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected_nopar:Npn \hduthesis_provide_module:n #1
+ {
+ \ProvidesExplFile{hduthesis-#1-module.code.tex}
+ {\hduthesis@date}{\hduthesis@version}
+ {hduThesiS~ \text_titlecase:n {#1} ~Module}
+ }
+\end{minted}
+
+定义新数组 \cs{g__hdu_base_class_options_clist},用于存储文档类选项
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \clist_new:N \g__hdu_base_class_options_clist
+\end{minted}
+
+定义文档类选项的键:
+\begin{enumerate}
+ \item 布尔(Bool)值 \keys{\cmdmac~ agreed}:用户是否同意用户协议,初始值 \cmd{false}. 一旦输入 \cmd{agreed} 选项,则将 \cmd{agreed} 设置为 \cmd{true},即 \cmd{agreed} 等价于 \cmd{agreed = true}
+ \item 布尔(Bool)值 \keys{\cmdmac~ l3doc}:是否启用 \cls{l3doc} 文档类,初始值 \cmd{false}. 一旦输入 \cmd{l3doc} 选项,则将 \cmd{l3doc} 设置为 \cmd{true},即 \cmd{l3doc} 等价于 \cmd{l3doc = true}
+ \item 布尔(Bool)值 \keys{\cmdmac~ stationery}:是否启用 \cls{letter} 文档类,初始值 \cmd{false}. 一旦输入 \cmd{stationery} 选项,则将 \cmd{stationery} 设置为 \cmd{true},即 \cmd{stationery} 等价于 \cmd{stationery = true}
+ \item 令牌(token list)\keys{\cmdmac~ math-font}:数学字体
+ \item 令牌(token list) \keys{\cmdmac~ CJKmain-font}:中文主字体
+ \item 令牌(token list) \keys{\cmdmac~ CJKsans-font}:中文无衬线字体
+ \item 令牌(token list) \keys{\cmdmac~ CJKmono-font}:中文等宽字体
+ \item 未知选项 \keys{\cmdmac~ unknown}:将未知选项交给 \cs{__hduthesis_unknown_option:n} 处理
+\end{enumerate}
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \keys_define:nn { hduthesis / classoption }
+ {
+ agreed .bool_set:N = \g__hduthesis_agreement_bool,
+ agreed .initial:n = false,
+ agreed .default:n = true,
+ l3doc .bool_set:N = \g__hduthesis_doc_bool,
+ l3doc .initial:n = false,
+ l3doc .default:n = true,
+ stationery .bool_set:N = \g__hduthesis_stationery_bool,
+ stationery .initial:n = false,
+ stationery .default:n = true,
+ math-font .tl_set:N = \g__hduthesis_math_font,
+ CJKmain-font .tl_set:N = \g__hduthesis_main_CJK_font,
+ CJKsans-font .tl_set:N = \g__hduthesis_sans_CJK_font,
+ CJKmono-font .tl_set:N = \g__hduthesis_mono_CJK_font,
+ unknown .code:n = \__hduthesis_unknown_option:n {#1},
+ }
+\end{minted}
+
+定义命令 \cs{__hduthesis_unknown_option:n} 用于处理未知选项
+
+若未知选项为空,则将 \cs{l_keys_key_str} 加入 \cs{g__hdu_base_class_options_clist} 列表;否则设置 \cs{l_keys_key_str} 为未知选项,并将其加入 \cs{g__hdu_base_class_options_clist} 列表
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected_nopar:Npn \__hduthesis_unknown_option:n #1
+ {
+ \tl_if_empty:nTF { #1 }
+ {
+ \clist_gput_right:NV \g__hdu_base_class_options_clist \l_keys_key_str
+ }
+ {
+ \exp_args:NNx \clist_gput_right:Nn \g__hdu_base_class_options_clist
+ { \l_keys_key_str = \exp_not:n {#1} }
+ }
+ }
+\end{minted}
+
+处理文档类选项
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \ProcessKeyOptions [ hduthesis / classoption ]
+\end{minted}
+
+若启用 \cmd{l3doc} 选项,加载 \cls{l3doc} 文档类为基底,加载 \file{hdu.l3doc} 模块并结束输入
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \bool_if:NT \g__hduthesis_doc_bool
+ {
+ \PassOptionsToClass { 11pt, letterpaper } { l3doc }
+ \exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { l3doc }
+ \hduthesis_load_module:n { hdu.l3doc }
+ \endinput
+ }
+\end{minted}
+
+若启用 \cmd{stationery} 选项,加载 \cls{letter} 文档类为基底,加载 \file{hdu.stationery} 模块并结束输入
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \bool_if:NT \g__hduthesis_stationery_bool
+ {
+ \PassOptionsToClass { 12pt } { letter }
+ \exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { letter }
+ \hduthesis_load_module:n { hdu.stationery }
+ \endinput
+ }
+\end{minted}
+
+为基本文档类 \cls{ctexrep} 添加选项 \keys{a4paper, zihao = -4},为 \pkg{xeCJK} 宏包添加选项 \keys{quiet, no-math},加载 \cls{ctexrep} 文档类为基底,并用 \cs{exp_args:NNV} 将未知选项展开加载到 \cls{ctexrep} 文档类上
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \PassOptionsToClass { a4paper, zihao = -4 } { ctexrep }
+ \PassOptionsToPackage { quiet, no-math } { xeCJK }
+ \exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { ctexrep }
+\end{minted}
+
+如果用户未确认用户协议,输出错误消息,并不加载 \pkg{hyperref} 宏包,以免因``遇到报错而停止编译''而产生额外的 \pkg{hyperref} 警告. 否则,加载 \pkg{hyperref} 宏包,设置 \pkg{hyperref} 宏包选项
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \bool_if:NTF \g__hduthesis_agreement_bool
+ {
+ \RequirePackage{hyperref}
+ \pdfstringdefDisableCommands
+ {
+ \def \cite#1 {<#1>}
+ \def \hologoRobust#1 {<#1>}
+ }
+ \AtBeginDocument
+ { \hypersetup { hidelinks, pdfproducer = hduThesiS~by~Mingyu~Xia } }
+ } { \hduthesis_msg_error:nn { 用户协议 } { 未确认 } }
+\end{minted}
+
+预加载部分常用包,设置 \pkg{pgfplots} 宏包版本,设置 \pkg{hologo} 宏包字体,设置 \cs{graphicx} 包的相对路径
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage { siunitx, circuitikz, pgfplots, listings,
+ hologo, lipsum, zhlipsum, booktabs, multicol }
+ \pgfplotsset { compat = newest }
+ \hologoFontSetup { general = \sffamily }
+ \graphicspath
+ {
+ {./figure/}{./figures/}{./image/}{./images/}
+ {./graphics/}{./graphic/}{./pictures/}{./picture/}
+ }
+\end{minted}
+
+加载 \cmd{typeset} 和 \cmd{layout} 模块.
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \hduthesis_load_module:n { typeset }
+ \hduthesis_load_module:n { layout }
+\end{minted}
+
+定义命令 \cs{__hduthesis_docinfo_degree_if_aux} 用于判断学号长度,若学号长度为 8,则加载 \cmd{bc.config} 模块;否则加载 \cmd{bc.config} 或 \cmd{pg.config} 模块. 此命令将用在 \file{hduthesis-docinfo-module.code} 模块中,因为学号长度的判断必须发生在设置文档信息后
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected:Nn \__hduthesis_docinfo_degree_if_aux:
+ {
+ \int_compare:nNnTF { \tl_count:N \l__docinfo_stdntid_tl } = { 8 }
+ { \hduthesis_load_module:n { bc.config } }
+ { \hduthesis_load_module:n { pg.config } }
+ }
+\end{minted}
+
+结束 \file{hduthesis.cls} 文件
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \endinput
+\end{minted} \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source/a2.tex b/macros/xetex/latex/hduthesis/doc/cha/source/a2.tex
new file mode 100644
index 0000000000..8c78b072a8
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source/a2.tex
@@ -0,0 +1,88 @@
+\subsection{\file{hduthesis-typeset-module.code} 的实现}
+
+提供模块 \file{typeset} 文件
+\begin{minted} [ linenos, bgcolor = bg, breaklines ] {tex}
+ \hduthesis_provide_module:n {typeset}
+\end{minted}
+
+设置行间距
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \linespread{1.39}
+\end{minted}
+
+设置首行缩进
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \dim_set:Nn \parindent { 2\ccwd }
+\end{minted}
+
+新定义字体大小 \cs{semilarge} 和 \cs{semiLarge}
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \newcommand \semilarge { \@setfontsize \semilarge{14}{16.5} }
+ \newcommand \semiLarge { \@setfontsize \semiLarge{16.5}{17.5} }
+\end{minted}
+
+设置英文字体
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage{fontspec}
+ \setmainfont{texgyretermes}
+ [
+ Extension = .otf, UprightFont = *-regular, BoldFont = *-bold,
+ ItalicFont = *-italic, BoldItalicFont = *-bolditalic
+ ]
+ \setsansfont{texgyreheros}
+ [
+ Extension = .otf, BoldItalicFont = *-bolditalic,
+ UprightFont = *-regular, BoldFont = *-bold,
+ ItalicFont = *-italic, Scale = .9,
+ ]
+\end{minted}
+
+调用 \pkg{amssymb}, \pkg{mathtools}, \pkg{cancel}, \pkg{fixdif}, \pkg{derivative} 宏包
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage { amssymb, mathtools, cancel, fixdif, derivative }
+\end{minted}
+
+如果存在 \pkg{physics2} 宏包,则调用并配置 \pkg{physics2} 宏包
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \file_if_exist:nTF { physics2.sty }
+ {
+ \RequirePackage{physics2}
+ \usephysicsmodule{ ab, braket, ab.legacy, op.legacy, bm-um.legacy }
+ } { \RequirePackage{bm} }
+\end{minted}
+
+调用 \pkg{unicode-math} 宏包,并关闭警告 \texttt{mathtools-colon} 和 \texttt{mathtools-overbracket}
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage
+ [ warnings-off = { mathtools-colon, mathtools-overbracket } ] {unicode-math}
+\end{minted}
+
+设置数学环境的间距
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \AtBeginDocument
+ {
+ \dim_set:Nn \abovedisplayskip {3pt}
+ \dim_set:Nn \belowdisplayskip {3pt}
+ }
+\end{minted}
+
+设置数学字体
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \tl_if_empty:NF \g__hduthesis_math_font
+ { \setmathfont { \g__hduthesis_math_font } }
+\end{minted}
+
+设置中文字体,保留全局选项键值中的扩号以对应 \pkg{xeCJK} 宏包的接口.
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \tl_if_empty:NF \g__hduthesis_main_CJK_font
+ { \exp_last_unbraced:No \setCJKmainfont \g__hduthesis_main_CJK_font }
+ \tl_if_empty:NF \g__hduthesis_sans_CJK_font
+ { \exp_last_unbraced:No \setCJKsansfont \g__hduthesis_sans_CJK_font }
+ \tl_if_empty:NF \g__hduthesis_mono_CJK_font
+ { \exp_last_unbraced:No \setCJKmonofont \g__hduthesis_mono_CJK_font }
+\end{minted}
+
+结束 \file{hduthesis-typeset-module.code} 文件
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \endinput
+\end{minted}
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source/a3.tex b/macros/xetex/latex/hduthesis/doc/cha/source/a3.tex
new file mode 100644
index 0000000000..979f48225f
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source/a3.tex
@@ -0,0 +1,231 @@
+\subsection{\file{hduthesis-layout-module.code} 的实现}
+
+提供模块 \file{layout} 文件
+\begin{minted} [ linenos, bgcolor = bg, breaklines ] {tex}
+ \hduthesis_provide_module:n {layout}
+\end{minted}
+
+调用 \pkg{geometry}、\pkg{array}、\pkg{setspace}、\pkg{fancyhdr}、\pkg{enumitem}、\pkg{cleveref} 宏包
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage{geometry, array, setspace, fancyhdr, enumitem, cleveref}
+\end{minted}
+
+调用并配置 \pkg{caption} 宏包
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage[skip = 1.75ex, labelsep = quad, font = small]{caption}
+\end{minted}
+
+清空页眉页脚,设置页面样式为 \cmd{fancy}
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \fancyhf{}
+ \pagestyle{fancy}
+\end{minted}
+
+设置页眉线宽为 \cmd{.8pt}
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \renewcommand*\headrulewidth{.8pt}
+\end{minted}
+
+设置图表编号格式为 \texttt{\meta{chapter}-\meta{figure/table}}
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \renewcommand*\thefigure {\arabic{chapter}-\arabic{figure}}
+ \renewcommand*\thetable {\arabic{chapter}-\arabic{table}}
+\end{minted}
+
+设置公式编号格式为 \texttt{\meta{chapter}-\meta{equation}}
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \renewcommand*\theequation {\arabic{chapter}-\arabic{equation}}
+\end{minted}
+
+减小图表后方与正文的间距
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \AddToHook{env/figure/after}{\vspace*{-2.3ex}}
+ \AddToHook{env/table/after}{\vskip-1.9ex}
+\end{minted}
+
+设置 \cmd{enumerate} 环境的编号格式和缩进
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \setlist[enumerate,1]
+ {
+ label = (\,\arabic*\,), itemindent = 4em, leftmargin = 0em,
+ labelsep = 1ex, topsep = 0pt, itemsep = 0pt, partopsep = 0pt,
+ parsep = 0em, listparindent = 2\ccwd
+ }
+\end{minted}
+
+设置引用格式
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \crefformat{figure}{图#2#1#3}
+ \crefformat{table}{表#2#1#3}
+\end{minted}
+
+定义命令 \cs{__hduthesis_cover_spread_box:nn} 和 \cs{__hduthesis_cover_center_box:nn},用于生成封面中的分散与下划线居中对齐盒子.
+\footnote
+ { \color{black!10}
+ 下划线居中对齐盒子的实现参考自 \href{https://tex.stackexchange.com/users/4427/egreg}{@egreg} 在
+ \href{https://tex.stackexchange.com/questions/727960/how-to-center-a-series-of-text-width-a-fixed-width-that-can-automatically-linebr}{tex.stackexchange.com} 的解答.
+ }
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected:Npn \__hduthesis_cover_spread_box:nn #1#2
+ {
+ \mode_leave_vertical:
+ \hbox_to_wd:nn {#1}
+ { \exp_args:Nee \tl_map_inline:nn {#2} { ##1 \hfil } \unskip }
+ }
+ \cs_new_protected:Npn \__hduthesis_cover_center_box:nn #1#2
+ { % by @egreg on tex.stackexchange.com
+ \mode_leave_vertical:
+ \dim_set:Nn \l_tmpa_dim {#1}
+ \global\setbox1 = \box\voidb@x
+ \group_begin:
+ \setbox0 = \vbox
+ {
+ \dim_set:Nn \hsize {#1}\relax
+ \dim_set:Nn \parindent {0pt}
+ \skip_set:Nn \leftskip {0pt plus 1fil}
+ \skip_set:Nn \rightskip {0pt plus -1fil}
+ \skip_set:Nn \parfillskip {0pt plus 2fil}
+ #2 \par
+ \loop
+ \setbox2 = \lastbox
+ \unless\ifvoid2
+ \global\setbox1 = \vtop
+ { \hbox to\hsize{\strut\unhbox2}
+ \vskip-4pt \hrule height .5pt
+ \vskip9.6pt \unvbox1
+ }
+ \unskip\unpenalty
+ \repeat
+ }
+ \group_end:
+ \box1
+ }
+\end{minted}
+
+定义命令 \cs{__hduthesis_process_array:NnnN},用于处理一维或二维数组. 其中一级分隔符为 \texttt{:},二级分隔符为 \texttt{/}.
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected_nopar:Npn \__hduthesis_process_array:NnnN #1#2#3#4
+ {
+ \seq_set_split:Nee \l__hduthesis_process_array_seq { / } {#1}
+ \seq_set_split:Nee \l__hduthesis_process_array_row_seq { \c_colon_str }
+ { \seq_item:Nn \l__hduthesis_process_array_seq {#2} }
+ \tl_if_eq:nnTF {#3} {:}
+ { \tl_gset:Ne #4 { \seq_use:Nn \l__hduthesis_process_array_row_seq {} } }
+ {
+ \tl_gset:Ne #4 { \seq_item:Nn \l__hduthesis_process_array_row_seq {#3} }
+ }
+ \seq_clear:N \l__hduthesis_process_array_seq
+ \seq_clear:N \l__hduthesis_process_array_row_seq
+ }
+\end{minted}
+
+将十二个 \meta{month} 的英文名称存入 \cs{g_system_month_clist} 中
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \clist_set:Nn \g_system_month_clist
+ {
+ January, February, March, April, May, June, July,
+ August, September, October, November, December
+ }
+\end{minted}
+
+定义文档信息的键
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \keys_define:nn { hduthesis / docinfo }
+ {
+ title .clist_set:N = \l__docinfo_title_tl,
+ department .tl_set:N = \l__docinfo_department_tl,
+ major .tl_set:N = \l__docinfo_major_tl,
+ class .tl_set:N = \l__docinfo_class_tl,
+ stdntid .tl_set:N = \l__docinfo_stdntid_tl,
+ author .clist_set:N = \l__docinfo_author_tl,
+ supervisor .tl_set:N = \l__docinfo_supervisor_tl,
+ bibsource .tl_set:N = \l__docinfo_bibsource_tl,
+ }
+\end{minted}
+
+定义用户端文档信息的输入命令
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \NewDocumentCommand \DocInfo { m }
+ {
+ \keys_set:nn { hduthesis / docinfo } {#1}
+ \__hduthesis_docinfo_process_aux:
+ \__hduthesis_docinfo_degree_if_aux:
+ }
+\end{minted}
+
+定义处理文档信息的辅助命令. 其中论文标题与作者信息为一维数组,指导教师信息为二维数组.
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_set_protected_nopar:Nn \__hduthesis_docinfo_process_aux:
+ {
+ \__hduthesis_process_array:NnnN \l__docinfo_title_tl {1} {:} \@title
+ \__hduthesis_process_array:NnnN \l__docinfo_title_tl {2} {:}
+ \l__docinfo_entitle_tl
+ \__hduthesis_process_array:NnnN \l__docinfo_author_tl {1} {:} \@author
+ \__hduthesis_process_array:NnnN \l__docinfo_author_tl {2} {:}
+ \l__docinfo_enauthor_tl
+ \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {1} {1}
+ \l__docinfo_cnrole_tl
+ \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {1} {2}
+ \l__docinfo_cnsupervisor_tl
+ \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {2} {1}
+ \l__docinfo_enrole_tl
+ \__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {2} {2}
+ \l__docinfo_ensupervisor_tl
+ \bool_if:NF \g__hduthesis_agreement_bool
+ { \tl_clear:N \l__docinfo_bibsource_tl }
+ \tl_if_empty:NTF \l__docinfo_bibsource_tl
+ {
+ \newcommand*\printbibliography{\chapter*{参考文献}}
+ \renewcommand*\cite[1]{\textsuperscript{[##1]}}
+ }
+ {
+ \RequirePackage[sort&compress]{gbt7714}
+ \bibliographystyle{gbt7714-numerical}
+ \dim_set:Nn \bibsep {.35ex}
+ \newcommand*\printbibliography
+ {
+ \nocite{*} \bibliography { \l__docinfo_bibsource_tl }
+ \addcontentsline{toc}{chapter}{参考文献}
+ }
+ }
+ }
+\end{minted}
+
+定义处理承诺书签名数组的辅助命令. 其中签名文件名需要展开后存入 \cs{g__hduthesis_signature_file_tl} 中.
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \cs_new_protected_nopar:Npn \__hduthesis_signature_process_aux:nnn #1#2#3
+ {
+ \clist_set:Nn \l__hduthesis_signature_process_clist {#1}
+ \seq_set_split:Nne \l__hduthesis_signature_figure_seq {/}
+ { \clist_item:Nn \l__hduthesis_signature_process_clist {#2} }
+ \int_compare:nNnTF {#3} = {0}
+ {
+ \tl_set:Ne \l__hduthesis_signature_figure_tl
+ { \seq_item:Nn \l__hduthesis_signature_figure_seq { #3 + 1 } }
+ \seq_clear:N \l__hduthesis_signature_figure_seq
+ }
+ {
+ \seq_set_split:Nne \l__hduthesis_signature_date_seq {-}
+ { \seq_item:Nn \l__hduthesis_signature_figure_seq {2} }
+ \seq_item:Nn \l__hduthesis_signature_date_seq {#3}
+ \seq_clear:N \l__hduthesis_signature_date_seq
+ }
+ \clist_clear:N \l__hduthesis_signature_process_clist
+ }
+\end{minted}
+
+定义插入签名图片的命令
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \NewDocumentCommand \signature { m }
+ {
+ \leavevmode@ifvmode
+ \lower \dimexpr \f@size\p@ * 9/16
+ \hbox { \includegraphics [ height = { \fp_eval:n {2*\f@size}\p@ } ] {#1} }
+ }
+\end{minted}
+
+结束模块 \file{hduthesis-layout-module.code} 文件
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \endinput
+\end{minted}
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source/a4.tex b/macros/xetex/latex/hduthesis/doc/cha/source/a4.tex
new file mode 100644
index 0000000000..e6f25c28e8
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source/a4.tex
@@ -0,0 +1,4 @@
+\subsection{\file{hduthesis-bc.config-module.code} 的实现}
+
+\cmd{bc.config} 模块实现的过程略,主要是对前面定义的命令进行调用,并通过 \cs{ctexset}
+或对标准文档类 \cls{report} 中的命令进行重定义. \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source/a5.tex b/macros/xetex/latex/hduthesis/doc/cha/source/a5.tex
new file mode 100644
index 0000000000..a23e800966
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source/a5.tex
@@ -0,0 +1,4 @@
+\subsection{\file{hduthesis-pg.config-module.code} 的实现}
+
+\cmd{pg.config} 模块实现的过程略,主要是对前面定义的命令进行调用,并通过 \cs{ctexset}
+或对标准文档类 \cls{report} 中的命令进行重定义. \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source/a6.tex b/macros/xetex/latex/hduthesis/doc/cha/source/a6.tex
new file mode 100644
index 0000000000..7efec03fbb
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source/a6.tex
@@ -0,0 +1,28 @@
+\subsection{\file{hduthesis-hdu.l3doc-module.code} 的实现}
+
+模块 \file{hdu.l3doc} 的代码实现与之前类似,唯独不同的是添加了两个 \cs{hologo}:
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \def \HoLogo@hduThesiS #1
+ {
+ \raisebox{-.5pt}
+ {
+ \HOLOGO@mbox
+ {
+ \tikz [ baseline = (hduthesis.base) ]
+ {
+ \node [ inner~sep = 0pt ] (hduthesis)
+ {\scshape \sffamily hduThesi\scalebox{1.2}[1.2]{S}};
+ \draw let \p1 = (hduthesis.west), \p2 = (hduthesis.east)
+ in (\x1,\y1) (\x2,\y2) [ line~width = {.028pt * (\x2 - \x1)} ]
+ ([yshift = -.5ex]hduthesis.north~west) to[ bend~right = 5 ]
+ ([yshift = .25ex]hduthesis.north~east);
+ }
+ }
+ }
+ }
+ \def \HoLogo@hduthesis #1
+ { \raisebox{-.5pt} { \HOLOGO@mbox { \scshape \cls{hduThesiS} } } }
+\end{minted}
+
+前者 \hologo{hduThesiS} 使用在本用户手册封面中,将字母 \textsf{S} 放大 1.2 倍,并使用 \pkg{tikz} 绘制一条搭在字母 \textsf{T} 上的曲线. 后者 \hologo{hduthesis} 则单纯地使用无衬线且缩小的大写字体. \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/doc/cha/source/a7.tex b/macros/xetex/latex/hduthesis/doc/cha/source/a7.tex
new file mode 100644
index 0000000000..a1d38534b2
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/doc/cha/source/a7.tex
@@ -0,0 +1,35 @@
+\subsection{\file{hduthesis-hdu.stationery-module.code} 的实现}
+
+模块 \file{stationery} 的代码实现与之前类似. 不同的部分有使用钩子 \cmd{shipout} 来实现水印的添加
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \DeclareHookRule { shipout / background } { hduthesis / stationery }
+ { before } { pgfrcs }
+ \AddToHook { shipout / background } [ hduthesis / stationery ]
+ {
+ \bool_if:NT \g__docinfo_watermark_bool
+ {
+ \tikz [ remember~picture, overlay ]
+ \node [ opacity = .2 ] at (current~page)
+ { \includegraphics [ width = .4\linewidth ] {hdulogo} };
+ }
+ }
+\end{minted}
+
+调用 \pkg{tikzpagenodes} 宏包用于定位版心的边缘,用循环句柄 \cs{int_step_inline:nn} 与 \cs{draw} 命令来实现横线的绘制.
+
+\begin{minted} [ linenos, firstnumber = last, bgcolor = bg, breaklines ] {tex}
+ \RequirePackage{tikzpagenodes}
+ \NewDocumentCommand \notelines {O{20}}
+ {
+ \tikz [ remember~picture, overlay ]
+ {
+ \int_step_inline:nn { #1 - 1 }
+ {
+ \draw [ hdu, very~thick, opacity = .6 ]
+ ([yshift = -##1 * (\textheight + .6in - 15.87pt ) / #1 + .3in]
+ current~page~text~area.north~west) --++ (\linewidth, 0);
+ }
+ }
+ }
+\end{minted}
diff --git a/macros/xetex/latex/hduthesis/doc/hduthesis.pdf b/macros/xetex/latex/hduthesis/doc/hduthesis.pdf
index acfdd8e07c..c60ae766c7 100644
--- a/macros/xetex/latex/hduthesis/doc/hduthesis.pdf
+++ b/macros/xetex/latex/hduthesis/doc/hduthesis.pdf
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/doc/hduthesis.tex b/macros/xetex/latex/hduthesis/doc/hduthesis.tex
index ee4c074375..cc62600e43 100644
--- a/macros/xetex/latex/hduthesis/doc/hduthesis.tex
+++ b/macros/xetex/latex/hduthesis/doc/hduthesis.tex
@@ -1,251 +1,33 @@
\documentclass[l3doc]{hduthesis}
+\usepackage{minted}
+
\DocInfo
{
- title = The \hologo{hduthesis} Class\\
- \hologo{LaTeX} Thesis Template for
- Hangzhou Dianzi University,
- author = Mingyu Xia \mailto{xiamyphys@hdu.edu.cn}
- \footnote{Physics Department, Graduate in 06/2025},
+ title = \hologo{hduThesiS} 文档类\\
+ 杭州电子科技大学学位论文 \hologo{LaTeX} 模板
+ \footnote
+ {
+ 在 杭州电子科技大学非毕业生 / 教师 中寻找模板的继承维护者,
+ 要求熟悉 \pkg{expl3}. 欢迎有意愿者邮件联系作者.
+ },
+ author = Mingyu Xia \mailto{xiamyphys@gmail.com}
+ \footnote{Physics Department, Graduate in 06/2025},
CJKmain-font = {[AutoFakeSlant]{Songti SC}},
CJKsans-font = {[BoldFont = Hei, AutoFakeSlant]{Heiti SC}},
- CJKmono-font = {[AutoFakeSlant]{LXGW WenKai Mono}}
+ CJKmono-font = {[AutoFakeSlant]{Kaiti SC}}
}
\begin{document}
\maketitle
-\begin{abstract}
- \hologo{hduthesis} 是杭州电子科技大学学位论文 \hologo{LaTeX} 模板,支持学士、硕士学位论文排版.
-\end{abstract}
-
-\begin{center}
- \small\bfseries User Agreement
-\end{center}
-\begin{enumerate}\small
- \item 本模板通过 LPPL 1.3c 协议开放源代码,您可以随意使用编译出的 PDF 文件.
- \item 本模板根据杭州电子科技大学教务处颁发的 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 编写而成,作者不对使用本模板产生的格式审查问题负责. \emph{如果您所在的学院因论文查重、收录等原因要求提交 \file{.docx} 格式,不接收 \file{.pdf} 论文稿件,请勿执意使用本模板,避免因格式转换带来不必要的麻烦.} 使用本模板时,请按编译错误提示操作来勾选同意用户协议.
- \item 欢迎前往 GitHub 提交反馈意见,为推动学校认证与规范化 \hologo{hduthesis} 贡献力量.
-\end{enumerate}
-\endtitlepage
-\restoregeometry
-
-\section{Introduction \& Loading \hologo{hduthesis}}
-
-本模板为杭州电子科技大学学位论文 \underline{非官方} \hologo{LaTeX} 模板,
-以 \hologo{LaTeX3} 构建,支持学士和硕士学位论文排版.
-加载 \hologo{hduthesis} 时遇到``编译受阻''报错,请认真阅读上页的用户协议.
-键入全局选项 \cmd{agreed} 后,方可顺利进行编译,并默认您已同意用户协议.
-
-\begin{framed}
- \begin{verbatim}
- \documentclass [ agreed, ... ] { hduthesis }
- \end{verbatim}
-\end{framed}
-
-\section{Generate the Cover}
-
-\begin{function}{\DocInfo}
- \begin{syntax}
- \cs{DocInfo}\marg{keyvals}
- \end{syntax}
-
- 此命令接收键值,用于设置文档信息. 键 \keys{\cmdmac~title} 用于设置论文标题,键 \keys{\cmdmac~department} 用于设置学院,键 \keys{\cmdmac~major} 用于设置专业,键 \keys{\cmdmac~class} 用于设置班级,键 \keys{\cmdmac~stdntid} 用于设置学号,键 \keys{\cmdmac~author} 用于设置作者,键 \keys{\cmdmac~supervisor} 用于设置导师,键 \keys{\cmdmac~bibsource} 用于设置插入参考文献文件源. 命令会根据输入的学号自动判断使用者为本科生/研究生.
-
- 命令 \cs{DocInfo} 需在导言区中执行. 完成文档信息输入后,在 \verb|\begin{document}| 后执行命令 \cs{maketitle} 会调用所设置的键值自动生成 \emph{论文封面} 和 \emph{诚信承诺书}.
-\end{function}
-
-本科生输入样例如下. 需要使用键 \keys{\cmdmac~title} 设置类型为毕业设计/毕业论文,使用斜线 (/) 分隔,如 \cmd{title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文}.
-
-\begin{framed}
- \begin{verbatim}
- \DocInfo
- {
- title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文,
- department = 理学院, major = 物理学, stdntid = 21668668,
- author = 申智能, supervisor = 李智能, bibsource = reference
- }
- \end{verbatim}
-\end{framed}
-
-下页的缩略图为本科毕业论文文档样例 \cmd{hduthesis-bc} 中的封面、扉页和承诺书.
-
-\includepdfmerge
- [ angle = -90, nup = 1x2, frame, linktodoc, scale = 0.96, delta = 0 .25in ]
- { /Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf, 1-2 }
-
-研究生输入样例如下. 硕士学位论文扉页需同时有英文版,因此需要在键 \keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~supervisor} 中分别输入中文和英文信息,中英信息使用斜线 (\cmd/) 分隔. 如作者中文姓名为 \cmd{申智能},英文姓名为 \cmd{SAN Chi Nan},则键值输入格式为 \cmd{author = 申智能/SAN Chi Nan}. 指导教师职称和姓名之间用半角冒号 (\cmd:) 分隔.
-
-\begin{framed}
- \begin{verbatim}
- \documentclass { hduthesis }
- \DocInfo
- {
- title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/
- \hologo{LaTeX} Template for Thesis at
- Hangzhou Dianzi University,
- major = 物理学, stdntid = 216686680,
- author = 申智能/SAN Chi Nan, bibsource = reference
- supervisor = 教授:葉芷晴/Prof.:YIP Tsz Ching,
- }
- \begin{document} \maketitle ... \end{document}
- \end{verbatim}
-\end{framed}
-
-\DescribeMacro{\l__hduthesis_grade_int}
-论文完成日期和学生毕业年份会根据当前系统时间自动生成. 如果当前月份在8月及以前,毕业年份会显示今年;如果当前月份在9月及以后,毕业年份会显示次年. 在 \cs{DocInfo} 后对整型 \cs{l__hduthesis_grade_int} 重新赋值可手动更改毕业年份.
-
-\begin{verbatim}
- \ExplSyntaxOn \int_set:Nn \l__hduthesis_grade_int <Year> \ExplSyntaxOff
-\end{verbatim}
-
-下页包含所生成的硕士学位论文封面、扉页和承诺书缩略图. 此文档样例可在终端执行 \cmd{texdoc hduthesis-pg} 获取.
-
-文档类同时提供了校徽 (\file{hdulogo.pdf})、校名 (\file{hdutitle.pdf}) 、校训 (\file{hdumotto.pdf})和校牌 (\file{hdubadge.pdf}) 的矢量素材,可直接使用. 以上文件均由 \href{https://www.hdu.edu.cn/666/list.htm}{校情纵览/校标规范} 所提供素材裁切制成,均支持在 \hologo{XeLaTeX} 和 \hologo{pdfLaTeX} 编译器下使用 \pkg{Ti\textit k\/Z} 等方式设置透明度.
-
-\includepdfmerge
- [ nup = 2x2, frame, linktodoc, scale = 0.96, delta = .25in .25in ]
- { /Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-pg.pdf, 1-8 }
-
-\section{Enter Abstract in EN / CN}
-
-\DescribeEnv{abstract}
-环境 \env{abstract} 用于生成摘要,其可选参数可设置语言格式.
-
-\DescribeMacro{\keywords}
-命令 \cs{keywords} 需在 \env{abstract} 环境内执行,其会根据 \env{abstract} 环境所选择的语言,自动生成英文 / 中文格式的关键词.
-
-\begin{framed}
- \begin{verbatim}
- \begin{abstract}[en]...\keywords{keyword1, keyword2} \end{abstract}
- \begin{abstract}[cn]...\keywords{关键词1, 关键词2} \end{abstract}
- \end{verbatim}
-\end{framed}
-
-通过命令 \cs{keywords} 以半角逗号 (,) 为分隔输入关键词列表,输出时会根据所处 \env{abstract} 环境选择的语言不同,自动以半 / 全角分号分隔. 下图为生成的中/英摘要样例,可在终端执行 \cmd{texdoc hduthesis-bc} 获取此样例文件.
-
-\begin{figure}[htbp]
- \centering
- \fbox
- {
- \includegraphics[page = 3, width = .42\linewidth]
- {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf} }
- \hfill
- \fbox
- {
- \includegraphics[page = 4, width = .42\linewidth]
- {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf} }
- \caption{样例文件 \file{hduthesis-bc.pdf}, Page 3 -- 4}
-\end{figure}
-
-\section{Input Text}
-
-\hologo{hduthesis} 的 {chapter}、\cs{section}、\cs{subsection}、\cs{enumerate} 等段落级次均已按``\href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范}''定制,可直接使用.
-
-如需插入参考文献,通过命令 \cs{DocInfo} 指定 \file{.bib} 文件后在要插入参考文献等地方输入 \cs{printbiblography} 即可输出参考文献列表. 参考文献格式已设置为 \cmd{gb7714-2015}. 若未指定参考文献 \file{.bib} 文件,为加速编译,\pkg{gbt7714} 宏包将不会加载. 同时,模板额外预置了以下宏包
-
-\begin{table}[htbp]
- \centering
- \begin{tabular}{*{8}{>{\small}p{.096\linewidth}}}
- \toprule
- \pkg{amsmath} & \pkg{amssymb} & \pkg{bm} & \pkg{booktabs} &
- \pkg{cancel} & \pkg{circuitikz}& \pkg{cleveref} & \pkg{derivative} \\
- \midrule
- \pkg{extarrows} & \pkg{fixdif} & \pkg{listings} & \pkg{mathtools} & \pkg{multicol} & \pkg{pgfplots} & \pkg{physics2} & \pkg{siunitx}\\
- \bottomrule
- \end{tabular}
-\end{table}
-
-\begin{figure}[htbp]
- \begin{subfigure}{.32\linewidth}
- \centering
- \fbox
- {
- \includegraphics[page = 5, width = .9\linewidth]
- {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf}
- }
- \caption{Table of Contents}
- \end{subfigure}
- \hfill
- \begin{subfigure}{.32\linewidth}
- \centering
- \fbox
- {
- \includegraphics[page = 11, width = .9\linewidth]
- {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf}
- }
- \caption{Text}
- \end{subfigure}
- \hfill
- \begin{subfigure}{.32\linewidth}
- \centering
- \fbox
- {
- \includegraphics[page = 12, width = .9\linewidth]
- {/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-bc.pdf}
- }
- \caption{Text with figures}
- \end{subfigure}
-\end{figure}
-
-\hrule
-
-\begin{center}
- \fbox
- { \parbox[c][1.5em]{34ex}{\centering\file{hduthesis-pg.config-module}} }
- \fbox { \parbox[c][1.5em]{32ex}{\centering\file{hduthesis-typeset-module}} }
- \fbox { \parbox[c][1.5em]{15ex}{\centering\file{hdulogo.pdf}} }\\[2ex]
- \fbox { \parbox[c][1.5em]{33ex}{\centering\file{hduthesis-bc.config-module}} }
- \qquad \fbox { \parbox[c][1.5em]{16ex}{\centering\file{hdubadge.pdf}} } \qquad
- \fbox { \parbox[c][1.5em]{16ex}{\centering\file{hdumotto.pdf}} }\\[2ex]
- \fbox { \parbox[c][1.5em]{30ex}{\centering\file{hduthesis-layout-module}} }~
- \fbox { \parbox[c][1.5em]{16ex}{\centering\file{hdutitle.pdf}} }
- \fbox
- { \parbox[c][1.5em]{34ex}{\centering\file{hduthesis-stationery-module}} }~
-\end{center}
-
-\hrule
-
-\section{杭州电子科技大学信纸}
-
-加载全局选项 \pkg{stationery},并进行文档信息设置,即可生成信纸. 可用于推荐信撰写.
-此模块无需 \pkg{agreed} 选项.
-
-\begin{framed}
- \begin{verbatim}
- \documentclass [ stationery ] { hduthesis }
- \end{verbatim}
-\end{framed}
-
-与学士 / 硕士学位论文文档信息设置类型,使用 \cs{DocInfo} 命令,对信件标题、发件人、机构、日期、电话和邮件信息进行设置. 此时 \cs{DocInfo} 命令接受键
-\keys{\cmdmac~title} \keys{\cmdmac~author} \keys{\cmdmac~affliction}
-\keys{\cmdmac~date} \keys{\cmdmac~tel} \keys{\cmdmac~mail}. 下页为生成信纸的样例.
-
-\begin{framed}
- \begin{verbatim}
- \DocInfo
- {
- title = Recommendation Letter for SAN Chi Nan,
- author = YIP Tsz Ching,
- affliction = {Physics Department, Hangzhou Dianzi University},
- date = {25\textsuperscript{th} November, 2024},
- tel = (852) 3141-5926,
- mail = xiamyphys@gmail.com
- }
- \end{verbatim}
-\end{framed}
-
-\section{For Developers}
+\input{cha/abstract.tex}
-本手册为 \cls{hduthesis} 加载选项 \pkg{l3doc} 后生成,基于 \cls{l3doc} 文档类.
+\setcounter{tocdepth}{2} \tableofcontents
-\begin{framed}
- \begin{verbatim}
- \documentclass [ l3doc ] { hduthesis }
- \end{verbatim}
-\end{framed}
+\input{cha/contents.tex}
-\includepdf{/Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-stationery}
+\input{cha/source.tex}
\end{document}
diff --git a/macros/xetex/latex/hduthesis/examples/cha/abstract.tex b/macros/xetex/latex/hduthesis/example/cha/abstract.tex
index 6b78b6d13a..6b78b6d13a 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/abstract.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/abstract.tex
diff --git a/macros/xetex/latex/hduthesis/examples/cha/cha1.tex b/macros/xetex/latex/hduthesis/example/cha/cha1.tex
index 864fd1b3db..864fd1b3db 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/cha1.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/cha1.tex
diff --git a/macros/xetex/latex/hduthesis/examples/cha/cha2.tex b/macros/xetex/latex/hduthesis/example/cha/cha2.tex
index d7d50c5455..d7d50c5455 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/cha2.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/cha2.tex
diff --git a/macros/xetex/latex/hduthesis/examples/cha/cha3.tex b/macros/xetex/latex/hduthesis/example/cha/cha3.tex
index bfa795380f..bfa795380f 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/cha3.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/cha3.tex
diff --git a/macros/xetex/latex/hduthesis/examples/cha/cha4.tex b/macros/xetex/latex/hduthesis/example/cha/cha4.tex
index 697b58bcc9..68cd5a048f 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/cha4.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/cha4.tex
@@ -74,9 +74,9 @@ $R_3$和$R_7$为输入匹配电阻。
\end{equation}
因而,放大器的增益:
\begin{equation}
- A_{Vf}=\frac{v_o}{v_s}=\frac{R_1+R_f}{R_1}=1+\frac{R_f}{R_1}
+ A_{V_f}=\frac{v_o}{v_s}=\frac{R_1+R_f}{R_1}=1+\frac{R_f}{R_1}
\end{equation}
- $\because A_{Vf}>0$,所以$v_o$与$v_s$同相。
+ $\because A_{V_f}>0$,所以$v_o$与$v_s$同相。
\begin{figure}[htbp]
\centering
diff --git a/macros/xetex/latex/hduthesis/examples/cha/cha5.tex b/macros/xetex/latex/hduthesis/example/cha/cha5.tex
index 9d2e255e86..9d2e255e86 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/cha5.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/cha5.tex
diff --git a/macros/xetex/latex/hduthesis/examples/cha/cha6.tex b/macros/xetex/latex/hduthesis/example/cha/cha6.tex
index 1c5c628ad6..1c5c628ad6 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/cha6.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/cha6.tex
diff --git a/macros/xetex/latex/hduthesis/examples/cha/cha7.tex b/macros/xetex/latex/hduthesis/example/cha/cha7.tex
index 17d113c0f7..17d113c0f7 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/cha7.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/cha7.tex
diff --git a/macros/xetex/latex/hduthesis/examples/cha/thanks.tex b/macros/xetex/latex/hduthesis/example/cha/thanks.tex
index 303f13d429..303f13d429 100644
--- a/macros/xetex/latex/hduthesis/examples/cha/thanks.tex
+++ b/macros/xetex/latex/hduthesis/example/cha/thanks.tex
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0145.png b/macros/xetex/latex/hduthesis/example/figures/image-0145.png
index 7d390d38de..7d390d38de 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0145.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0145.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0162.png b/macros/xetex/latex/hduthesis/example/figures/image-0162.png
index 75ed76eafc..75ed76eafc 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0162.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0162.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0163.png b/macros/xetex/latex/hduthesis/example/figures/image-0163.png
index 9be35b5e63..9be35b5e63 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0163.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0163.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0236.png b/macros/xetex/latex/hduthesis/example/figures/image-0236.png
index 5bed2083f9..5bed2083f9 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0236.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0236.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0284.png b/macros/xetex/latex/hduthesis/example/figures/image-0284.png
index 59bca2a597..59bca2a597 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0284.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0284.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0285.png b/macros/xetex/latex/hduthesis/example/figures/image-0285.png
index c1aae56755..c1aae56755 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0285.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0285.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0289.png b/macros/xetex/latex/hduthesis/example/figures/image-0289.png
index 5860708d8f..5860708d8f 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0289.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0289.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0419.png b/macros/xetex/latex/hduthesis/example/figures/image-0419.png
index 2af2fefab6..2af2fefab6 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0419.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0419.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0439.png b/macros/xetex/latex/hduthesis/example/figures/image-0439.png
index de4cc1538b..de4cc1538b 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0439.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0439.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/figures/image-0440.png b/macros/xetex/latex/hduthesis/example/figures/image-0440.png
index 4ccc02ea57..4ccc02ea57 100644
--- a/macros/xetex/latex/hduthesis/examples/figures/image-0440.png
+++ b/macros/xetex/latex/hduthesis/example/figures/image-0440.png
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/hduthesis-bc.pdf b/macros/xetex/latex/hduthesis/example/hduthesis-bc.pdf
index 7a87591efa..8d6248c1ff 100644
--- a/macros/xetex/latex/hduthesis/examples/hduthesis-bc.pdf
+++ b/macros/xetex/latex/hduthesis/example/hduthesis-bc.pdf
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/hduthesis-bc.tex b/macros/xetex/latex/hduthesis/example/hduthesis-bc.tex
index 1c36b498a4..b25278428b 100644
--- a/macros/xetex/latex/hduthesis/examples/hduthesis-bc.tex
+++ b/macros/xetex/latex/hduthesis/example/hduthesis-bc.tex
@@ -1,7 +1,7 @@
\documentclass
[
math-font = STIX Two Math, agreed,
- CJKmain-font = { {Songti SC}[AutoFakeSlant, AutoFakeBold = 2.5] },
+ CJKmain-font = { {Songti SC}[AutoFakeBold = 2.5, AutoFakeSlant] },
CJKsans-font = { {STHeiti}[AutoFakeBold = 2] }
] {hduthesis}
\tikzset{ > = stealth }
@@ -9,7 +9,7 @@
\DocInfo
{
- title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/本科毕业设计~ (论文),
+ title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/本科毕业设计,
department = 理学院,
major = 物理学,
class = 英才班,
@@ -22,6 +22,7 @@
\begin{document}
\maketitle
+\commitment [ example-image-a/2024-05-31 ]
\input{cha/abstract.tex}
diff --git a/macros/xetex/latex/hduthesis/examples/hduthesis-pg.pdf b/macros/xetex/latex/hduthesis/example/hduthesis-pg.pdf
index 9b24ba3585..fb725211b9 100644
--- a/macros/xetex/latex/hduthesis/examples/hduthesis-pg.pdf
+++ b/macros/xetex/latex/hduthesis/example/hduthesis-pg.pdf
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/hduthesis-pg.tex b/macros/xetex/latex/hduthesis/example/hduthesis-pg.tex
index dcf27d155a..4fe8063e98 100644
--- a/macros/xetex/latex/hduthesis/examples/hduthesis-pg.tex
+++ b/macros/xetex/latex/hduthesis/example/hduthesis-pg.tex
@@ -17,12 +17,17 @@
stdntid = C668668E0,
author = 申智能/SAN Chi Nan,
supervisor = 教授:葉芷晴/Prof.:YIP Tsz Ching,
- bibsource = reference
+ % bibsource = reference
}
\begin{document}
\maketitle
+\commitment
+ [
+ example-image-a/2025-05-31, example-image-a/2025-05-31,
+ example-image-b/2025-06-01
+ ]
\begin{abstract}[cn]
diff --git a/macros/xetex/latex/hduthesis/example/hduthesis-stationery.pdf b/macros/xetex/latex/hduthesis/example/hduthesis-stationery.pdf
new file mode 100644
index 0000000000..b84ec14d24
--- /dev/null
+++ b/macros/xetex/latex/hduthesis/example/hduthesis-stationery.pdf
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/examples/hduthesis-stationery.tex b/macros/xetex/latex/hduthesis/example/hduthesis-stationery.tex
index 71e7bd7cd8..4bc21e0f41 100644
--- a/macros/xetex/latex/hduthesis/examples/hduthesis-stationery.tex
+++ b/macros/xetex/latex/hduthesis/example/hduthesis-stationery.tex
@@ -6,26 +6,29 @@
\DocInfo
{
title = Recommendation Letter for SAN Chi Nan,
- author = YIP Tsz Ching,
- affliction = {Physics Department, Hangzhou Dianzi University},
- date = {25\textsuperscript{th} November, 2024},
- tel = (852) 3141-5926,
- mail = xiamyphys@gmail.com
+ author = YIP Tsz Ching,
+ mail = email@server.domain,
+ date = {23\textsuperscript{th} December, 2024},
+ watermark = true
}
\begin{document}
\maketitle
-To whom it may concern:
+Dear Prof. Wong,
\lipsum[1-2]
\vspace{\baselineskip} \raggedleft
-Sincerely yours ,\\[2ex]
+Sincerely yours,\\[4ex]
\includegraphics[ height = 2em ]{hdutitle}\\[2ex]
Professor of Department of Physics\\
Room \meta{int}, Building \meta{int}, Hangzhou Dianzi University
+\clearpage
+
+\notelines[25]
+
\end{document} \ No newline at end of file
diff --git a/macros/xetex/latex/hduthesis/examples/reference.bib b/macros/xetex/latex/hduthesis/example/reference.bib
index 5775cc077f..5775cc077f 100644
--- a/macros/xetex/latex/hduthesis/examples/reference.bib
+++ b/macros/xetex/latex/hduthesis/example/reference.bib
diff --git a/macros/xetex/latex/hduthesis/examples/hduthesis-stationery.pdf b/macros/xetex/latex/hduthesis/examples/hduthesis-stationery.pdf
deleted file mode 100644
index 18c98062ca..0000000000
--- a/macros/xetex/latex/hduthesis/examples/hduthesis-stationery.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/xetex/latex/hduthesis/tex/hduthesis-bc.config-module.code.tex b/macros/xetex/latex/hduthesis/tex/hduthesis-bc.config-module.code.tex
index fa36d01ca6..c404557382 100644
--- a/macros/xetex/latex/hduthesis/tex/hduthesis-bc.config-module.code.tex
+++ b/macros/xetex/latex/hduthesis/tex/hduthesis-bc.config-module.code.tex
@@ -22,9 +22,6 @@
\begin{titlepage}
\__hduthesis_cover_bc_aux:
\end{titlepage}
- \titlepage
- \__hduthesis_promise_bc_aux:
- \endtitlepage
\restoregeometry
}
@@ -44,7 +41,7 @@
{
\textbf
{
- \exp_args:Nne \__hduthesis_cover_spread_box:nn
+ \__hduthesis_cover_spread_box:nn
{ .205\paperwidth } { \l__docinfo_entitle_tl }
}
}
@@ -57,8 +54,7 @@
>{\large\centering\arraybackslash\kaishu}p{.65\linewidth}@{}
}
\__hduthesis_cover_spread_box:nn { 4\ccwd } { 题目 } &
- \__hduthesis_cover_center_box:nn { .95\linewidth }
- { \l__docinfo_cntitle_tl }\\[5.2ex]
+ \__hduthesis_cover_center_box:nn { .95\linewidth } { \@title }\\[5.2ex]
\__hduthesis_cover_spread_box:nn { 4\ccwd } { 学院 } &
\__hduthesis_cover_center_box:nn { .95\linewidth }
{ \l__docinfo_department_tl }\\[5.2ex]
@@ -72,8 +68,7 @@
\__hduthesis_cover_center_box:nn { .95\linewidth }
{ \l__docinfo_stdntid_tl }\\[5.2ex]
\__hduthesis_cover_spread_box:nn { 4\ccwd } { 学生姓名 } &
- \__hduthesis_cover_center_box:nn { .95\linewidth }
- { \l__docinfo_cnauthor_tl }\\[5.2ex]
+ \__hduthesis_cover_center_box:nn { .95\linewidth } { \@author }\\[5.2ex]
\__hduthesis_cover_spread_box:nn { 4\ccwd } { 指导教师 } &
\__hduthesis_cover_center_box:nn { .95\linewidth }
{ \l__docinfo_cnsupervisor_tl \quad \l__docinfo_cnrole_tl }\\[5.2ex]
@@ -87,23 +82,44 @@
\end{center}
}
-\cs_new_protected_nopar:Nn \__hduthesis_promise_bc_aux:
+\NewDocumentCommand \commitment { O{} }
+ {
+ \newgeometry{ margin = 3cm }
+ \titlepage
+ \__hduthesis_commitment_bc_aux:n {#1}
+ \endtitlepage
+ \restoregeometry
+ }
+\cs_new_protected_nopar:Npn \__hduthesis_commitment_bc_aux:n #1
{
\vspace*{65\p@}
\begin{center}
\@beginparpenalty \@lowpenalty
- \Large \textsf{\bfseries \__hduthesis_cover_spread_box:nn {6\ccwd}{诚信承诺}}
+ \Large \textsf
+ { \bfseries \__hduthesis_cover_spread_box:nn { 6\ccwd }{ 诚信承诺 } }
\@endparpenalty \@M
\end{center}
\vspace*{.4\baselineskip} \par
\linespread{2.1}
- {\semilarge
- 我谨在此承诺:本人所写的毕业论文《\l__docinfo_cntitle_tl》均系本人独立完成,
+ { \semilarge
+ 我谨在此承诺:本人所写的毕业论文《\@title 》均系本人独立完成,
没有抄袭行为,凡涉及其他作者的观点和材料,均作了注释,若有不实,后果由本人承担。
\par\vspace*{\baselineskip} \bfseries\sffamily
\hskip.48\linewidth 承诺人(签名):
- \vspace*{.5\baselineskip}\par
- \hskip \dim_eval:n{ .48\linewidth + 2em } 年\qquad 月\qquad 日
+ \__hduthesis_signature_process_aux:nnn {#1}{1}{0}
+ \tl_if_empty:NF \l__hduthesis_signature_figure_tl
+ {
+ \signature { \l__hduthesis_signature_figure_tl }
+ \tl_clear:N \l__hduthesis_signature_figure_tl
+ }
+ \par \vspace*{.5\baselineskip}
+ \hskip \dim_eval:n { .48\linewidth - 1em }
+ \makebox [ 3em ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{1}{1} } 年
+ \makebox [ 2em ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{1}{2} } 月
+ \makebox [ 2em ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{1}{3} } 日
}
}
@@ -113,15 +129,16 @@
{
\tl_set:Nn \l__keywords_name_tl {Keywords:~}
\tl_set:Nn \l__keywords_sep_tl {;~}
+ \@beginparpenalty\@lowpenalty
+ \chapter*{\normalfont\bfseries ABSTRACT}
}
\str_if_eq:nnT {#1} {cn}
{
\tl_set:Nn \l__keywords_name_tl {\textsf{关键词:}}
\tl_set:Nn \l__keywords_sep_tl {;}
+ \@beginparpenalty\@lowpenalty
+ \chapter*{摘\qquad 要}
}
- \@beginparpenalty\@lowpenalty
- \str_if_eq:nnT {#1} {en} {\chapter*{\normalfont\bfseries ABSTRACT}}
- \str_if_eq:nnT {#1} {cn} {\chapter*{摘\qquad 要}}
}
{
\tl_clear:N \l__abstract_name_tl
@@ -157,11 +174,8 @@
{
chapter =
{
- name = {}, fixskip = true,
- beforeskip = 21pt, afterskip = 34pt,
- number = \arabic{chapter},
- format+ = \sffamily\large,
- pagestyle = fancy
+ fixskip = true, name = {}, beforeskip = 21pt, format+ = \sffamily\large,
+ pagestyle = fancy, afterskip = 34pt, number = \arabic{chapter},
},
section =
{
diff --git a/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.l3doc-module.code.tex b/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.l3doc-module.code.tex
index ffe1dbeac3..d0d70b9267 100644
--- a/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.l3doc-module.code.tex
+++ b/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.l3doc-module.code.tex
@@ -8,7 +8,6 @@
CJKsans-font .tl_set:N = \g__docinfo_sans_CJK_font,
CJKmono-font .tl_set:N = \g__docinfo_mono_CJK_font
}
-
\NewDocumentCommand \DocInfo { m }
{
\keys_set:nn { hdu.l3doc / docinfo } {#1}
@@ -17,8 +16,11 @@
\date
{
v\hduthesis@version
- \footnote{\url{https://github.com/xiamyphys/hduthesis}}~
- (\hduthesis@date)
+ \footnote
+ {
+ \url{https://github.com/\hduthesis@maintainerid/hduthesis},~
+ \url{https://gitee.com/\hduthesis@maintainerid/hduthesis}
+ }~ (\hduthesis@date)
}
\tl_if_empty:NF \g__docinfo_main_CJK_font
{ \exp_last_unbraced:No \setCJKmainfont \g__docinfo_main_CJK_font }
@@ -28,29 +30,42 @@
{ \exp_last_unbraced:No \setCJKmonofont \g__docinfo_mono_CJK_font }
}
-\hypersetup{urlcolor = teal, filecolor = violet}
-\hologoFontSetup{general = \sffamily}
-\RequirePackage[mono = false]{libertine}
-\RequirePackage{geometry,framed,xeCJKfntef,tikz,pdfpages,subcaption}
-\setlength{\oddsidemargin}{.9in} \setlength{\evensidemargin}{.1in}
-\FrameSep = 0pt
+\RequirePackage{ hyperref }
+\RequirePackage [ svgnames ] { xcolor }
+\hypersetup
+ { filecolor = DarkGreen, urlcolor = MidnightBlue, linkcolor = FireBrick }
+\ExplSyntaxOff
+\RenewDocumentCommand \pkg {m} { \href{https://ctan.org/pkg/#1}{\textsf{#1}} }
+\RenewDocumentCommand \cls {m} { \href{https://ctan.org/pkg/#1}{\textsf{#1}} }
+\NewDocumentCommand \mailto {m} { \texttt{<\href{mailto:#1}{#1}>} }
+\pdfstringdefDisableCommands
+ { \def \file#1{<#1>} \def\pkg#1{<#1>} \def\cls#1{<#1>} \def\mailto#1{<#1>} }
+\ExplSyntaxOn
+\hologoFontSetup { general = \sffamily }
+\RequirePackage [ mono = false ] { libertine }
+\RequirePackage [ pass, verbose ] { geometry }
+\RequirePackage
+ { fancyhdr, enumitem, tasks, tabularx, dirtree, framed,
+ xeCJKfntef, tikz, pdfpages, subcaption, datetime }
+\pagestyle{plain}
+\FrameSep = 0pt \yyyymmdddate
\RequirePackage[os = mac]{menukeys}
-\RequirePackage{datetime} \yyyymmdddate
-\RequirePackage[fontset = none, scheme = plain]{ctex}\linespread{1.5}
-\renewcommand \emph[1]
- {\CJKsout*[thickness = 2.5ex, format = \color{blue!15}]{#1}}
+\RequirePackage[fontset = none]{ctex} \linespread{1.4}
+\def \@emph#1 { \CJKsout*[thickness = 2.5ex, format = \color{blue!15}]{#1} }
+\def \s@emph#1 { \CJKunderwave*{#1} }
+\renewcommand \emph { \@ifstar \s@emph \@emph }
\hook_gput_code:nnn { env/function/before } { . } { \vspace{-2ex} }
-\def\HoLogo@hduthesis#1
+\def \HoLogo@hduThesiS #1
{
\raisebox{-.5pt}
{
\HOLOGO@mbox
{
- \tikz[baseline = (hduthesis.base)]
+ \tikz [ baseline = (hduthesis.base) ]
{
\node [ inner~sep = 0pt ] (hduthesis)
- {\textsc{\cls{hduThesi\scalebox{1.2}[1.2]{S}}}};
+ {\scshape \sffamily hduThesi\scalebox{1.2}[1.2]{S}};
\draw let \p1 = (hduthesis.west), \p2 = (hduthesis.east)
in (\x1,\y1) (\x2,\y2) [ line~width = {.028pt * (\x2 - \x1)} ]
([yshift = -.5ex]hduthesis.north~west) to[ bend~right = 5 ]
@@ -59,28 +74,28 @@
}
}
}
+\def \HoLogo@hduthesis #1
+ { \raisebox{-.5pt} { \HOLOGO@mbox { \scshape \cls{hduThesiS} } } }
\let \legacy@maketitle \maketitle
\RenewDocumentCommand \maketitle {}
{
+ \newgeometry { margin = 1.2in }
\titlepage
- \newgeometry{margin = 1in}
\legacy@maketitle
\begin{center}
\tikz
{
\node [ opacity = .8 ]
- { \includegraphics[width = .15\paperwidth]{hdumotto.pdf} };
+ { \includegraphics [ width = .14\paperwidth ] { hdumotto.pdf } };
\node [ opacity = .3 ]
- { \includegraphics[width = .21\paperwidth]{hdulogo.pdf} };
+ { \includegraphics [ width = .21\paperwidth ] { hdulogo.pdf } };
}
\end{center}
\thispagestyle{empty}
}
-
-\NewDocumentCommand \mailto {m}
- { \texttt{<\href{mailto:#1}{#1}>} }
-\pdfstringdefDisableCommands
- { \def\mailto#1{<#1>} }
+\hook_gput_code:nnn { cmd/tableofcontents/before } { . } { \clearpage }
+\hook_gput_code:nnn { cmd/tableofcontents/after } { . }
+ { \endtitlepage \restoregeometry }
\endinput
diff --git a/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.stationery-module.code.tex b/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.stationery-module.code.tex
index 1c13c626b3..43fbe1d81a 100644
--- a/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.stationery-module.code.tex
+++ b/macros/xetex/latex/hduthesis/tex/hduthesis-hdu.stationery-module.code.tex
@@ -2,76 +2,107 @@
\keys_define:nn { hdu.stationery / docinfo }
{
- title .tl_set:N = \l__docinfo_title_tl,
- author .tl_set:N = \l__docinfo_author_tl,
- affliction .tl_set:N = \l__docinfo_affliction_tl,
- date .tl_set:N = \l__docinfo_date_tl,
- tel .tl_set:N = \l__docinfo_tel_tl,
- mail .tl_set:N = \l__docinfo_mail_tl,
+ watermark .bool_set:N = \g__docinfo_watermark_bool,
+ watermark .initial:n = false,
+ watermark .default:n = true,
+ title .tl_set:N = \@title,
+ author .tl_set:N = \@author,
+ mail .tl_set:N = \l__docinfo_mail_tl,
+ date .tl_set:N = \@date
}
\RequirePackage{ hyperref, geometry, tikz, twemojis, fancyhdr }
\NewDocumentCommand \DocInfo { m }
{
\keys_set:nn { hdu.stationery / docinfo } {#1}
- \hypersetup { hidelinks, pdfauthor = \l__docinfo_author_tl }
+ \hypersetup { hidelinks, pdftitle = \@title, pdfauthor = \@author }
}
\geometry
- { hmargin = .8in, bottom = 1.05in, top = 2.1in,
+ { hmargin = .8in, bottom = .75in, top = 1.95in, footskip = 15.87pt,
headheight = 1.2in, headsep = .3in, footskip = .3in }
\linespread{1.25}
\RequirePackage [ skip = \baselineskip ] { parskip }
\renewcommand* \familydefault { \sfdefault }
-\tikzset{ every~node/.append~style = { opacity = .8 } }
\definecolor{hdu}{HTML}{214395}
-\renewcommand* \headrulewidth {1pt}
-\renewcommand* \footrulewidth {1pt}
+\renewcommand* \headrulewidth {2pt}
+\renewcommand* \footrulewidth {2pt}
\hook_gput_code:nnn { cmd/headrule/before } { . } { \color{hdu!80} }
\hook_gput_code:nnn { cmd/footrule/before } { . } { \color{hdu!80} }
\lhead
- {
- {}~
- \minipage{.64\linewidth}
- \tikz [ baseline = -.6in ]
- { \node { \includegraphics [ height = .75in ] { hdubadge } } }
- \endminipage \hfill
- \minipage{.32\linewidth}
- \vbox
- {
- \raggedright \small
- Date:~
- \tl_if_empty:NTF \l__docinfo_date_tl
- { \today \par }
- { \l__docinfo_date_tl \par }
- \tl_if_empty:NF \l__docinfo_author_tl
- { Name:~ \l__docinfo_author_tl \par }
- \tl_if_empty:NF \l__docinfo_tel_tl
- { Phone:~ \l__docinfo_tel_tl \par }
- \tl_if_empty:NF \l__docinfo_mail_tl
- {
- Email:~ \href { mailto:\l__docinfo_mail_tl }
- { \ttfamily \l__docinfo_mail_tl }
- }
- }\medskip
+ { {}~
+ \minipage{.6\linewidth}
+ \medskip \leavevmode \lower -.111in
+ \hbox { \includegraphics [ height = .75in ] {hdubadge} }
+ \endminipage \medskip \hfill
+ \minipage{.36\linewidth}
+ \medskip \vbox
+ { \linespread{1.2}
+ \raggedright \small \color{hdu}
+ \texttwemoji{1f4cd}~ 1158~No.2~St.,~ Hangzhou,~ 310018\\
+ \texttwemoji{1f4de}~ (86)~0571-86915072\\
+ \texttwemoji{1f310}~ \url{www.hdu.edu.cn}
+ } \medskip
\endminipage
}
-\cfoot
- { \small \texttwemoji{1f4cd}~
+\lfoot
+ {
+ \small{}~ \texttwemoji{1f4cd}~
1158~No.2~Street,~ Qiantang~District,~
- Hangzhou,~ Zhejiang~Province,~ 310018,~ China \qquad
- \texttwemoji{1f310}~ www.hdu.edu.cn
+ Hangzhou,~ Zhejiang~Province,~ 310018,~ P.R.China
}
+\cfoot {}
+\rfoot { \small \texttwemoji{1f310}~ www.hdu.edu.cn~ }
\pagestyle{fancy}
\renewcommand* \maketitle
{
- \l__docinfo_author_tl\\
- \l__docinfo_affliction_tl\\
- \textbf{\l__docinfo_title_tl} \par \vspace{.5\baselineskip}
+ \group_begin: \small
+ \bool_if:nF
+ { \tl_if_empty_p:N \@author && \tl_if_empty_p:N \l__docinfo_mail_tl }
+ { \makebox [ 4em ] [ l ] { \scshape From } }
+ \tl_if_empty:NTF \@author
+ { \@latex@warning@no@line {No \noexpand \author given} } { \@author{}~ }
+ \tl_if_empty:NF \l__docinfo_mail_tl
+ { \texttt { <\l__docinfo_mail_tl> } }
+ \bool_if:nT
+ { !\tl_if_empty_p:N \@author || !\tl_if_empty_p:N \l__docinfo_mail_tl }
+ { \\ }
+ \makebox [ 4em ] [ l ] { \scshape Date }
+ \tl_if_empty:NTF \@date \today \@date \\
+ \tl_if_empty:NTF \@title
+ { \@latex@error {No \noexpand \title given}\@ehc }
+ { \makebox [ 4em ] [ l ] { \scshape Subject } \@title }
+ \par \vspace{.5\baselineskip}
+ \group_end:
}
\AtBeginDocument { \color_select:n {black!80} }
+\DeclareHookRule { shipout / background } { hduthesis / stationery }
+ { before } { pgfrcs }
+\AddToHook { shipout / background } [ hduthesis / stationery ]
+ {
+ \bool_if:NT \g__docinfo_watermark_bool
+ {
+ \tikz [ remember~picture, overlay ]
+ \node [ opacity = .2 ] at (current~page)
+ { \includegraphics [ width = .4\linewidth ] {hdulogo} };
+ }
+ }
+
+\RequirePackage{tikzpagenodes}
+\NewDocumentCommand \notelines {O{20}}
+ {
+ \tikz [ remember~picture, overlay ]
+ {
+ \int_step_inline:nn { #1 - 1 }
+ {
+ \draw [ hdu, very~thick, opacity = .6 ]
+ ([yshift = -##1 * (\textheight + .6in - 15.87pt ) / #1 + .3in]
+ current~page~text~area.north~west) --++ (\linewidth, 0);
+ }
+ }
+ }
\newcommand \meta[1]
{
diff --git a/macros/xetex/latex/hduthesis/tex/hduthesis-layout-module.code.tex b/macros/xetex/latex/hduthesis/tex/hduthesis-layout-module.code.tex
index 8ff3467350..cfd2e72690 100644
--- a/macros/xetex/latex/hduthesis/tex/hduthesis-layout-module.code.tex
+++ b/macros/xetex/latex/hduthesis/tex/hduthesis-layout-module.code.tex
@@ -23,7 +23,7 @@
{
\mode_leave_vertical:
\hbox_to_wd:nn {#1}
- { \exp_args:Nee \tl_map_inline:Nn {#2} { ##1 \hfil } \unskip }
+ { \exp_args:Nee \tl_map_inline:nn {#2} { ##1 \hfil } \unskip }
}
\cs_new_protected:Npn \__hduthesis_cover_center_box:nn #1#2
{ % by @egreg on tex.stackexchange.com
@@ -59,14 +59,10 @@
\seq_set_split:Nee \l__hduthesis_process_array_seq { / } {#1}
\seq_set_split:Nee \l__hduthesis_process_array_row_seq { \c_colon_str }
{ \seq_item:Nn \l__hduthesis_process_array_seq {#2} }
- \tl_if_eq:nnTF {#3} {~}
+ \tl_if_eq:nnTF {#3} {:}
+ { \tl_gset:Ne #4 { \seq_use:Nn \l__hduthesis_process_array_row_seq {} } }
{
- \tl_set:Ne #4
- { \seq_use:Nn \l__hduthesis_process_array_row_seq {} }
- }
- {
- \tl_set:Ne #4
- { \seq_item:Nn \l__hduthesis_process_array_row_seq {#3} }
+ \tl_gset:Ne #4 { \seq_item:Nn \l__hduthesis_process_array_row_seq {#3} }
}
\seq_clear:N \l__hduthesis_process_array_seq
\seq_clear:N \l__hduthesis_process_array_row_seq
@@ -78,12 +74,12 @@
}
\keys_define:nn { hduthesis / docinfo }
{
- title .clist_set:N = \l__docinfo_title_clist,
+ title .clist_set:N = \l__docinfo_title_tl,
department .tl_set:N = \l__docinfo_department_tl,
major .tl_set:N = \l__docinfo_major_tl,
class .tl_set:N = \l__docinfo_class_tl,
stdntid .tl_set:N = \l__docinfo_stdntid_tl,
- author .clist_set:N = \l__docinfo_author_clist,
+ author .clist_set:N = \l__docinfo_author_tl,
supervisor .tl_set:N = \l__docinfo_supervisor_tl,
bibsource .tl_set:N = \l__docinfo_bibsource_tl,
}
@@ -95,13 +91,11 @@
}
\cs_set_protected_nopar:Nn \__hduthesis_docinfo_process_aux:
{
- \__hduthesis_process_array:NnnN \l__docinfo_title_clist {1} {~}
- \l__docinfo_cntitle_tl
- \__hduthesis_process_array:NnnN \l__docinfo_title_clist {2} {~}
+ \__hduthesis_process_array:NnnN \l__docinfo_title_tl {1} {:} \@title
+ \__hduthesis_process_array:NnnN \l__docinfo_title_tl {2} {:}
\l__docinfo_entitle_tl
- \__hduthesis_process_array:NnnN \l__docinfo_author_clist {1} {~}
- \l__docinfo_cnauthor_tl
- \__hduthesis_process_array:NnnN \l__docinfo_author_clist {2} {~}
+ \__hduthesis_process_array:NnnN \l__docinfo_author_tl {1} {:} \@author
+ \__hduthesis_process_array:NnnN \l__docinfo_author_tl {2} {:}
\l__docinfo_enauthor_tl
\__hduthesis_process_array:NnnN \l__docinfo_supervisor_tl {1} {1}
\l__docinfo_cnrole_tl
@@ -130,4 +124,31 @@
}
}
+\cs_new_protected_nopar:Npn \__hduthesis_signature_process_aux:nnn #1#2#3
+ {
+ \clist_set:Nn \l__hduthesis_signature_process_clist {#1}
+ \seq_set_split:Nne \l__hduthesis_signature_figure_seq {/}
+ { \clist_item:Nn \l__hduthesis_signature_process_clist {#2} }
+ \int_compare:nNnTF {#3} = {0}
+ {
+ \tl_set:Ne \l__hduthesis_signature_figure_tl
+ { \seq_item:Nn \l__hduthesis_signature_figure_seq { #3 + 1 } }
+ \seq_clear:N \l__hduthesis_signature_figure_seq
+ }
+ {
+ \seq_set_split:Nne \l__hduthesis_signature_date_seq {-}
+ { \seq_item:Nn \l__hduthesis_signature_figure_seq {2} }
+ \seq_item:Nn \l__hduthesis_signature_date_seq {#3}
+ \seq_clear:N \l__hduthesis_signature_date_seq
+ }
+ \clist_clear:N \l__hduthesis_signature_process_clist
+ }
+
+\NewDocumentCommand \signature { m }
+ {
+ \leavevmode@ifvmode
+ \lower \dimexpr \f@size\p@ * 9/16
+ \hbox { \includegraphics [ height = { \fp_eval:n {2*\f@size}\p@ } ] {#1} }
+ }
+
\endinput
diff --git a/macros/xetex/latex/hduthesis/tex/hduthesis-pg.config-module.code.tex b/macros/xetex/latex/hduthesis/tex/hduthesis-pg.config-module.code.tex
index 291f6a8b99..3d48d98931 100644
--- a/macros/xetex/latex/hduthesis/tex/hduthesis-pg.config-module.code.tex
+++ b/macros/xetex/latex/hduthesis/tex/hduthesis-pg.config-module.code.tex
@@ -24,9 +24,6 @@
\titlepage
\__hduthesis_enoverleaf_pg_aux:
\endtitlepage
- \titlepage
- \__hduthesis_promise_pg_aux:
- \endtitlepage
\restoregeometry
\pagenumbering{Roman}
\cfoot {\small \thepage}
@@ -40,15 +37,13 @@
{ \LARGE\__hduthesis_cover_spread_box:nn {.575\linewidth} {硕士学位论文} }
\par\vspace*{100\p@}
\semiLarge 题 \qquad 目:
- \__hduthesis_cover_center_box:nn { .75\linewidth }
- { \kaishu \l__docinfo_cntitle_tl }
+ \__hduthesis_cover_center_box:nn { .75\linewidth } { \kaishu \@title }
\vspace*{24\p@}\par
\begin{tabular}
{ >{\semiLarge\centering\arraybackslash}p{4\ccwd}@{}
>{\semiLarge\centering\arraybackslash\kaishu}p{.65\linewidth}@{} }
\__hduthesis_cover_spread_box:nn { 4\ccwd } { 研究生 } &
- \__hduthesis_cover_center_box:nn { .96\linewidth }
- { \l__docinfo_cnauthor_tl }\\
+ \__hduthesis_cover_center_box:nn { .96\linewidth } { \@author }\\
\__hduthesis_cover_spread_box:nn { 4\ccwd } { 专业 } &
\__hduthesis_cover_center_box:nn { .96\linewidth }
{ \l__docinfo_major_tl }\\
@@ -74,18 +69,15 @@
{ \LARGE 杭州电子科技大学硕士学位论文 }
\vspace*{140\p@} \par
\begin{spacing}{1.15}
- \huge\textsf{\l__docinfo_cntitle_tl}
+ \huge\textsf{ \@title }
\end{spacing}
\vspace*{128\p@} \par
\begin{tabular}{>{\semiLarge}p{6.25\ccwd}>{\semiLarge\kaishu}l}
\__hduthesis_cover_spread_box:nn { 4\ccwd } {研究生}:&
- \__hduthesis_cover_spread_box:nn { 4\ccwd }
- { \l__docinfo_cnauthor_tl }\\[2ex]
+ \__hduthesis_cover_spread_box:nn { 4\ccwd } { \@author }\\[2ex]
\__hduthesis_cover_spread_box:nn { 4\ccwd } {指导教师}:&
- % \exp_args:Nne
\__hduthesis_cover_spread_box:nn { 4\ccwd }
- { \l__docinfo_cnsupervisor_tl } \hskip1.5em
- \l__docinfo_cnrole_tl
+ { \l__docinfo_cnsupervisor_tl } \hskip1.5em \l__docinfo_cnrole_tl
\end{tabular}
\par \vspace{60\p@} \semilarge
\textsf{\int_use:N \c_sys_year_int} \kaishu 年
@@ -121,8 +113,17 @@
\int_use:N \c_sys_year_int
\end{center}
}
-
-\cs_new_protected_nopar:Nn \__hduthesis_promise_pg_aux:
+\NewDocumentCommand \commitment { O{} }
+ {
+ \cfoot {}
+ \newgeometry{margin = 2.75cm}
+ \titlepage
+ \__hduthesis_commitment_pg_aux:n {#1}
+ \endtitlepage
+ \restoregeometry
+ \cfoot {\small \thepage}
+ }
+\cs_new_protected_nopar:Npn \__hduthesis_commitment_pg_aux:n #1
{
\vspace*{-12\p@}
\begin{center}
@@ -140,8 +141,21 @@
对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。\par
\noindent 申请学位论文与资料若有不实之处,本人承担一切相关责任。
\par \vspace*{1.25\baselineskip}
- \noindent \makebox[.45\linewidth][l]{论文作者签名:}
- 日期:\qquad 年\qquad 月\qquad 日
+ \noindent \makebox[.45\linewidth][l]
+ {
+ 论文作者签名:
+ \__hduthesis_signature_process_aux:nnn {#1}{1}{0}
+ \tl_if_empty:NF \l__hduthesis_signature_figure_tl
+ {
+ \signature { \l__hduthesis_signature_figure_tl }
+ \tl_clear:N \l__hduthesis_signature_figure_tl
+ }
+ }
+ 日期:
+ \makebox [ 2.5em ] [ l ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{1}{1} } 年
+ \makebox [ 2em ] { \__hduthesis_signature_process_aux:nnn {#1}{1}{2} } 月
+ \makebox [ 2em ] { \__hduthesis_signature_process_aux:nnn {#1}{1}{3} } 日
\par\vspace*{20\p@}
\begin{center}
\semilarge 学位论文使用授权说明
@@ -154,11 +168,41 @@
学校有权保留送交论文的复印件,允许查阅和借阅论文;学校可以公布论文的全部或部分内容,
可以允许采用影印、缩印或其它复制手段保存论文。(保密论文在解密后遵守此规定)
\par \vspace*{1.25\baselineskip}
- \noindent \makebox[.45\linewidth][l]{论文作者签名:}
- 日期:\qquad 年\qquad 月\qquad 日
+ \noindent \makebox[.45\linewidth][l]
+ {
+ 论文作者签名:
+ \__hduthesis_signature_process_aux:nnn {#1}{2}{0}
+ \tl_if_empty:NF \l__hduthesis_signature_figure_tl
+ {
+ \signature { \l__hduthesis_signature_figure_tl }
+ \tl_clear:N \l__hduthesis_signature_figure_tl
+ }
+ }
+ 日期:
+ \makebox [ 2.5em ] [ l ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{2}{1} } 年
+ \makebox [ 2em ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{2}{2} } 月
+ \makebox [ 2em ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{2}{3} } 日
\par \vspace*{\baselineskip}
- \noindent \makebox[.45\linewidth][l]{指导教师签名:}
- 日期:\qquad 年\qquad 月\qquad 日
+ \noindent \makebox[.45\linewidth][l]
+ {
+ 指导教师签名:
+ \__hduthesis_signature_process_aux:nnn {#1}{3}{0}
+ \tl_if_empty:NF \l__hduthesis_signature_figure_tl
+ {
+ \signature { \l__hduthesis_signature_figure_tl }
+ \tl_clear:N \l__hduthesis_signature_figure_tl
+ }
+ }
+ 日期:
+ \makebox [ 2.5em ] [ l ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{3}{1} } 年
+ \makebox [ 2em ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{3}{2} } 月
+ \makebox [ 2em ]
+ { \__hduthesis_signature_process_aux:nnn {#1}{3}{3} } 日
\end{spacing}
\end{spacing}
}
@@ -169,23 +213,18 @@
{
\tl_set:Nn \l__keywords_name_tl {Keywords:~}
\tl_set:Nn \l__keywords_sep_tl {,~}
+ \@beginparpenalty\@lowpenalty
+ \chapter*{\normalfont\bfseries Abstract}
+ \addcontentsline{toc}{chapter}{\bfseries Abstract}
}
\str_if_eq:nnT {#1} {cn}
{
\tl_set:Nn \l__keywords_name_tl {\textsf{关键词:}}
\tl_set:Nn \l__keywords_sep_tl {,}
- }
- \@beginparpenalty\@lowpenalty
- \str_if_eq:nnT {#1} {cn}
- {
+ \@beginparpenalty\@lowpenalty
\chapter*{摘要}
\addcontentsline{toc}{chapter}{摘要}
}
- \str_if_eq:nnT {#1} {en}
- {
- \chapter*{\normalfont\bfseries Abstract}
- \addcontentsline{toc}{chapter}{\bfseries Abstract}
- }
}
{
\tl_clear:N \l__abstract_name_tl
diff --git a/macros/xetex/latex/hduthesis/tex/hduthesis-typeset-module.code.tex b/macros/xetex/latex/hduthesis/tex/hduthesis-typeset-module.code.tex
index 24b069a646..ed0878b025 100644
--- a/macros/xetex/latex/hduthesis/tex/hduthesis-typeset-module.code.tex
+++ b/macros/xetex/latex/hduthesis/tex/hduthesis-typeset-module.code.tex
@@ -7,20 +7,24 @@
\setmainfont{texgyretermes}
[
- Extension = .otf, UprightFont = *-regular, BoldFont = *-bold, ItalicFont = *-italic, BoldItalicFont = *-bolditalic
+ Extension = .otf, UprightFont = *-regular, BoldFont = *-bold,
+ ItalicFont = *-italic, BoldItalicFont = *-bolditalic
]
\setsansfont{texgyreheros}
[
Extension = .otf, BoldItalicFont = *-bolditalic,
UprightFont = *-regular, BoldFont = *-bold,
- ItalicFont = *-italic, scale = .9,
+ ItalicFont = *-italic, Scale = .9,
]
-\RequirePackage { amssymb, extarrows, mathtools,
- cancel, physics2, fixdif, derivative }
+\RequirePackage { amssymb, mathtools, cancel, fixdif, derivative }
+\file_if_exist:nTF { physics2.sty }
+ {
+ \RequirePackage{physics2}
+ \usephysicsmodule{ ab, braket, ab.legacy, op.legacy, bm-um.legacy }
+ } { \RequirePackage{bm} }
\RequirePackage
[ warnings-off = { mathtools-colon, mathtools-overbracket } ] {unicode-math}
-\usephysicsmodule{ ab, braket, ab.legacy, op.legacy, bm-um.legacy }
\AtBeginDocument
{
\dim_set:Nn \abovedisplayskip {3pt}
diff --git a/macros/xetex/latex/hduthesis/tex/hduthesis.cls b/macros/xetex/latex/hduthesis/tex/hduthesis.cls
index 048f8afc6d..1a3b42ed5b 100644
--- a/macros/xetex/latex/hduthesis/tex/hduthesis.cls
+++ b/macros/xetex/latex/hduthesis/tex/hduthesis.cls
@@ -20,15 +20,26 @@
%% hduthesis-hdu.l3doc-module.code, *
%% hduthesis-hdu.stationery-module.code, *
%% and README.md. *
-%% available at https://github.com/xiamyphys/hduthesis *
+%% available at https://github.com/myhsia/hduthesis *
%% *****************************************************************************
-\def\hduthesis@date{2024/11/25}
-\def\hduthesis@version{0.4.0}
+\def\hduthesis@date{2024/12/23}
+\def\hduthesis@version{0.5.0}
+\def\hduthesis@maintainerid{myhsia}
\RequirePackage{etoolbox}
\ProvidesExplClass{hduthesis} {\hduthesis@date} {\hduthesis@version}
{LaTeX Class for Thesis at Hangzhou Dianzi University}
+% Module for TeX Live 2022 and (or) later
+\cs_if_exist:NF \seq_set_split:Nne
+ { \cs_generate_variant:Nn \seq_set_split:Nnn { Nne } }
+\cs_if_exist:NF \seq_set_split:Nee
+ { \cs_generate_variant:Nn \seq_set_split:Nnn { Nee } }
+\cs_if_exist:NF \tl_set:Ne
+ { \cs_generate_variant:Nn \tl_set:Nn { Ne } }
+\cs_if_exist:NF \tl_gset:Ne
+ { \cs_generate_variant:Nn \tl_gset:Nn { Ne } }
+
\cs_new_protected:Npn \hduthesis_msg_new:nn #1#2
{ \msg_new:nnn { hduthesis } {#1} {#2} }
\cs_new_protected:Npn \hduthesis_msg_error:nn #1#2
@@ -81,7 +92,7 @@
CJKmain-font .tl_set:N = \g__hduthesis_main_CJK_font,
CJKsans-font .tl_set:N = \g__hduthesis_sans_CJK_font,
CJKmono-font .tl_set:N = \g__hduthesis_mono_CJK_font,
- unknown .code:n = \__hduthesis_unknown_option:n { #1 },
+ unknown .code:n = \__hduthesis_unknown_option:n {#1},
}
\cs_new_protected_nopar:Npn \__hduthesis_unknown_option:n #1
{
@@ -98,7 +109,7 @@
\bool_if:NT \g__hduthesis_doc_bool
{
- \PassOptionsToClass{ 11pt, letterpaper } { l3doc }
+ \PassOptionsToClass { 11pt, letterpaper, kernel } { l3doc }
\exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { l3doc }
\hduthesis_load_module:n { hdu.l3doc }
\endinput
@@ -106,7 +117,7 @@
\bool_if:NT \g__hduthesis_stationery_bool
{
- \PassOptionsToClass{ 12pt } { letter }
+ \PassOptionsToClass { 12pt } { letter }
\exp_args:NNV \LoadClass [ \g__hdu_base_class_options_clist ] { letter }
\hduthesis_load_module:n { hdu.stationery }
\endinput
@@ -120,8 +131,8 @@
\RequirePackage{hyperref}
\pdfstringdefDisableCommands
{
- \def\cite#1{<#1>}
- \def\hologoRobust#1{<#1>}
+ \def \cite#1 {<#1>}
+ \def \hologoRobust#1 {<#1>}
}
\AtBeginDocument
{ \hypersetup { hidelinks, pdfproducer = hduThesiS~by~Mingyu~Xia } }
@@ -130,7 +141,7 @@
\RequirePackage { siunitx, circuitikz, pgfplots, listings,
hologo, lipsum, zhlipsum, booktabs, multicol }
\pgfplotsset { compat = newest }
-\hologoFontSetup{general = \sffamily}
+\hologoFontSetup { general = \sffamily }
\graphicspath
{
{./figure/}{./figures/}{./image/}{./images/}
@@ -146,5 +157,4 @@
}
\endinput
-
% End of file hduthesis.cls