summaryrefslogtreecommitdiff
path: root/macros/unicodetex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-16 03:01:19 +0000
committerNorbert Preining <norbert@preining.info>2022-01-16 03:01:19 +0000
commita574e957682cad50981ddb567c2a106213dc8672 (patch)
treecd02ecf7773fd7bad8e7b6cdb07cf2ff437ba59f /macros/unicodetex
parent0cb730e5737ffa35f797eaf75c2613e5ac88617c (diff)
CTAN sync 202201160301
Diffstat (limited to 'macros/unicodetex')
-rw-r--r--macros/unicodetex/latex/fontspec/CHANGES.md13
-rw-r--r--macros/unicodetex/latex/fontspec/README.md4
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-api.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx23
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx25
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-load.dtx4
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-math.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx82
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx15
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-user.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx6
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx159
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code.ltx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-code.pdfbin629912 -> 657454 bytes
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-api.tex2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex35
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex52
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex4
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex9
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec-lua.dtx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.dtx8
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.ins2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.ltx2
-rw-r--r--macros/unicodetex/latex/fontspec/fontspec.pdfbin600048 -> 606613 bytes
-rw-r--r--macros/unicodetex/latex/njuthesis/LICENSE415
-rw-r--r--macros/unicodetex/latex/njuthesis/README.md9
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.dtx2460
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.ins77
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.pdfbin861637 -> 1060301 bytes
42 files changed, 2332 insertions, 1110 deletions
diff --git a/macros/unicodetex/latex/fontspec/CHANGES.md b/macros/unicodetex/latex/fontspec/CHANGES.md
index 63ae8620b4..10841c18c3 100644
--- a/macros/unicodetex/latex/fontspec/CHANGES.md
+++ b/macros/unicodetex/latex/fontspec/CHANGES.md
@@ -1,6 +1,17 @@
Change history
==============
+## v2.8a (2022/01/15)
+
+ * Add `SwashFont` and `BoldSwashFont` features to support LaTeX's now-builtin `\textsw`
+ and `\swshape` commands, with matching `SwashFeatures` and `BoldSwashFeatures`.
+ A simple implementation that has scope to get more complex if need be.
+ * Remove some legacy code that extended the NFSS in ways that are now handled by
+ LaTeX2e natively.
+ * Long neglected updates through various Github Issues and pull requests.
+ Thanks for your patience with the delays.
+
+
## v2.7i (2020/02/21)
* Define both `b` and `bx` font series by default to avoid spurious warnings in some
@@ -15,6 +26,7 @@ Change history
* Fix regression with `unicode-math` related log files showing the wrong
NFSS-based font ‘identifier’.
+
## v2.7g (2020/01/26)
* Fix regression that broke changing the default encoding after `fontspec` was loaded
@@ -24,6 +36,7 @@ Change history
* Use `\familydefault` instead of `\rmdefault` when calculating scaling parameters in
`Scale=MatchLowercase` and `Scale=MatchUppercase`.
+
## v2.7f (2020/01/24)
* Rename font feature `Letters=Uppercase` to `Style=Uppercase`, as this feature does
diff --git a/macros/unicodetex/latex/fontspec/README.md b/macros/unicodetex/latex/fontspec/README.md
index cd01b539d8..f5dceebaeb 100644
--- a/macros/unicodetex/latex/fontspec/README.md
+++ b/macros/unicodetex/latex/fontspec/README.md
@@ -74,10 +74,8 @@ If you wish to use the latest development version from Github, either use git to
(For bleeding edge versions, see the `working` branch.)
Having obtained the package from Github, install the package code by running
- texlua build.lua install
+ l3build install
This will compile the documentation and install all necessary files in your
local texmf tree. Depending how your TeX distribution is configured
you may then need to update the filename database with `texhash`.
-
-
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx
index b0b6b0a87d..17f22a23e7 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-api.dtx
@@ -378,7 +378,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx
index 4dca137a7d..5adc879707 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-closing.dtx
@@ -32,7 +32,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx
index 7d30448002..f477998130 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-enc.dtx
@@ -146,7 +146,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx
index cf9736c035..994fae553c 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-feat-aat.dtx
@@ -231,7 +231,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx
index 77d431ccf8..a278057442 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-feat-opentype.dtx
@@ -571,7 +571,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx
index ac403028e1..4f3dcea690 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-fontload.dtx
@@ -124,7 +124,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx
index c840d2af60..2a26211c2a 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-graphite.dtx
@@ -116,7 +116,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx
index b5c909fcfc..d76dd61d60 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-interfaces.dtx
@@ -284,7 +284,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx
index 375fc7be2e..ee7e36cc88 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-internal.dtx
@@ -47,7 +47,7 @@
\keys_set_known:nn {fontspec-preparse-cfg} {#1}
\@@_init_ttc:n {#2}
- \@@_load_external_fontoptions:Nn \l_fontspec_fontname_tl {#2}
+ \@@_load_external_fontoptions:N \l_fontspec_fontname_tl
\@@_extract_all_features:n {#1}
\tl_set:Nx \l_@@_fontid_tl { \tl_to_str:N \l_fontspec_fontname_tl-:-\tl_to_str:N \l_@@_all_features_clist }
@@ -138,16 +138,16 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_load_external_fontoptions:Nn}
+% \begin{macro}{\@@_load_external_fontoptions:N}
% Load a possible \texttt{.fontspec} font configuration file.
% This file could set font-specific options for the font about to be loaded.
+% The parameter should be a tokenlist containing a sanitised fontname.
% \begin{macrocode}
-\cs_new:Nn \@@_load_external_fontoptions:Nn
+\cs_new:Nn \@@_load_external_fontoptions:N
{
\bool_if:NT \l_@@_fontcfg_bool
{
-%<debug> \typeout{:: @@_load_external_fontoptions:Nn \exp_not:N #1 {#2} }
- \@@_sanitise_fontname:Nn #1 {#2}
+%<debug> \typeout{:: @@_load_external_fontoptions:N \exp_not:N #1 }
\tl_set:Nx \l_@@_ext_filename_tl {#1.fontspec}
\tl_remove_all:Nn \l_@@_ext_filename_tl {~}
\prop_if_in:NVF \g_@@_fontopts_prop #1
@@ -500,8 +500,10 @@
\@@_add_nfssfont:nnnn \bfdefault \shapedefault \l_@@_fontname_bf_tl \l_@@_fontfeat_bf_clist
\@@_add_nfssfont:nnnn \mddefault \itdefault \l_@@_fontname_it_tl \l_@@_fontfeat_it_clist
\@@_add_nfssfont:nnnn \mddefault \sldefault \l_@@_fontname_sl_tl \l_@@_fontfeat_sl_clist
+ \@@_add_nfssfont:nnnn \mddefault \swdefault \l_@@_fontname_sw_tl \l_@@_fontfeat_sw_clist
\@@_add_nfssfont:nnnn \bfdefault \itdefault \l_@@_fontname_bfit_tl \l_@@_fontfeat_bfit_clist
\@@_add_nfssfont:nnnn \bfdefault \sldefault \l_@@_fontname_bfsl_tl \l_@@_fontfeat_bfsl_clist
+ \@@_add_nfssfont:nnnn \bfdefault \swdefault \l_@@_fontname_bfsw_tl \l_@@_fontfeat_bfsw_clist
\prop_map_inline:Nn \l_@@_nfssfont_prop { \@@_set_faces_aux:nnnnn ##2 }
}
% \end{macrocode}
@@ -677,7 +679,8 @@
\cs_new:Nn \@@_load_fontname:Nn
{
%<debug> \typeout{:: @@_load_fontname:Nn \exp_not:N #1 (#1) {#2} }
- \@@_load_external_fontoptions:Nn #1 {#2}
+ \@@_sanitise_fontname:Nn #1 {#2}
+ \@@_load_external_fontoptions:N #1
\prop_get:NVNF \g_@@_fontopts_prop #1 \l_@@_fontopts_clist
{ \clist_clear:N \l_@@_fontopts_clist }
\keys_set_groups:nnV {fontspec/fontname} {getfontname} \l_@@_fontopts_clist
@@ -724,7 +727,7 @@
\@@_declare_shapes_normal:nn {#1} {#2}
\@@_declare_shapes_smcaps:nn {#1} {#2}
\@@_declare_shape_slanted:nn {#1} {#2}
- \@@_declare_shapes_bx:nn {#1} {#2}
+ \@@_declare_shapes_bx:nn {#1} {#2}
\@@_declare_shape_loginfo:nn {#1} {#2}
}
% \end{macrocode}
@@ -831,7 +834,7 @@
{
\tl_if_exist:cTF { \@@_shape_merge:nn {#1} {\scdefault} }
{ \tl_use:c { \@@_shape_merge:nn {#1} {\scdefault} } }
- { \scdefault }
+ { \scdefault#1 }
}
% \end{macrocode}
% \end{macro}
@@ -930,8 +933,10 @@
{\bfdefault/\shapedefault} {'bold'~}
{\mddefault/\itdefault} {'italic'~}
{\mddefault/\sldefault} {'slanted'~}
+ {\mddefault/\swdefault} {'swash'~}
{\bfdefault/\itdefault} {'bold~ italic'~}
{\bfdefault/\sldefault} {'bold~ slanted'~}
+ {\bfdefault/\swdefault} {'bold~ swash'~}
} (#1/#2)~
with~ NFSS~ spec.:~
\l_@@_nfss_tl
@@ -1205,7 +1210,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx
index 87a93c176b..bb18912f8a 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-keyval.dtx
@@ -223,6 +223,13 @@
}
% \end{macrocode}
%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {SwashFont}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_fontname_sw_tl {#1}
+ }
+% \end{macrocode}
+%
%
% \paragraph{Bold (NFSS) Series}
% By default, \pkg{fontspec} uses the default bold series, \cs{bfdefault}.
@@ -282,6 +289,13 @@
}
% \end{macrocode}
%
+% \begin{macrocode}
+\@@_keys_define_code:nnn {fontspec-preparse-external} {BoldSwashFont}
+ {
+ \fontspec_complete_fontname:Nn \l_@@_fontname_bfsw_tl {#1}
+ }
+% \end{macrocode}
+%
% \paragraph{Small caps}
% Small caps isn't pre-parsed because it can vary with others above:
% \begin{macrocode}
@@ -309,7 +323,6 @@
\@@_keys_define_code:nnn {fontspec-preparse} {BoldFeatures}
{
\clist_put_right:Nn \l_@@_fontfeat_bf_clist {#1}
-
% \prop_put:NxV \l_@@_nfss_prop
% {BoldFont-\g_@@_curr_series_tl} \l_@@_curr_bfname_tl
}
@@ -329,6 +342,14 @@
{
\clist_put_right:Nn \l_@@_fontfeat_bfsl_clist {#1}
}
+\@@_keys_define_code:nnn {fontspec-preparse} {SwashFeatures}
+ {
+ \clist_put_right:Nn \l_@@_fontfeat_sw_clist {#1}
+ }
+\@@_keys_define_code:nnn {fontspec-preparse} {BoldSwashFeatures}
+ {
+ \clist_put_right:Nn \l_@@_fontfeat_bfsw_clist {#1}
+ }
% \end{macrocode}
% Note that small caps features can vary by shape, so these in fact \emph{aren't} pre-parsed.
% \begin{macrocode}
@@ -893,7 +914,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx
index f9ea7f6cd7..22bde48834 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-lang.dtx
@@ -407,7 +407,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx
index 7d0501b89e..4f7ec3bd83 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-load.dtx
@@ -42,7 +42,7 @@
{
The~ fontspec~ package~ requires~ either~ XeTeX~ or~ LuaTeX.\\\\
You~ must~ change~ your~ typesetting~ engine~ to,~ e.g.,~
- "xelatex"~ or~ "lualatex" instead~ of~ "latex"~ or~ "pdflatex".
+ "xelatex"~ or~ "lualatex"~ instead~ of~ "latex"~ or~ "pdflatex".
}
\msg_fatal:nn {fontspec} {cannot-use-pdftex}
% \end{macrocode}
@@ -60,7 +60,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx
index bbe70ef437..73f29782af 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-math.dtx
@@ -248,7 +248,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx
index f23ec2d85f..1eafe2333d 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-msg.dtx
@@ -26,27 +26,27 @@
% \begin{macrocode}
\cs_generate_variant:Nn \msg_new:nnn {nnx}
\cs_generate_variant:Nn \msg_new:nnnn {nnxx}
+\cs_new:Nn \@@_msg_new:nn
+ { \msg_new:nnx {fontspec} {#1} { \tl_trim_spaces:n {#2} } }
\cs_new:Nn \@@_msg_new:nnn
- { \msg_new:nnx {#1} {#2} { \tl_trim_spaces:n {#3} } }
-\cs_new:Nn \@@_msg_new:nnnn
- { \msg_new:nnxx {#1} {#2} { \tl_trim_spaces:n {#3} } { \tl_trim_spaces:n {#4} } }
+ { \msg_new:nnxx {fontspec} {#1} { \tl_trim_spaces:n {#2} } { \tl_trim_spaces:n {#3} } }
\char_set_catcode_space:n {32}
% \end{macrocode}
%
% \subsection{Errors}
%
% \begin{macrocode}
-\@@_msg_new:nnn {fontspec} {only-inside-encdef}
+\@@_msg_new:nn {only-inside-encdef}
{
- \exp_not:N#1can only be used in the second argument
+ \exp_not:N #1 can only be used in the second argument
to \string\DeclareUnicodeEncoding.
}
-\@@_msg_new:nnn {fontspec} {no-size-info}
+\@@_msg_new:nn {no-size-info}
{
Size information must be supplied.\\
For example, SizeFeatures={Size={8-12},...}.
}
-\@@_msg_new:nnnn {fontspec} {font-not-found}
+\@@_msg_new:nnn {font-not-found}
{
The font "#1" cannot be found.
}
@@ -55,18 +55,18 @@
Check the spelling, where the font is installed etc. etc.\\\\
When in doubt, ask someone for help!
}
-\@@_msg_new:nnnn {fontspec} {rename-feature-not-exist}
+\@@_msg_new:nnn {rename-feature-not-exist}
{
The feature #1 doesn't appear to be defined.
}
{
It looks like you're trying to rename a feature that doesn't exist.
}
-\@@_msg_new:nnn {fontspec} {no-glyph}
+\@@_msg_new:nn {no-glyph}
{
'#1' does not contain glyph #2.
}
-\@@_msg_new:nnnn {fontspec} {euler-too-late}
+\@@_msg_new:nnn {euler-too-late}
{
The euler package must be loaded BEFORE fontspec.
}
@@ -76,7 +76,7 @@
loaded after euler. Type <return> to proceed
with incorrect \string\mathit, \string\mathbf, etc.
}
-\@@_msg_new:nnnn {fontspec} {no-xcolor}
+\@@_msg_new:nnn {no-xcolor}
{
Cannot load named colours without the xcolor package.
}
@@ -84,7 +84,7 @@
Sorry, I can't do anything to help. Instead of loading
the color package, use xcolor instead.
}
-\@@_msg_new:nnnn {fontspec} {unknown-color-model}
+\@@_msg_new:nnn {unknown-color-model}
{
Error loading colour `#1'; unknown colour model.
}
@@ -92,7 +92,7 @@
Sorry, I can't do anything to help. Please report this error
to my developer with a minimal example that causes the problem.
}
-\@@_msg_new:nnnn {fontspec} {not-in-addfontfeatures}
+\@@_msg_new:nnn {not-in-addfontfeatures}
{
The "#1" font feature cannot be used in \string\addfontfeatures.
}
@@ -107,17 +107,17 @@
% \subsection{Warnings}
%
% \begin{macrocode}
-\@@_msg_new:nnn {fontspec} {tu-clash}
+\@@_msg_new:nn {tu-clash}
{
I have found the tuenc.def encoding definition file but the TU encoding is not
defined by the LaTeX2e kernel; attempting to correct but you really should update
to the latest version of LaTeX2e.
}
-\@@_msg_new:nnn {fontspec} {tu-missing}
+\@@_msg_new:nn {tu-missing}
{
The TU encoding seems to be missing; please update to the latest version of LaTeX2e.
}
-\@@_msg_new:nnn {fontspec} {addfontfeatures-ignored}
+\@@_msg_new:nn {addfontfeatures-ignored}
{
\string\addfontfeature (s) ignored \msg_line_context:;
it cannot be used with a font that wasn't selected by a fontspec command.\\
@@ -127,77 +127,77 @@
{ The requested feature is "#1". }
{ The requested features are "#1". }
}
-\@@_msg_new:nnn {fontspec} {feature-option-overwrite}
+\@@_msg_new:nn {feature-option-overwrite}
{
Option '#2' of font feature '#1' overwritten.
}
-\@@_msg_new:nnn {fontspec} {ot-tag-too-long}
+\@@_msg_new:nn {ot-tag-too-long}
{
OpenType tag '#1' is too long; script, language, and feature tags must be four characters or fewer.
}
-\@@_msg_new:nnn {fontspec} {aat-feature-not-exist}
+\@@_msg_new:nn {aat-feature-not-exist}
{
'\l_keys_key_tl=\l_keys_value_tl' feature not supported
for AAT font '\l_fontspec_fontname_tl'.
}
-\@@_msg_new:nnn {fontspec} {aat-feature-not-exist-in-font}
+\@@_msg_new:nn {aat-feature-not-exist-in-font}
{
AAT feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
in font '\l_fontspec_fontname_tl'.
}
-\@@_msg_new:nnn {fontspec} {icu-feature-not-exist}
+\@@_msg_new:nn {icu-feature-not-exist}
{
'\l_keys_key_tl=\l_keys_value_tl' feature not supported
for OpenType font '\l_fontspec_fontname_tl'
}
-\@@_msg_new:nnn {fontspec} {icu-feature-not-exist-in-font}
+\@@_msg_new:nn {icu-feature-not-exist-in-font}
{
OpenType feature '\l_keys_key_tl=\l_keys_value_tl' (#1) not available
for font '\l_fontspec_fontname_tl'
with script '\l_@@_script_name_tl' and language '\l_@@_lang_name_tl'.
}
-\@@_msg_new:nnn {fontspec} {no-opticals}
+\@@_msg_new:nn {no-opticals}
{
'#1' doesn't appear to have an Optical Size axis.
}
-\@@_msg_new:nnn {fontspec} {language-not-exist}
+\@@_msg_new:nn {language-not-exist}
{
Language '#1' not available
for font '\l_fontspec_fontname_tl'
with script '\l_@@_script_name_tl'.
}
-\@@_msg_new:nnn {fontspec} {only-xetex-feature}
+\@@_msg_new:nn {only-xetex-feature}
{
Ignored XeTeX-only feature: '#1'.
}
-\@@_msg_new:nnn {fontspec} {only-luatex-feature}
+\@@_msg_new:nn {only-luatex-feature}
{
Ignored LuaTeX-only feature: '#1'.
}
-\@@_msg_new:nnn {fontspec} {unknown-renderer}
+\@@_msg_new:nn {unknown-renderer}
{
Renderer '#1' unknown. Assuming Harfbuzz with 'shaper=#1'.
Please raise a fontspec issue to add this shaper to the interface.
}
-\@@_msg_new:nnn {fontspec} {no-mapping}
+\@@_msg_new:nn {no-mapping}
{
Input mapping not supported in LuaTeX.
}
-\@@_msg_new:nnn {fontspec} {no-mapping-ligtex}
+\@@_msg_new:nn {no-mapping-ligtex}
{
Input mapping not supported in LuaTeX.\\
Use "Ligatures=TeX" instead of "Mapping=tex-text".
}
-\@@_msg_new:nnn {fontspec} {cm-default-obsolete}
+\@@_msg_new:nn {cm-default-obsolete}
{
The "cm-default" package option is obsolete.
}
-\@@_msg_new:nnn {fontspec} {font-index-needs-ttc}
+\@@_msg_new:nn {font-index-needs-ttc}
{
The "FontIndex" feature is only supported by TTC (TrueType Collection) fonts.\\
Feature ignored.
}
-\@@_msg_new:nnn {fontspec} {feat-cannot-remove}
+\@@_msg_new:nn {feat-cannot-remove}
{
The "#1" feature cannot be deactivated. Request ignored.
}
@@ -206,7 +206,7 @@
% \subsection{Info messages}
%
% \begin{macrocode}
-\@@_msg_new:nnn {fontspec} {defining-font}
+\@@_msg_new:nn {defining-font}
{
Font family '\g_@@_nfss_family_tl' created for font '#2'
with options [\l_@@_all_features_clist].\\
@@ -214,33 +214,33 @@
This font family consists of the following NFSS series/shapes:\\
\g_@@_defined_shapes_tl
}
-\@@_msg_new:nnn {fontspec} {no-font-shape}
+\@@_msg_new:nn {no-font-shape}
{
Could not resolve font "#1" (it probably doesn't exist).
}
-\@@_msg_new:nnn {fontspec} {set-scale}
+\@@_msg_new:nn {set-scale}
{
\l_fontspec_fontname_tl\space scale = \l_@@_scale_tl.
}
-\@@_msg_new:nnn {fontspec} {setup-math}
+\@@_msg_new:nn {setup-math}
{
Adjusting the maths setup (use [no-math] to avoid this).
}
-\@@_msg_new:nnn {fontspec} {no-script}
+\@@_msg_new:nn {no-script}
{
Font "#1" does not contain requested Script "#2".
}
-\@@_msg_new:nnn {fontspec} {opa-twice}
+\@@_msg_new:nn {opa-twice}
{
Opacity set twice, in both Colour and Opacity.\\
Using specification "Opacity=#1".
}
-\@@_msg_new:nnn {fontspec} {opa-twice-col}
+\@@_msg_new:nn {opa-twice-col}
{
Opacity set twice, in both Opacity and Colour.\\
Using an opacity specification in hex of "#1/FF".
}
-\@@_msg_new:nnn {fontspec} {bad-colour}
+\@@_msg_new:nn {bad-colour}
{
Bad colour declaration "#1".
Colour must be one of:\\
@@ -268,7 +268,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx
index b8fb02e9e8..60253a1ea8 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-opening.dtx
@@ -201,7 +201,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx
index be0b8be768..94be4acfca 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-opentype.dtx
@@ -466,7 +466,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx
index 32e861f566..7c2f79117c 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-scripts.dtx
@@ -33,18 +33,22 @@
\newfontscript{Chakma}{cakm}
\newfontscript{Cham}{cham}
\newfontscript{Cherokee}{cher}
+\newfontscript{Chorasmian}{chrs}
\newfontscript{CJK~Ideographic}{hani}
\newfontscript{Coptic}{copt}
\newfontscript{Cypriot~Syllabary}{cprt}
+\newfontscript{Cypro~Minoan}{cpmn}
\newfontscript{Cyrillic}{cyrl}
\newfontscript{Default}{DFLT}
\newfontscript{CustomDefault}{latn,DFLT}
\newfontscript{Deseret}{dsrt}
\newfontscript{Devanagari}{dev2,deva}
+\newfontscript{Dives~Akuru}{diak}
\newfontscript{Dogra}{dogr}
\newfontscript{Duployan}{dupl}
\newfontscript{Egyptian~Hieroglyphs}{egyp}
\newfontscript{Elbasan}{elba}
+\newfontscript{Elymaic}{elym}
\newfontscript{Ethiopic}{ethi}
\newfontscript{Georgian}{geor}
\newfontscript{Glagolitic}{glag}
@@ -69,6 +73,7 @@
\newfontscript{Kannada}{knd2,knda}
\newfontscript{Kayah~Li}{kali}
\newfontscript{Kharosthi}{khar}
+\newfontscript{Khitan~Small~Script}{kits}
\newfontscript{Khmer}{khmr}
\newfontscript{Khojki}{khoj}
\newfontscript{Khudawadi}{sind}
@@ -103,8 +108,10 @@
\newfontscript{Myanmar}{mym2,mymr}
\newfontscript{N'Ko}{nko~}
\newfontscript{Nabataean}{nbat}
+\newfontscript{Nandinagari}{nand}
\newfontscript{Newa}{newa}
\newfontscript{Nushu}{nshu}
+\newfontscript{Nyiakeng~Puachue~Hmong}{hmnp}
\newfontscript{Odia}{ory2,orya}
\newfontscript{Ogham}{ogam}
\newfontscript{Ol~Chiki}{olck}
@@ -116,6 +123,7 @@
\newfontscript{Old~Sogdian}{sogo}
\newfontscript{Old~South~Arabian}{sarb}
\newfontscript{Old~Turkic}{orkh}
+\newfontscript{Old~Uyghur}{ougr}
\newfontscript{Osage}{osge}
\newfontscript{Osmanya}{osma}
\newfontscript{Pahawh~Hmong}{hmng}
@@ -147,6 +155,7 @@
\newfontscript{Tai~Viet}{tavt}
\newfontscript{Takri}{takr}
\newfontscript{Tamil}{tml2,taml}
+\newfontscript{Tangsa}{tnsa}
\newfontscript{Tangut}{tang}
\newfontscript{Telugu}{tel2,telu}
\newfontscript{Thaana}{thaa}
@@ -154,9 +163,13 @@
\newfontscript{Tibetan}{tibt}
\newfontscript{Tifinagh}{tfng}
\newfontscript{Tirhuta}{tirh}
+\newfontscript{Toto}{toto}
\newfontscript{Ugaritic~Cuneiform}{ugar}
\newfontscript{Vai}{vai~}
+\newfontscript{Vithkuqi}{vith}
+\newfontscript{Wancho}{wcho}
\newfontscript{Warang~Citi}{wara}
+\newfontscript{Yezidi}{yezi}
\newfontscript{Yi}{yi~~}
\newfontscript{Zanabazar~Square}{zanb}
% \end{macrocode}
@@ -182,7 +195,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx
index a4a754d598..eeb704df58 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-user.dtx
@@ -540,7 +540,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx
index 6350d24cc5..d24776218f 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-vars.dtx
@@ -135,6 +135,8 @@
\clist_new:N \l_@@_fontfeat_bfit_clist
\clist_new:N \l_@@_fontfeat_sl_clist
\clist_new:N \l_@@_fontfeat_bfsl_clist
+\clist_new:N \l_@@_fontfeat_sw_clist
+\clist_new:N \l_@@_fontfeat_bfsw_clist
\clist_new:N \l_@@_fontfeat_sc_clist
% \end{macrocode}
%
@@ -255,6 +257,8 @@
\tl_new:N \l_@@_fontname_bfit_tl
\tl_new:N \l_@@_fontname_sl_tl
\tl_new:N \l_@@_fontname_bfsl_tl
+\tl_new:N \l_@@_fontname_sw_tl
+\tl_new:N \l_@@_fontname_bfsw_tl
\tl_new:N \l_@@_fontname_sc_tl
% \end{macrocode}
%
@@ -324,7 +328,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx b/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx
index fef300a078..ecbad84167 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code-xfss.dtx
@@ -12,6 +12,7 @@
% \begin{macrocode}
\providecommand*\scitdefault{\scdefault\itdefault}
\providecommand*\scsldefault{\scdefault\sldefault}
+\providecommand*\scswdefault{\scdefault\swdefault}
% \end{macrocode}
% \LaTeX's `shape' font axis needs to be overloaded to support italic small caps and slanted small caps.
% These are the combinations to support:
@@ -19,10 +20,13 @@
\cs_new:Nn \@@_shape_merge:nn { c_@@_shape_#1_#2_tl }
\cs_new:Nn \@@_merge_default_shapes:
{
+ \tl_const:cn { \@@_shape_merge:nn \shapedefault\scdefault } {\scdefault}
\tl_const:cn { \@@_shape_merge:nn \itdefault \scdefault } {\scitdefault}
\tl_const:cn { \@@_shape_merge:nn \sldefault \scdefault } {\scsldefault}
+ \tl_const:cn { \@@_shape_merge:nn \swdefault \scdefault } {\scswdefault}
\tl_const:cn { \@@_shape_merge:nn \scdefault \itdefault } {\scitdefault}
\tl_const:cn { \@@_shape_merge:nn \scdefault \sldefault } {\scsldefault}
+ \tl_const:cn { \@@_shape_merge:nn \scdefault \swdefault } {\scswdefault}
\tl_const:cn { \@@_shape_merge:nn \scsldefault \itdefault } {\scitdefault}
\tl_const:cn { \@@_shape_merge:nn \scitdefault \sldefault } {\scsldefault}
\tl_const:cn { \@@_shape_merge:nn \scitdefault \shapedefault } {\scdefault}
@@ -51,159 +55,9 @@
%
%
% \begin{macrocode}
-\cs_if_exist:NTF \DeclareFontSeriesChangeRule
-{
- \cs_set_eq:NN \emfontdeclare \DeclareEmphSequence
-}
-{
+\cs_set_eq:NN \emfontdeclare \DeclareEmphSequence
% \end{macrocode}
%
-% \begin{macro}{\sishape}
-% \begin{macro}{\textsi}
-% These commands for actually selecting italic small caps have been defined for many years; I'm inclined to drop them.
-% They're probably used very infrequently; I personally prefer just writing
-% |\textit{\textsc{...}}| instead.
-%
-% \begin{macrocode}
-\DeclareRobustCommand{\sishape}
- {
- \not@math@alphabet\sishape\relax
- \fontshape{\scitdefault}\selectfont
- }
-\DeclareTextFontCommand{\textsi}{\sishape}
-% \end{macrocode}
-% \end{macro} \end{macro}
-%
-%
-% \begin{macro}{\@@_merge_shape:n}
-% These macros enable the overload on the |\..shape| commands.
-% First, a shape `new+current' (prefix) or `current+new' (suffix) is tried.
-% If not found, fall back on the `new' shape.
-% \begin{macrocode}
-\cs_new:Nn \@@_merge_shape:n
- {
- \@@_if_merge_shape:nTF {#1}
- { \fontshape { \tl_use:c { \@@_shape_merge:nn {\f@shape} {#1} } } \selectfont }
- { \fontshape {#1} \selectfont }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\itshape} \begin{macro}{\scshape} \begin{macro}{\upshape} \begin{macro}{\slshape}
-% The original |\..shape| commands are redefined to use the merge shape macro.
-% \begin{macrocode}
-\DeclareRobustCommand \itshape
- {
- \not@math@alphabet\itshape\mathit
- \@@_merge_shape:n\itdefault
- }
-\DeclareRobustCommand \slshape
- {
- \not@math@alphabet\slshape\relax
- \@@_merge_shape:n\sldefault
- }
-\DeclareRobustCommand \scshape
- {
- \not@math@alphabet\scshape\relax
- \@@_merge_shape:n\scdefault
- }
-\DeclareRobustCommand \upshape
- {
- \not@math@alphabet\upshape\relax
- \@@_merge_shape:n\updefault
- }
-% \end{macrocode}
-% \end{macro} \end{macro} \end{macro} \end{macro}
-%
-%
-%
-% \subsection{Emphasis}
-%
-% \begin{macro}{\emfontdeclare}
-% \begin{macrocode}
-\cs_set_protected:Npn \emfontdeclare #1
- {
- \prop_gclear:N \g_@@_em_prop
- \int_zero:N \l_@@_emdef_int
- \bool_gset_true:N \g_@@_em_normalise_slant_bool
-
- \tl_if_in:nnT {#1} {\slshape}
- {
- \tl_if_in:nnT {#1} {\itshape}
- {
- \bool_gset_false:N \g_@@_em_normalise_slant_bool
- }
- }
-
- \group_begin:
- \normalfont
- \clist_map_inline:nn {\emreset,#1}
- {
- ##1
- \prop_gput_if_new:NxV \g_@@_em_prop { \f@shape } { \l_@@_emdef_int }
- \prop_gput:Nxn \g_@@_em_prop { switch-\int_use:N \l_@@_emdef_int } { ##1 }
- \int_incr:N \l_@@_emdef_int
- }
- \group_end:
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\em}
-% \begin{macrocode}
-\DeclareRobustCommand \em
- {
- \@nomath\em
- \tl_set:Nx \l_@@_emshape_query_tl { \f@shape }
-
- \bool_if:NT \g_@@_em_normalise_slant_bool
- {
- \tl_replace_all:Nnn \l_@@_emshape_query_tl {/sl} {/it}
- }
-
-%<debug> \typeout{Emph~ level:~\int_use:N \l_@@_em_int}
- \prop_get:NxNT \g_@@_em_prop { \l_@@_emshape_query_tl } \l_@@_em_tmp_tl
- {
- \int_set:Nn \l_@@_em_int { \l_@@_em_tmp_tl }
-%<debug> \typeout{Shape~ (\l_@@_emshape_query_tl)~ detected;~ new~ level:~\int_use:N \l_@@_em_int}
- }
-
- \int_incr:N \l_@@_em_int
-
- \prop_get:NxNTF \g_@@_em_prop { switch-\int_use:N \l_@@_em_int } \l_@@_em_switch_tl
- { \l_@@_em_switch_tl }
- {
- \int_zero:N \l_@@_em_int
- \emreset
- }
-
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\emph}
-% \begin{macro}{\emshape}
-% \begin{macro}{\eminnershape}
-% \begin{macro}{\emreset}
-% \begin{macrocode}
-\DeclareTextFontCommand{\emph}{\em}
-\cs_set:Npn \emreset { \upshape }
-\cs_set:Npn \emshape { \itshape }
-\cs_set:Npn \eminnershape { \upshape }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
-\emfontdeclare{ \emshape, \eminnershape }
-\cs_new:Nn \fontspec_set_em_level:n { \int_set:Nn \l_@@_em_int {#1} }
-% \end{macrocode}
-%
-% \begin{macrocode}
-}
-% \end{macrocode}
%
%
%
@@ -271,7 +125,6 @@
\cs_set:Npn \reset@font
{
\normalfont
- \int_zero:N \l_@@_em_int
\int_zero:N \l_@@_strong_int
}
% \end{macrocode}
@@ -298,7 +151,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code.ltx b/macros/unicodetex/latex/fontspec/fontspec-code.ltx
index 1dcdea07cb..5ee01ccc80 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code.ltx
+++ b/macros/unicodetex/latex/fontspec/fontspec-code.ltx
@@ -30,7 +30,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-code.pdf b/macros/unicodetex/latex/fontspec/fontspec-code.pdf
index 52d9e28cde..0a86c16bf7 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-code.pdf
+++ b/macros/unicodetex/latex/fontspec/fontspec-code.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex
index 3ef857e914..42970e3f37 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-api.tex
@@ -339,7 +339,7 @@ OpenType language tag |#1|.
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex
index 2a706a6252..8ab667b288 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-enc.tex
@@ -204,7 +204,7 @@ the process of defining Unicode font range encodings:
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex
index 90b1019561..4bb75d14b5 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-featset.tex
@@ -150,6 +150,8 @@ features requested.
\feat{BoldItalicFeatures}\texttt=\marg{features} \\
\feat{SlantedFeatures}\texttt=\marg{features} \\
\feat{BoldSlantedFeatures}\texttt=\marg{features} \\
+ \feat{SwashFeatures}\texttt=\marg{features} \\
+ \feat{BoldSwashFeatures}\texttt=\marg{features} \\
\feat{SmallCapsFeatures}\texttt=\marg{features} \\
\feat{UprightFeatures}\texttt=\marg{features}
}
@@ -160,8 +162,7 @@ feature options that are completely unavailable in the upright shapes.
The font features defined at the top level of the optional \cmd\fontspec\
argument are applied to \emph{all} shapes of the family.
-Using \feat{Upright-}, \feat{SmallCaps-}, \feat{Bold-},
-\feat{Italic-}, and \feat{BoldItalicFeatures},
+Using the \feat{xxFeatures} options shown above,
separate font features may be defined to their respective shapes
\emph{in addition} to, and with precedence over, the `global' font features.
See \exref{itfeat}.
@@ -178,7 +179,7 @@ Note that because most fonts include their small caps glyphs
within the main font, features specified with \feat{SmallCapsFeatures} are applied \emph{in addition} to
any other shape-specific features as defined above, and hence \feat{SmallCapsFeatures}
can be nested within \feat{ItalicFeatures} and friends. Every combination
-of upright, italic, bold and small caps can thus be assigned individual
+of upright, italic, bold, (etc.), and small caps can thus be assigned individual
features, as shown in the somewhat ludicrous \exref{scfeat}.
\begin{Xexample}{scfeat}{An example of setting the \feat{SmallCapsFeatures}
@@ -326,7 +327,7 @@ Features introduced in this section may be used with any font.
the text.
You should think of this as the literal glyphs of the font being coloured in a certain way.
Notably, this mechanism is different to that of the \pkg{color}/\pkg{xcolor}/\pkg{hyperref}/etc.\ packages, and in fact using \pkg{fontspec} commands to set colour will prevent your text from changing colour using those packages at all!
-For example, if you set the colour in a \verb|\setmainfont| command, \verb|\color{...}| and related commands, including hyperlink colouring, will no longer have any effect on text in this font.)
+(For example, if you set the colour in a \verb|\setmainfont| command, \verb|\color{...}| and related commands, including hyperlink colouring, will no longer have any effect on text in this font.)
Therefore, \pkg{fontspec}'s colour commands are best used to set explicit colours in specific situations, and the \pkg{xcolor} package is recommended for more general colour functionality.
The colour is defined as a triplet of two-digit Hex RGB
@@ -417,10 +418,9 @@ automatically.
\subsection{Interword space}
-While the space between words can be varied on an individual
-basis with the \TeX\ primitive \cmd\spaceskip\ command, it is
-more convenient to specify this information when the font is
-first defined.
+While the space between words can be varied with the \TeX\ primitive
+\cmd\spaceskip\ command, \pkg{fontspec} also supports changing the
+interword spacing when a given font is loaded.
The space in between words in a paragraph will be chosen automatically,
and generally will not need to be adjusted. For those
@@ -454,10 +454,7 @@ use this feature in \cs{addfontfeatures}.
\subsection{Post-punctuation space}
-If \cmd\frenchspacing\ is \emph{not} in effect, \TeX\ will allow extra
-space after some punctuation in its goal of justifying the lines of text.
-Generally, this is considered old-fashioned, but occasionally in small amounts the
-effect can be justified, pardon the pun.
+If \cmd\frenchspacing\ is \emph{not} in effect (which is the default), \TeX\ will allow extra space after some punctuation in its goal of justifying the lines of text.
The \feat{PunctuationSpace} feature takes a scaling factor by which to
adjust the nominal value chosen for the font; this is demonstrated in
@@ -569,14 +566,14 @@ of font size. For example, something like:
In rare situations users may want to mechanically distort the shapes of the glyphs in the current font such as shown in \exref{fake}. Please don't overuse these features; they are \emph{not} a good alternative to having the real shapes.
\begin{Xexample}{fake}{Articifial font transformations.}
- \fontspec{Quattrocento.otf} \emph{ABCxyz} \quad
- \fontspec{Quattrocento.otf}[FakeSlant=0.2] ABCxyz
+ \fontspec{Quattrocento-Regular.otf} \emph{ABCxyz} \quad
+ \fontspec{Quattrocento-Regular.otf}[FakeSlant=0.2] ABCxyz
- \fontspec{Quattrocento.otf} ABCxyz \quad
- \fontspec{Quattrocento.otf}[FakeStretch=1.2] ABCxyz
+ \fontspec{Quattrocento-Regular.otf} ABCxyz \quad
+ \fontspec{Quattrocento-Regular.otf}[FakeStretch=1.2] ABCxyz
- \fontspec{Quattrocento.otf} \textbf{ABCxyz} \quad
- \fontspec{Quattrocento.otf}[FakeBold=1.5] ABCxyz
+ \fontspec{Quattrocento-Regular.otf} \textbf{ABCxyz} \quad
+ \fontspec{Quattrocento-Regular.otf}[FakeBold=1.5] ABCxyz
\end{Xexample}
If values are omitted, their defaults are as shown above.
@@ -617,7 +614,7 @@ Also see the OpenType \opt{Uppercase} option of the \feat{Letters} feature (\vre
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex
index 85ad1ea75d..d6ac139ef6 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-fontsel.tex
@@ -356,6 +356,8 @@ in \exref{nfface}, which is repeated in \vref{sec:contextuals}.
\feat{~BoldItalicFont} = \meta{font name} \\
\feat{SlantedFont} = \meta{font name} \\
\feat{BoldSlantedFont} = \meta{font name} \\
+ \feat{SwashFont} = \meta{font name} \\
+ \feat{BoldSwashFont} = \meta{font name} \\
\feat{SmallCapsFont} = \meta{font name} \\
\feat{UprightFont} = \meta{font name}
}
@@ -385,23 +387,12 @@ feature is provided.
-\subsubsection{Small caps and slanted font shapes}
-
-When a font family has both slanted \emph{and} italic shapes, these may be specified separately using the analogous features \feat{SlantedFont} and \feat{BoldSlantedFont}.
-Without these, however, the \LaTeX\ font switches for slanted (\cs{textsl}, \cs{slshape}) will default to the italic shape.
+\subsubsection{Small caps shapes}
For modern OpenType fonts, small caps glyphs are included within a fontface and \pkg{fontspec} will automatically detect them
for use with the \cs{textsc} and \cs{scshape} commands.
Pre-OpenType, it was common for font families to be distributed with small caps glyphs in separate fonts, due to the limitations on the number of glyphs allowed in the PostScript Type~1 format.
-Such fonts may be used by declaring the \feat{SmallCapsFont} of the family you are specifying:
-\begin{Verbatim}
- \setmainfont{Minion MM Roman}[
- SmallCapsFont={Minion MM Small Caps & Oldstyle Figures}
- ]
- Roman 123 \\ \textsc{Small caps 456}
-\end{Verbatim}
-In fact, this example is overly simplistic since it does not cover the other shapes in a font family.
-You should specify the small caps font for each individual bold and italic shape as in
+Such fonts may be used by declaring the \feat{SmallCapsFont} for each font of the family you are specifying:
\begin{Verbatim}
\setmainfont{ <upright> }[
UprightFeatures = { SmallCapsFont={ <sc> } } ,
@@ -426,6 +417,39 @@ should write instead, if necessary,
]
\end{Verbatim}
+
+\subsubsection{Slanted font shapes}
+
+When a font family has both slanted \emph{and} italic shapes, these may be specified separately using the analogous features \feat{SlantedFont} and \feat{BoldSlantedFont}.
+Without these, however, the \LaTeX\ font switches for slanted (\cs{textsl}, \cs{slshape}) will default to the italic shape.
+
+
+\subsubsection{Swash font shapes}
+
+Swash font shapes in a family is supported by \LaTeX's commands \cs{textsw} and \cs{swshape}. These commands assume that swash shapes are in a sense `parallel' to italic shapes --- for instance, writing both \cs{swshape} and \cs{itshape} would not result in an italic swash shape (you would get whichever was declared last).
+The \pkg{fontspec} package adopts this approach, while recognising that OpenType fonts in theory could have any crazy combination of shapes such as `italic swash small caps'.
+Attempting to support arbitrarily complex situations makes setup (and the code) more difficult with let's say infrequent benefit --- \pkg{fontspec}'s alternate feature selection mechanisms (such as verb|\addfontfeature{Style=Swash}|) can be used in such situations.
+
+Therefore, setup is quite simple:
+\begin{Verbatim}
+ \setmainfont{...}[
+ SwashFont = {...} ,
+ BoldSwashFont = {...} ,
+ ]
+\end{Verbatim}
+No assumptions are made about the |+swsh| OpenType feature availability, and if desired the `Swash' feature needs to be explicitly requested as in:
+\begin{Verbatim}
+ \setmainfont{...}[
+ SwashFont = {...} ,
+ SwashFeatures = {Style=Swash} ,
+ ...
+ ]
+\end{Verbatim}
+This may become more automatic in the future.
+
+
+
+
\subsection{Specifically choosing the \NFSS\ family}
In \LaTeX's \NFSS, font families are defined with names such as `\texttt{ppl}' (Palatino), `\texttt{lmr}' (Latin Modern Roman), and so on, which are selected with the \cs{fontfamily} command:
@@ -617,7 +641,7 @@ if it were a `naked' control sequence; \eg, `|M. \fontspec{...} N|' and
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex
index 7f32adb009..4e913b6107 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-intro.tex
@@ -184,7 +184,7 @@ An example for setting up a font family for use with \cs{strong} is discussed in
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex
index 7365160b49..e0ed5881d6 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-luatex.tex
@@ -26,7 +26,7 @@ From 2019 the possibility of using the Harfbuzz text shaping engine within \LuaT
been developed by Khaled Hosny. When running a suitable \LuaTeX\ engine with Harfbuzz support, \pkg{fontspec} provides the following options:
\begin{itemize}
-\item \feat{Renderer} = \opt{Harfbuzz} : use the Harfbuzz engine without an explicit `shaper'.
+\item \feat{Renderer} = \opt{HarfBuzz} : use the Harfbuzz engine without an explicit `shaper' (the old \opt{Harfbuzz} name is kept for compatibility).
\item \feat{Renderer} = \opt{OpenType} : use the Harfbuzz engine with the OpenType shaper.
\item \feat{Renderer} = \opt{AAT} : use the Harfbuzz engine with the AAT shaper.
\item \feat{Renderer} = \opt{Graphite} : use the Harfbuzz engine with the Graphite shaper.
@@ -81,7 +81,7 @@ Please refer to the \LuaTeX/\pkg{luaotfload} documentation for more details.
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex
index fb08645abb..3d6aa4601b 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-opentype.tex
@@ -1171,12 +1171,13 @@ selected numerically such as for the \feat{Annotation} feature.
\begin{features}{Style}
\otf*{Alternate}{salt}
+\otf*{Cursive}{curs}
+\otf*{Historic}{hist}
\otf*{Italic}{ital}
\otf*{Ruby}{ruby}
\otf*{Swash}{swsh}
-\otf*{Cursive}{curs}
-\otf*{Historic}{hist}
\otf*{Titling}{titl}
+\otf*{Uppercase}{case}
\otf*{HorizontalKana}{hkna}
\otf*{VerticalKana}{vkna}
\cmidrule{2-4}
@@ -1195,7 +1196,7 @@ particular substitutions are organised with which feature largely up to the font
\begin{Xexample}[firstline=2]{style-alt}{Example of the \opt{Alternate} option of the \feat{Style} feature.}
\Large
- \fontspec{Quattrocento.otf}
+ \fontspec{Quattrocento-Regular.otf}
M Q W \\
\addfontfeature{Style=Alternate}
M Q W
@@ -1466,7 +1467,7 @@ however; please get in touch if there are improvements that could be made.
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex b/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex
index 5c1e3e3e7d..4f1369ddd6 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex
+++ b/macros/unicodetex/latex/fontspec/fontspec-doc-xetex.tex
@@ -282,7 +282,7 @@ options: \opt{Off},
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec-lua.dtx b/macros/unicodetex/latex/fontspec/fontspec-lua.dtx
index fdbe11e9d1..0ec3127188 100644
--- a/macros/unicodetex/latex/fontspec/fontspec-lua.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec-lua.dtx
@@ -89,7 +89,7 @@ end
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.dtx b/macros/unicodetex/latex/fontspec/fontspec.dtx
index 5d07989465..e6d8105a7a 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.dtx
+++ b/macros/unicodetex/latex/fontspec/fontspec.dtx
@@ -70,7 +70,7 @@
\ProvidesExplFile{fontspec.dtx}
%</dtx>
%<*fontspec>
- {2020/02/21}{2.7i}{Font selection for XeLaTeX and LuaLaTeX}
+ {2022/01/15}{2.8a}{Font selection for XeLaTeX and LuaLaTeX}
%</fontspec>
% \end{macrocode}
%
@@ -89,8 +89,8 @@
%<lua>local fontspec = fontspec
%<lua>fontspec.module = {
%<lua> name = "fontspec",
-%<lua> version = "2.7i",
-%<lua> date = "2020/02/21",
+%<lua> version = "2.8a",
+%<lua> date = "2022/01/15",
%<lua> description = "Font selection for XeLaTeX and LuaLaTeX",
%<lua> author = "Khaled Hosny, Philipp Gesang, Will Robertson",
%<lua> copyright = "Khaled Hosny, Philipp Gesang, Will Robertson",
@@ -104,7 +104,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.ins b/macros/unicodetex/latex/fontspec/fontspec.ins
index adace502d2..be45e40b82 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.ins
+++ b/macros/unicodetex/latex/fontspec/fontspec.ins
@@ -48,7 +48,7 @@ the conditions of the LaTeX Project Public License, version 1.3c or higher
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.ltx b/macros/unicodetex/latex/fontspec/fontspec.ltx
index b497948696..239069ff7e 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.ltx
+++ b/macros/unicodetex/latex/fontspec/fontspec.ltx
@@ -28,7 +28,7 @@
% ------------------------------------------------
% The FONTSPEC package <wspr.io/fontspec>
% ------------------------------------------------
-% Copyright 2004-2020 Will Robertson, LPPL "maintainer"
+% Copyright 2004-2022 Will Robertson, LPPL "maintainer"
% Copyright 2009-2015 Khaled Hosny
% Copyright 2013 Philipp Gesang
% Copyright 2013-2016 Joseph Wright
diff --git a/macros/unicodetex/latex/fontspec/fontspec.pdf b/macros/unicodetex/latex/fontspec/fontspec.pdf
index 97e8a293a0..3e223342f5 100644
--- a/macros/unicodetex/latex/fontspec/fontspec.pdf
+++ b/macros/unicodetex/latex/fontspec/fontspec.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/njuthesis/LICENSE b/macros/unicodetex/latex/njuthesis/LICENSE
new file mode 100644
index 0000000000..4db9b5af29
--- /dev/null
+++ b/macros/unicodetex/latex/njuthesis/LICENSE
@@ -0,0 +1,415 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
diff --git a/macros/unicodetex/latex/njuthesis/README.md b/macros/unicodetex/latex/njuthesis/README.md
index 77c522a2be..b9ea0d1884 100644
--- a/macros/unicodetex/latex/njuthesis/README.md
+++ b/macros/unicodetex/latex/njuthesis/README.md
@@ -1,7 +1,10 @@
The `njuthesis` class
=====================
-The `njuthesis` class is intended for typesetting Nanjing University dissertations with LaTeX, providing support for bachelor, masters, and doctoral thesis. Compilation of this class requires either `xelatex` or `lualatex` engine.
+The `njuthesis` class is intended for typesetting Nanjing University
+dissertations with LaTeX, providing support for bachelor, master, and
+doctoral thesis. Compilation of this class requires either `xelatex`
+or `lualatex` engine.
Contributing
------------
@@ -13,7 +16,7 @@ are always welcome.
Wiki
----
-Please see [Chinese wiki](https://github.com/nju-lug/NJUThesis/wiki)。
+Please see [Chinese wiki](https://github.com/nju-lug/NJUThesis/wiki).
License
-------
@@ -25,4 +28,4 @@ version.
-----
-Copyright (C) 2021 by NJU LUG.
+Copyright (C) 2021 - 2022 by NJU LUG.
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.dtx b/macros/unicodetex/latex/njuthesis/njuthesis.dtx
index d08e3c987f..10471b82e8 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.dtx
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.dtx
@@ -2,9 +2,10 @@
% !TeX program = XeLaTeX
% !TeX encoding = UTF-8
%
-% Copyright (C) 2021
-% by Nanjing University Linux User Group <nju.lug@yaoge123.cn>
-%
+% Copyright (C) 2021 - 2022
+% by Nanjing University Linux User Group
+% <git+nju-lug-email-3104-issue-@yaoge123.cn>
+%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
% license or (at your option) any later version. The latest version
@@ -49,8 +50,9 @@
\preamble
-Copyright (C) 2021
-by Nanjing University Linux User Group <nju.lug@yaoge123.cn>
+Copyright (C) 2021 - 2022
+by Nanjing University Linux User Group
+<git+nju-lug-email-3104-issue-@yaoge123.cn>
This file may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c of this license
@@ -62,20 +64,18 @@ license is in:
and version 1.3 or later is part of all distributions of LaTeX version
2005/12/01 or later.
-To produce the documentation run the original source files ending with `.dtx'
-through XeTeX.
-
+To produce the documentation run the original source files ending with
+`.dtx' through XeTeX.
+
\endpreamble
\generate{
\usedir{tex/latex/njuthesis}
\file{\jobname.cls} {\from{\jobname.dtx}{class}}
-%</install>
%<*internal>
\usedir{source/latex/njuthesis}
\file{\jobname.ins} {\from{\jobname.dtx}{install}}
%</internal>
-%<*install>
}
\obeyspaces
@@ -105,8 +105,8 @@ through XeTeX.
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\RequirePackage{expl3}
-%<class>\GetIdInfo $Id: njuthesis.dtx 0.13.0 2021-12-13 16:30:00 +0800 NJU LUG <nju.lug@yaoge123.cn> $
-%<class> { Thesis template for Nanjing University }
+%<class>\GetIdInfo $Id: njuthesis.dtx 0.14.0 2022-01-16 00:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+%<class> { Thesis template for Nanjing University }
%<class>\ProvidesExplClass{njuthesis}
%<class>{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%
@@ -116,10 +116,15 @@ through XeTeX.
\usepackage{listings,njuvisual,tabularray}
\usepackage[firstpage=true]{background}
\backgroundsetup{contents={\njuemblem[white!85!gray]{22cm}{!}},scale=1,angle=0,hshift=-4cm}
-\newcommand*\scite[1]{\textsuperscript{\cite{#1}}}
-\setlist[1]{labelindent=0.5em}
-\hypersetup{pdftitle={The njuthesis class – LaTeX thesis template for Nanjing University}}
-\UseTblrLibrary{booktabs,siunitx,diagbox}
+\colorlet{at@guard}{njuviolet}
+\definecolor{olgreen}{HTML}{138a07}
+\newcommand\olbutton[1]{\textcolor{olgreen}{\bfseries #1}}
+\hypersetup{%
+ pdftitle = {The njuthesis class - LaTeX thesis template for Nanjing University},
+ citecolor = njublue,
+ linkcolor = njuviolet,
+ urlcolor = njumagenta}
+\UseTblrLibrary{booktabs,diagbox,siunitx}
\DefTblrTemplate{caption-tag}{default}{表\hspace{0.25em}\thetable}
\SetTblrStyle{caption-tag}{font=\bfseries}
\DefTblrTemplate{caption-sep}{default}{\quad}
@@ -147,7 +152,7 @@ through XeTeX.
rulecolor = \color{njumagenta},
language = bash,
alsoletter = {-},
- emphstyle = \color{green}
+ emphstyle = \color{nju-cs-green}
}
\lstdefinestyle{style@latex}
{
@@ -171,13 +176,13 @@ through XeTeX.
%</driver>
% \fi
%
-% \title{\color{njuviolet}{The \cls{njuthesis} class\\ 南京大学学位论文模板}}
-%
+% \title{\color{njuviolet}{The \cls{njuthesis} class\\ \textbf{南京大学学位论文模板}}}
+%
% \author{^^A
-% Nanjing University Linux User Group
-% \thanks{E-mail: \href{mailto:nju.lug@yaoge123.cn}{nju.lug@yaoge123.cn}}}
+% 南京大学 Linux 用户组
+% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}{git+nju-lug-email-3104-issue-@yaoge123.cn}}}
%
-% \date{v0.13.0 \\ Released 2021-12-13}
+% \date{v0.14.0 \quad 2022-01-16}
%
% \changes{v0.1}{2021/09/04}{开始开发。}
% \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
@@ -187,7 +192,7 @@ through XeTeX.
% \changes{v0.6}{2021/09/10}{封装个人信息}
% \changes{v0.6}{2021/09/10}{实现自动打包发布。}
% \changes{v0.7}{2021/09/11}{增加对研究生模板的支持}
-% \changes{v0.7}{2021/09/12}{将njuthesis发布在CTAN。}
+% \changes{v0.7}{2021/09/12}{将 \cls{njuthesis} 发布在 CTAN。}
% \changes{v0.8}{2021/09/12}{修复已知问题,进行公开宣传。}
% \changes{v0.9}{2021/09/15}{使用 DocStrip 合并模板文件。}
% \changes{v0.9}{2021/09/15}{大幅度修改宏名称以符合 \hologo{LaTeX3} 规范。}
@@ -198,6 +203,9 @@ through XeTeX.
% \changes{v0.12}{2021/11/30}{区分测试文件和空白模板。}
% \changes{v0.12}{2021/12/06}{修改了说明文档的代码呈现样式。}
% \changes{v0.13}{2021/12/12}{优化了编译速度。}
+% \changes{v0.13}{2021/12/15}{适配2022届本科生毕业毕业论文(设计)规范。}
+% \changes{v0.14}{2022/01/13}{将本模板内嵌入南大 \hologo{TeX} 网站。}
+%
%
% \maketitle
%
@@ -211,69 +219,114 @@ through XeTeX.
% \def\abstractname{Abstract}
% \begin{abstract}
% The \cls{njuthesis} class is intended for typesetting Nanjing University
-% dissertations with \hologo{LaTeX}, providing support for bachelor, masters,
-% and doctoral thesis.
+% dissertations with \hologo{LaTeX}, providing support for bachelor, master,
+% and doctoral thesis.
% \end{abstract}
%
% \vspace{2cm}
% \def\abstractname{特别声明}
% \begin{abstract}
-% 请注意,本模板仍未完成开发,出现bug或者文档不完善属于正常情况,欢迎提交
-% issue 或 Pull Request。
+% 在使用本模板时,我们默认您同意以下内容:
+% \begin{enumerate}
+% \item 本模板通过 LPPL 1.3c 协议开放源代码,您可以随意使用编译出的 PDF 文件。
+% \item 本模板与学校官方部门并不存在合作关系,作者不对使用本模板产生的格式审查问题负责。
+% \item 遇到本文档没有覆盖的问题属于正常情况,欢迎提交反馈意见。
+% \end{enumerate}
%
-% 本模板未经学校官方部门的审核,作者不对使用本模板产生的格式审查问题负责。
-%
-% \href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU LUG}始终欢迎
+% 我们的 \href{https://git.nju.edu.cn/nju-lug/lug-introduction}{Linux 用户组}始终欢迎
% 您的加入!
% \end{abstract}
%
% \clearpage
%
+%
% \setcounter{tocdepth}{4}
% \tableofcontents
%
% \clearpage
%
-%
+%
% \begin{documentation}
%
% \section{模板介绍}
%
-% \cls{njuthesis},即南京大学学位论文模板,是一个由南京大学 LUG 组织维护的,用于处理本校学生毕业论文排版需求的 \hologo{LaTeX} 模板。
+% \cls{njuthesis},即南京大学学位论文模板,是一个由南京大学 Linux 用户组维护的,用于处理本校学生毕业论文排版需求的 \hologo{LaTeX} 模板。
+%
+% 本模板使用的本科生毕业论文模板格式依据《关于启动南京大学2022届本科毕业论文(设计)工作的通知》\cite{nju2021},研究生学位论文格式依据研究生院提供的材料包。
+%
+%
+% \subsection{开始之前}
+% \label{subsec:first-things-first}
+%
+% 在本文正式介绍 \cls{njuthesis} 论文模板前,您也许并不熟悉 \hologo{TeX} 排版系统。话不多说,请先完整体验一遍下述的工作流程:
+%
+% \bigskip
+% \fcolorbox{olgreen}{gray!5}{\parbox{\textwidth-5em}{%
+% \hspace{2em}\begin{minipage}[c]{10cm}
+% \begin{enumerate}
+% \item 访问 \url{https://tex.nju.edu.cn}
+% \item 点击右上角~\olbutton{注册}~按钮,用南大邮箱注册账号
+% \item 登录您的账号
+% \item 点击左上角~\olbutton{创建新项目}~按钮,选择~\olbutton{论文模板}
+% \item 随意取名,点击~\olbutton{创建}~按钮
+% \end{enumerate}
+% \end{minipage}}}
+%
+% \bigskip
+% 稍等片刻,您会在浏览器右侧发现一份新生成的空白论文。如果它的效果令您满意,不妨以此为基础开始写作。
+%
+% \subparagraph{我一定要体验上述流程吗?}
+% 是,但也不一定。有人坚持认为应该做一些\emph{直观、清晰、有手就行、一条路走到底}的教程,而不是
+% \emph{长篇累牍的精细介绍},其核心论据在于:现代人类总体上需要快速取得成就感,而且大部分可能用
+% 到本模板的同学不会具备必要的基础知识。反驳的观点在于过分简单的实验总是浪费时间的,尤其是在您
+% 可能早已掌握基本用法的情况下。但,不论如何,这番操作总会使您预览到 \cls{njuthesis} 论文模板的
+% 实际样式。
+%
+% \subparagraph{我并没有见到理想的结果。}
+% 具体是哪里不满意?如果是\emph{样式存在偏差},请联系模板的作者;如果\emph{不能访问前文提到的在
+% 线编译网站},请考虑检查网络连接,依次咨询本校
+% \href{https://itsc.nju.edu.cn}{信息化管理建设服务中心} 和该网站的维护者
+% \href{mailto:my@yaoge123.cn}{姚舸老师};如果\emph{报错},请点击左上角的菜单按钮,查看编译器是
+% 否显示为 |XeLaTeX|;再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个相当有益的
+% 结论:\emph{也许 Word 模板更加适合您}。这可以节省下熟悉 \hologo{TeX} 排版软件使用方法所需的可
+% 观时间。
+%
+% \subparagraph{但我依然对 \hologo{LaTeX} 一无所知!}
+% 这意味着您也许得花些时间在\emph{长篇累牍的精细介绍}上。请接着向后阅读,有需要时善用搜索。
%
%
% \subsection{历史沿革}
%
-% 十几年来,多位热心校友发布过自己编写的模板,在GitHub上可考的包括
+% 十几年来,多位热心校友发布过自己编写的模板,在 GitHub 网站上可考的包括:
% \begin{enumerate}
-% \item 杨文博(\href{http://yangwenbo.com/}{@solrex})的\href{https://github.com/solrex/njuthesis}{南京大学学位论文\hologo{LaTeX}模板}(2010)
-% \item \href{https://github.com/fireblue}{@fireblue}基于solrex模板的的\href{https://github.com/fireblue/NJUThesis}{南京大学学位论文\hologo{LaTeX}模板}(2013)
-% \item \href{https://github.com/wenhai-zheng}{@wenhai-zheng}的\href{https://github.com/wenhai-zheng/NJUThesis}{NJUThesis}(2013)
-% \item 曹增乐(\href{https://github.com/ZLCao}{@ZLCao})的\href{https://github.com/ZLCao/NJUBachelor}{NJUBachelor}(2013-2016)
-% \item 胡海星(\href{http://haixing-hu.github.io/}{@Haixing-Hu})的\href{https://github.com/Haixing-Hu/nju-thesis}{NJU-Thesis}(2013 - 2018)
-% \item 张楚珩(\href{https://github.com/zhangchuheng123}{@zhangchuheng123})基于胡海星模板的\href{https://github.com/zhangchuheng123/NJUThesis}{NJUThesis}(2016)
-% \item 蒋炎岩(\href{http://ics.nju.edu.cn/~jyy/}{@jiangyy})的\href{https://github.com/jiangyy/njuthesis}{南京大学山寨\hologo{LyX}研究生毕业论文模板}(2017)
-% \item \href{https://github.com/njuHan}{@njuHan}基于胡海星模板的\href{https://github.com/njuHan/njuthesis-nju-thesis-template/}{NJU-Thesis}(2018 - 2021)
-% \item 饶安逸(\href{https://anyirao.com/}{@AnyiRao})基于张楚珩模板的\href{https://github.com/AnyiRao/NJUThesis2018/}{NJU Thesis 2018}(2018)
-% \item 赵懿晨(\href{https://fengchendian.github.io/about.html}{@FengChendian})基于饶安逸模板的\href{https://github.com/FengChendian/NJUThesis2021}{NJU Thesis 2021}(2021)
+% \item 杨文博(\href{http://yangwenbo.com/}{@solrex})的 njuthesis(2010 - 2018) \cite{wenboyang2013}
+% \item \href{https://github.com/fireblue}{@fireblue} 基于杨文博模板的 NJUThesis(2013)\cite{fireblue2013}
+% \item \href{https://github.com/wenhai-zheng}{@wenhai-zheng} 的 NJUThesis(2013)\cite{wenhai-zheng2013}
+% \item 曹增乐(\href{https://github.com/ZLCao}{@ZLCao})的 NJUBachelor(2013 - 2016)\cite{zenglecao2013}
+% \item 胡海星(\href{http://haixing-hu.github.io/}{@Haixing-Hu})的 NJU-Thesis(2013 - 2018)\cite{haixinghu2013}
+% \item 张楚珩(\href{https://github.com/zhangchuheng123}{@zhangchuheng123})基于胡海星模板的 NJUThesis(2016)\cite{chuhengzhang2016}
+% \item 蒋炎岩(\href{http://ics.nju.edu.cn/~jyy/}{@jiangyy})的 njuthesis(2017 - 2019)\cite{yanyanjiang2017}
+% \item \href{https://github.com/njuHan}{@njuHan} 基于胡海星模板的 NJU-Thesis(2018 - 2021)
+% \item 饶安逸(\href{https://anyirao.com/}{@AnyiRao})基于张楚珩模板的 NJU Thesis 2018(2018)\cite{anyirao2018}
+% \item 赵懿晨(\href{https://fengchendian.github.io/about.html}{@FengChendian})基于饶安逸模板的 NJU Thesis 2021(2021)\cite{yichenzhao2021}
% \end{enumerate}
% 至于不幸而未进行代码版本管理的,甚至于说以压缩包形式流传于各人硬盘中的,就更不可计数了。
%
% 与其让一千个学生做一千种不同的模板,不如有人牵起头来,集中力量办大事。因此,南
% 京大学 Linux User Group 的有志之士在2021年暑期联合起来,参考以上的现成模板,兼
-% 顾友校\href{https://ctan.org/pkg/thuthesis}{\textsc{THuThesis}}、
-% \href{https://ctan.org/pkg/fduthesis}{\pkg{fduthesis}}等优秀项目,构建了这一全
-% 新模板,力求通过 \hologo{LaTeX3} 语法和清晰的接口实现良好的易用性和可维护性。
+% 顾友校 \cls{fduthesis}\cite{fduthesis}、\textsc{THuThesis}\cite{thuthesis} 等
+% 优秀项目,构建了这一全新模板,力求通过 \hologo{LaTeX3} 语法和清晰的接口实现良
+% 好的易用性和可维护性。
%
% 目前,本模板的主要维护者包括:
% \begin{itemize}
-% \item 赵懿晨
-% \item 熊煜
-% \item 马畅
+% \item 赵懿晨
+% \item 熊煜
+% \item 马畅
% \end{itemize}
%
%
-% \subsection{君\hologo{LaTeX}本当上手}
+% \subsection{君 \hologo{LaTeX} 本当上手}
%
% \hologo{LaTeX} 并不是一种零门槛的语言,亦不是南京大学学生的必备技能。有同学听
% 到“\emph{给毕业论文交差也得写代码}”这种事情就头疼,实在是我们不愿意见到而必须
@@ -283,10 +336,11 @@ through XeTeX.
% 的相关知识体系,只能\emph{尽力做到有求必应},在需要的地方顺带提一嘴,以期使您
% 少走点弯路。
%
-% 如果您希望在使用本模板前了解一些关于这个排版软件的基础知识,在此尝试列举一些有所帮助的资料:
+% 如果您希望在使用本模板前了解一些关于这个排版软件的基础知识,在此尝试列举一些有
+% 所帮助的资料:
% \begin{description}
-% \item[《\hologo{LaTeX} 入门》] 刘海洋著。
-% \item[\textit{lshort}] 著名的介绍文档,已被译为多种语言,可以参考英文版\scite{lshort}及其中文翻译版\scite{lshort-zh-cn}。
+% \item[\textit{lshort}] 著名的介绍文档,已被译为多种语言,可以参考英文版\cite{lshort}及其中文翻译版\cite{lshort-zh-cn}。
+% \item[《\hologo{LaTeX} 入门》] 刘海洋著\cite{刘海洋2013latex入门}。
% \end{description}
%
%
@@ -300,35 +354,74 @@ through XeTeX.
%
% 下文中将出现若干特殊格式,用来指示代码组件。譬如,无衬线字体的
% \pkg{pkg-example} 为宏包名,等宽字体的 \file{file-example.xxx} 为文件名,等宽
-% 字体的 \opt{opt-example}为选项名,等宽字体的 \env{env-example}为需要
+% 字体的 \opt{opt-example} 为选项名,等宽字体的 \env{env-example} 为需要
% |\begin{}|和|\end{}|的环境名,等。本手册提供的代码示例中,左侧边线呈现南大标
% 准洋红色 {\color{njumagenta}$\blacksquare$} 的属于终端命令,呈南大标准蓝色
% {\color{njublue}$\blacksquare$} 的属于 \hologo{LaTeX} 源代码。
%
-% 如果您在使用最新版模板时发现了任何问题,抑或有意向参与本模板的维护,请通过
-% GitHub issue 或者 QQ 群聊联系 NJU LUG。
+%
+% \subsection{许可说明}
+%
+% \file{njuthesis.dtx} 文件以及由其直接产生的所有文件被称为 \cls{njuthesis} 文档类,或者在本文中简称为本模板。
+%
+% \subparagraph{版权信息}
+% 本模板之版权隶属于 © 2021 - 2022 南京大学 Linux 用户组。
+%
+% \subparagraph{发布和修改}
+% 本模板的发布和(或)修改遵守 LaTeX Project Public License(版本 1.3c 或更高)的条款。该许可证的最新版本位于 \url{http://www.latex-project.org/lppl.txt},1.3c 及更新的版本随附于 2003/12/01 版本以后的所有 \hologo{LaTeX} 发行版。
+%
+% \subparagraph{联系作者}
+% 如果您在使用最新版模板时发现了任何问题,抑或有意向参与本模板的维护,请通过 \href{https://github.com/nju-lug/NJUThesis/issues}{GitHub Issue} 或者 QQ 群聊\footnote{群号是 991559926。}联系 NJU LUG。
%
%
% \section{安装}
% \label{sec:setup}
% 本节主要介绍本宏包的获取、安装以及编译方式。
-%
+%
% \subsection{获取模板}
%
-% \cls{njuthesis} 目前处于积极的维护中,其文件主要可通过以下途径获取:
+% \cls{njuthesis} 目前处于积极的维护中,主要可通过以下三种途径获取模板文件:
%
-% \subparagraph{CTAN} \href{https://ctan.org/}{CTAN}\footnote{The Comprehensive \hologo{TeX} Archive Network} 是所有 \hologo{TeX} 相关材料的中枢。\href{https://ctan.org/pkg/njuthesis}{本模板的 CTAN 页面}\footnote{\cls{njuthesis} 已经于2021年9月12日发布在 CTAN,用于绘制南大图标的 \href{https://ctan.org/pkg/njuvisual}{\pkg{njuvisual}} 也已于同年11月28日发布,两者将进入\hologo{TeX}\,Live 2022。}上提供基本的介绍信息,可以下载说明文档(本文档)和宏包源代码。当然,使用这一来源时并不需要接触后者,请参考 \ref{subsubsec:standard-installation} 的标准安装方法。
+% \subparagraph{CTAN} \href{https://ctan.org/}{CTAN}\footnote{The Comprehensive \hologo{TeX} Archive Network} 是所有 \hologo{TeX} 相关材料的中枢。\href{https://ctan.org/pkg/njuthesis}{本模板的 CTAN 页面}\footnote{\cls{njuthesis} 已经于2021年9月12日发布在 CTAN,用于绘制南大图标的 \href{https://ctan.org/pkg/njuvisual}{\pkg{njuvisual}} 也已于同年11月28日发布,两者已被 \hologo{TeX}\,Live 和 \hologo{MiKTeX} 收录,将进入 \hologo{TeX}\,Live 2022 发行版。}上提供基本的介绍信息,可以下载说明文档(本文档)和宏包源代码。当然,使用这一来源时并不需要接触后者,请参考 \ref{subsubsec:standard-installation} 的标准安装方法。
%
% \subparagraph{GitHub 仓库} 最新开发进度会提交在本项目的 \href{https://github.com/nju-lug/NJUThesis}{Github仓库}。仓库内仅包含源代码、空白模板及测试文件,不可直接用于写作。这些文件对应的使用方法请参考 \ref{subsubsec:on-the-fly-installation}。如果由于网络原因不便访问主仓库,也可以从\href{https://git.nju.edu.cn/nju-lug/nju-latex-templates/njuthesis}{NJU Git 同步镜像} 获取项目工程文件。
%
-% \subparagraph{GitHub Releases} 本模板不定期将已有的新功能和问题修复打包为新的正式发行版,赋以更改后的版本号,发布在 \href{https://github.com/nju-lug/NJUThesis/releases/latest}{Github Releases 页面}。可供下载的文件包括下列三种:
+% \subparagraph{GitHub Releases} 本模板不定期将已有的新功能和问题修复打包为新的正式发行版,赋以更改后的版本号,发布在 \href{https://github.com/nju-lug/NJUThesis/releases/latest}{Github Releases 页面}。如果由于网络原因不便访问主仓库,也可以从\href{https://mirror.nju.edu.cn/github-release/nju-lug/NJUThesis/LatestRelease/}{南京大学镜像站下载页面}获取。可供下载的文件包括下列三种:
% \begin{description}
% \item[\file{njuthesis-v*.pdf}] 模板说明文档(本文档)。
-% \item[\file{njuthesis-v*.zip}] 完整模板包,包括格式文件、范本以及编辑器配置文件。可以解压后用于本地编译或直接上传用于在线编译。
-% \item[\file{njuthesis-ctan-v*.zip}] 用于上传 CTAN 的源码包,普通用户请忽略。
+% \item[\file{njuthesis-user-v*.zip}] 交付给用户的完整模板包,包括格式文件和范本文档,可在解压后用于本地编译,也可直接上传至在线编译网站。
+% \item[\file{njuthesis-ctan-v*.zip}] 交付给 CTAN 的源代码包,普通用户请忽略。
% \end{description}
%
%
+% \subsubsection{文件构成}
+%
+% 本模板由数量众多的文件组成,\emph{所有可能遇到的}文件如表 \ref{tab:njuthesisfiles} 所示。
+% 其中标注为黄色的内容仅供开发使用,并不会在发行版中出现。
+%
+% \begin{table}[ht]
+% \caption{\cls{njuthesis}文件构成}
+% \label{tab:njuthesisfiles}
+% \centering
+% \begin{tabular}{lp{18em}}
+% \toprule
+% 名称 & 说明 \\
+% \midrule
+% \file{.vscode} & Visual Studio Code 配置文件 \\
+% \file{latexmkrc} & latexmk 配置文件 \\
+% \file{LICENSE} & 许可证 \\
+% \file{njuthesis.cls} & 模板文档类 \\
+% \color{njuyellow}\file{njuthesis.dtx} & 文档类源代码 \\
+% \color{njuyellow}\file{njuthesis.ins} & 文档类安装脚本 \\
+% \file{njuthesis.pdf} & 用户手册(本文档) \\
+% \file{njuthesis-sample.bib} & 示例参考文献列表 \\
+% \file{njuthesis-sample.tex} & 示例文档,不妨以此为基础撰写论文 \\
+% \file{README.md} & 自述文件 \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+%
% \subsection{本地安装}
%
% \subsubsection{标准安装}
@@ -339,20 +432,21 @@ through XeTeX.
% 化包管理器直接搜索并安装 \cls{njuthesis} (及其依赖的 \pkg{njuvisual})最新的
% 稳定版。同时,您也可以使用终端命令。例如,假设您使用的是 \hologo{TeX}\,Live,
% 键入下述 \pkg{tlmgr} 的命令(很可能需要管理员权限):
-% \begin{shellexample}[morekeywords={tlmgr,install}]
+% \begin{shellexample}[morekeywords={tlmgr},emph={install}]
% tlmgr install njuthesis njuvisual
% \end{shellexample}
% 即可完成安装,无需额外准备 \file{.cls} 文件。
-%
+%
% 另一方面,CTAN 依赖开发者手动上传更新,版本更新具有滞后性。如果使用时遇到了问
% 题,不妨使用下一小节的\emph{即时安装方法}优先载入较新的格式文件。
%
-% {\color{red}|[!]|} 如果您使用的是 Linux 系统而且具备相关经验,可以在下载仓库内全部文件后,于该目录下运行
-% \begin{shellexample}[morekeywords={l3build,install}]
+% {\color{red}|[!]|} 如果您具备相关经验\footnote{譬如熟悉命令行操作、使用的是 \hologo{TeX}\,Live 发行版等},可以在下载仓库内全部文件后,于该目录下运行
+% \begin{shellexample}[morekeywords={l3build},emph={install}]
% l3build install
% \end{shellexample}
% 来安装本模板的最新版。
%
+%
% \subsubsection{即时安装}
% \label{subsubsec:on-the-fly-installation}
%
@@ -370,36 +464,10 @@ through XeTeX.
% 都可以尽情删除。
%
% {\color{red}|[!]|} 请注意,如果仅仅是希望使用这个模板撰写论文,请无论如何都不
-% 要从手动编译 \file{source/} 文件夹下的源代码开始,这样做只会浪费生命中宝贵的数
+% 要从手动编译 \file{source} 文件夹下的源代码开始,这样做只会浪费生命中宝贵的数
% 分钟时间。如果遇到了问题,请前往 GitHub 仓库提出 issue。我们只推荐希望参与开发
% 的同学接触 \file{.dtx} 文件。
%
-% \subsection{文件构成}
-%
-% \cls{njuthesis}由数量众多的文件组成,\emph{所有可能遇到的}文件如表 \ref{tab:njuthesisfiles} 所示。
-% 其中标注为黄色的内容仅供开发使用,并不会在发行版中出现。
-%
-% \begin{table}[ht]
-% \caption{\cls{njuthesis}文件构成}
-% \label{tab:njuthesisfiles}
-% \centering
-% \begin{tabular}{lp{18em}}
-% \toprule
-% 名称 & 说明 \\
-% \midrule
-% \file{.vscode} & Visual Studio Code 配置文件 \\
-% \file{latexmkrc} & latexmk 配置文件 \\
-% \file{LICENSE} & 许可证 \\
-% \file{njuthesis.cls} & 模板文档类 \\
-% \color{njuyellow}\file{njuthesis.dtx} & 文档类源代码 \\
-% \color{njuyellow}\file{njuthesis.ins} & 文档类安装脚本 \\
-% \file{njuthesis.pdf} & 用户手册(本文档) \\
-% \file{njuthesis-sample.bib} & 示例参考文献列表 \\
-% \file{njuthesis-sample.tex} & 示例文档,不妨以此为基础撰写论文 \\
-% \file{README.md} & 自述文件 \\
-% \bottomrule
-% \end{tabular}
-% \end{table}
%
% \subsection{本地编译}
% \label{subsec:localcompile}
@@ -409,7 +477,7 @@ through XeTeX.
%
% \subsubsection{安装\hologo{TeX}发行版}
%
-% 首先需要下载并安装 \hologo{TeX} 软件发行版,其中包括引擎、宏包、字体、文档等。各操作系统适用情况请参考表~\ref {tab:texdistribution}。第一次编译前请务必通过 MiKTeX Console、TeX Live
+% 首先需要下载并安装 \hologo{TeX} 软件发行版,其中包括引擎、宏包、字体、文档等。各操作系统适用情况请参考表~\ref {tab:texdistribution}。第一次编译前请务必通过 MiKTeX Console、TeX Live
% Manager 等图形化程序或 \pkg{tlmgr} \emph{手动更新全部宏包}以避免潜在的兼容性问题。
% \begin{table}[ht]
% \centering
@@ -428,7 +496,7 @@ through XeTeX.
%
% 以下是一些值得注意的要点:
% \begin{itemize}
-% \item 可以参照这份\href{https://ctan.org/pkg/install-latex-guide-zh-cn}{手把手的教程}。
+% \item 可以参照这份\emph{手把手的教程}\cite{install-latex-guide-zh-cn}。
% \item 校园网环境中访问\href{https://mirror.nju.edu.cn/download/TeX%20%E6%8E%92%E7%89%88%E7%B3%BB%E7%BB%9F}{南京大学开源软件镜像站}可以获得最佳的下载体验。
% \item 使用最新的发行版,即版本号为2021或者21。
% \item 对于 Windows 和 macOS 用户,更推荐轻量化的 \hologo{MiKTeX} 套件。
@@ -436,6 +504,7 @@ through XeTeX.
% \item 对于一部分用到新版本特性的宏包,\cls{njuthesis} 内置了版本检查\footnote{譬如遇到 l3 过时问题请运行 |tlmgr update l3packages|。},请确认各宏包已升级至最新版。
% \end{itemize}
%
+%
% \subsubsection{配置编辑器}
% \changes{v0.11}{2021/11/23}{提供TeXstudio配置文件。}
%
@@ -451,25 +520,33 @@ through XeTeX.
% \item[TeXstudio] 本模板提供 \file{conf.txsprofile},可以使用快捷键 |alt+O+P| 导入配置文件。为了简化流程\footnote{当然,也可以设置为使用 \hologo{XeLaTeX} 编译,然后按照 \ref{subsubsec:compileseq} 内容使用快捷键 |F8| 手动编译参考文献。},该配置文件使用 \pkg{latexmk},第一次编译前请参考下一节内容安装 Perl。
% \end{description}
%
+%
% \subsubsection{编译顺序}
% \label{subsubsec:compileseq}
% \hologo{TeX} 本身是命令行程序,通过不同的命令调用所需的编译引擎,编辑器提供的
% 快捷按钮实际只是做了包装。为了便于排查运行错误,以下通过具体终端命令简要描述编
% 译过程。
%
-% 编译本模板概括为如下步骤:生成初始文档,编译参考文献,生成页码、编号、目录,需
-% 要编译4次。\emph{假设即将使用的文件名为 \file{njuthesis-sample.tex}},应采用以
-% 下命令顺序进行编译,以生成内容正确的 \file{njuthesis-sample.pdf}。输出的 PDF
+% 编译本模板的过程可以概括为下述步骤:
+% \begin{enumerate}
+% \item 生成初始文档
+% \item 生成参考文献信息
+% \item 生成页码、编号、目录
+% \item 将参考文献列表页插入目录
+% \end{enumerate}
+% 总计需要编译四次。\emph{假设即将使用的主文件名为 \file{njuthesis-sample.tex}},应采用以
+% 下命令顺序进行编译,以生成内容正确的 \file{njuthesis-sample.pdf}。输出的 PDF
% 文档位于同一目录下。该目录下同时会生成若干中间文件。
%
-% 编译命令具体为引擎名称加文件名,在编译 \file{.tex} 文件时,文件扩展名可以省略
+% 编译命令具体为引擎名称加主文件名,在编译 \file{.tex} 文件时,文件扩展名可以省略
% 不写。现阶段 \cls{njuthesis} 仅支持 \hologo{XeLaTeX} 与 \hologo{LuaLaTeX}。请
% 注意,几种命令的输出文件基本相同,可以任取一种;但如果您不清楚这两种编译引擎的
% 区别,或者对多步编译感到困惑,我们建议优先使用 |latexmk -xelatex|。
%
-% \subparagraph{使用 \hologo{XeLaTeX}}
-% 标准的 \hologo{XeLaTeX} 引擎编译方法。
-%
+%
+% \subparagraph{使用 \hologo{XeLaTeX}}
+% 标准的 \hologo{XeLaTeX} 引擎四步编译方法。
+%
% \begin{shellexample}[morekeywords={xelatex,biber}]
% xelatex njuthesis-sample
% biber njuthesis-sample
@@ -477,8 +554,9 @@ through XeTeX.
% xelatex njuthesis-sample
% \end{shellexample}
%
+%
% \subparagraph{使用 \hologo{LuaLaTeX}}
-% 标准的 \hologo{LuaLaTeX} 引擎编译方法。
+% 标准的 \hologo{LuaLaTeX} 引擎四步编译方法。
%
% \begin{shellexample}[morekeywords={lualatex,biber}]
% lualatex njuthesis-sample
@@ -487,8 +565,9 @@ through XeTeX.
% lualatex njuthesis-sample
% \end{shellexample}
%
+%
% \subparagraph{使用 \pkg{latexmk}}
-% \pkg{latexmk}\scite{latexmk} 是一个基于 Perl 脚本的自动编译工具,宗旨是通过单一命令简化上述的多次编译流程。在使用该命令前,请确保安装了以下软件:
+% \pkg{latexmk}\cite{latexmk} 是一个基于 Perl 脚本的自动编译工具,宗旨是通过单一命令简化上述的多次编译流程。在使用该命令前,请确保安装了以下软件:
% \begin{description}
% \item[Perl] 一般预装于 macOS 和 Linux,而 Windows 用户需要单独安装 \href{https://strawberryperl.com/}{Strawberry Perl}。
% \item[\pkg{latexmk}] \hologo{MiKTeX}已预装;如果终端找不到|latexmk|命令,\hologo{TeX}\,Live 用户需使用 \pkg{tlmgr} 单独安装。
@@ -498,39 +577,40 @@ through XeTeX.
% \begin{shellexample}[morekeywords={latexmk}]
% latexmk njuthesis-sample
% \end{shellexample}
-%
-% 如需指定编译器,可以加入 |-xelatex| 或 |-lualatex| 参数,例如指定 \hologo{XeLaTeX} 的命令为
-% \begin{shellexample}[morekeywords={latexmk,xelatex}]
+% 直接运行会调用 \hologo{pdfLaTeX} 引擎导致报错。如需指定编译引擎,可以加入 |-xelatex| 或 |-lualatex| 参数,例如指定 \hologo{XeLaTeX} 的命令为
+% \begin{shellexample}[morekeywords={latexmk},emph={-xelatex}]
% latexmk -xelatex njuthesis-sample
% \end{shellexample}
%
-% 此外可以选择使用以下命令清理编译生成的临时文件。
-% \begin{shellexample}[morekeywords={latexmk}]
+% 此外,可以选择使用以下命令清理编译生成的临时文件。
+% \begin{shellexample}[morekeywords={latexmk},emph={-c}]
% latexmk -c
% \end{shellexample}
%
+%
% \subsection{在线编译}
% \label{subsec:onlinecompile}
%
-% 相信您在接触了本地编译以后,很快就会意识到一些十分显然的事实,譬如\hologo{TeX}编译器安装过程较为漫长\footnote{因此对于 Windows 推荐 \hologo{MiKTeX}。},占用空间过大,而且在一部分处理器性能不佳的电脑上需要较长编译时间\footnote{同一个模板在 Linux 编译可以相对 Windows 节省一半耗时。}。拒绝接受这些麻烦的同学不妨尝试本节介绍的在线编译方法。
+% 相信您在接触了本地编译以后,很快就会意识到一些十分显然的事实,譬如\hologo{TeX}编译器安装过程较为漫长\footnote{因此对于 Windows 推荐 \hologo{MiKTeX}。},占用空间过大\footnote{事实上,可以通过 |scheme-infraonly| 模式安装 \hologo{TeX}\,Live,随后利用 \pkg{tlmgr} 安装依赖宏包,这份宏包列表可以在 Git 仓库的 \file{.github/workflows/build.yml} 找到。},而且在一部分处理器性能不佳的电脑上需要较长编译时间\footnote{出于文件 IO 速度的差异,同一个模板在 Linux 编译可以相对 Windows 节省约一半耗时。}。拒绝接受这些麻烦的同学不妨尝试本节介绍的在线编译方法。
%
% \subsubsection{南大\hologo{TeX}平台简介}
-% \changes{v0.2}{2021/09/07}{添加对南大\hologo{TeX}的支持。}
+% \changes{v0.2}{2021/09/07}{添加对南大 \hologo{TeX} 的支持。}
%
-% \href{https://tex.nju.edu.cn}{南大\hologo{TeX}}基于开源的 ShareLaTeX 平台\footnote{理论上在\href{https://doc.nju.edu.cn/books/latex}{这个网站}能找到一段平台简介,实际上大家都有意无意地鸽了,下次一定补上。},于2021年3月4日正式上线,是 \href{https://sci.nju.edu.cn/}{eScience 中心}为南大在校师生提供的 \hologo{LaTeX} 在线编译平台,首次使用需凭学校邮箱自助注册账号。
+% \href{https://tex.nju.edu.cn}{南大 \hologo{TeX}} 基于开源的 ShareLaTeX 平台构建\footnote{理论上在\href{https://doc.nju.edu.cn/books/latex}{这个网站}能找到一段平台简介,实际上大家都有意无意地鸽了,下次一定补上。},于2021年3月4日正式上线,是 \href{https://sci.nju.edu.cn/}{eScience 中心}为南大在校师生提供的 \hologo{LaTeX} 在线编辑器,首次使用需凭学校邮箱自助注册账号。
%
%
% \subsubsection{操作步骤}
%
+% 本说明手册开头的 \ref{subsec:first-things-first} 即呈现了网站内嵌的 \cls{njuthesis} 模板的使用方法。由于南大 \hologo{TeX} 网站已预装 \cls{njuthesis},可以直接编写正文,无需 \file{.cls} 等格式文件。如果有其他要求,也可以按如下步骤手动上传包含模板的压缩包。
+%
% \begin{enumerate}
-% \item 访问\href{https://tex.nju.edu.cn}{南大\hologo{TeX}},点击界面右上方Register,使用\emph{南京大学邮箱}注册账号并登录
-% \item 在项目页面左上角的Menu中,将编译器改为\hologo{XeLaTeX}或者\hologo{LuaLaTeX}
-% \item 仿照 \file{njuthesis-sample.tex} 编写论文
-% \item 点击Compile按钮进行编译和预览
+% \item 访问\href{https://tex.nju.edu.cn}{南大 \hologo{TeX} 网站},点击界面右上方“注册”按钮,使用\emph{南京大学邮箱}注册账号并登录
+% \item 新建空白项目,或者上传 \ref{subsubsec:on-the-fly-installation} 得到的压缩文件。
+% \item 在项目页面左上角的“菜单”中,确认编译器为 |XeLaTeX| 或者 |LuaLaTeX|
+% \item 仿照 \file{njuthesis-sample.tex} 编写论文
+% \item 点击“重新编译”按钮进行编译和预览
% \end{enumerate}
%
-% 注意,由于南大 \hologo{TeX} 已预装 \cls{njuthesis},可以直接编写正文,无需 \file{.cls} 等格式文件。如果需要使用新版模板,也可以点击New Project -> Upload Project上传 \ref{subsubsec:on-the-fly-installation} 得到的压缩文件。
-%
%
% \subsubsection{其他平台}
%
@@ -539,7 +619,21 @@ through XeTeX.
% \pkg{njuthesis} 现已支持 \href{https://www.overleaf.com/}{Overleaf} 平台。
%
% \subparagraph{TeXPage}
-% \href{https://www.texpage.com/}{TeXPage} 是国人研发的\hologo{LaTeX}在线编辑器,当前版本已具备较为完善的编辑编译功能,而且免费版相对 Overleaf 增加了公式识别、编辑历史等实用工具,也可以作为一个备选项。
+% \href{https://www.texpage.com/}{TeXPage} 是国人研发的 \hologo{LaTeX} 在线编辑器,当前版本已具备较为完善的编辑编译功能,而且免费版相对 Overleaf 增加了公式识别、编辑历史等实用工具,也可以作为一个备选项。
+%
+%
+% \subsection{版本升级}
+%
+% 考虑到本模板仍在开发中,将不断发布新版本,您可能需要不定期进行更新以得到对于已知问题的修复补丁。考虑到安装和编译方式的差异,不妨直接将论文内容迁移至新版的 \file{njuthesis-sample.tex}\footnote{请赞美 \hologo{TeX} 系统“样式与内容分离”的原则!},然后按照当前工作文件夹内是否有 \file{.cls} 文件分别进行更新操作。
+%
+% \subparagraph{有}
+% 迁移至 \file{njuthesis-user-v*.zip} 提供的新内容。
+%
+% \subparagraph{没有}
+% 如果使用的是南大 \hologo{TeX},更新内置模板时会进行公告,一般为上传 CTAN 后一周。如果是本地安装,请直接使用包管理器进行更新:
+% \begin{shellexample}[morekeywords={tlmgr},emph={update}]
+% tlmgr update all
+% \end{shellexample}
%
%
% \section{使用方法}
@@ -548,7 +642,7 @@ through XeTeX.
%
% 典型的 \cls{njuthesis} 主文件结构应该如下所示:
%
-% \begin{latexexample}[moretexcs={\njusetup,\graphicspath,\addbibresource,\maketitle,\tableofcontents,\listoffigures,\listoftables,\mainmatter,\chapter,\printbibliography,\appendix},emph={[1]document}]
+% \begin{latexexample}[moretexcs={\njusetup,\graphicspath,\tableofcontents,\maketitle,\mainmatter,\chapter,\printbibliography},emph={[1]document}]
% \documentclass{njuthesis}
% \njusetup{}
% \begin{document}
@@ -556,66 +650,113 @@ through XeTeX.
% \tableofcontents
% \mainmatter
% \chapter{欢迎}
-% 使用 \hologo{LaTeX}
+% 使用 \LaTeX{}!
% \printbibliography
% \end{document}
% \end{latexexample}
%
% 如果您尝试编译上面的代码,会发现自己得到了一个5页的 PDF 文档,是一份空白的本科生论文。
% 当然,这个文档实际上没有任何内容,接下来将会介绍具体填写内容的方法。
-%
+%
%
% \subsection{模板选项}
%
% 模板选项位于 \tn{documentclass} 后的方括号内,用于指定模板的行为。
% 下文中尖括号内列出了若干个允许的选项,其中加粗的为默认选项。
-%
+%
% \subsubsection{学位信息}
% \begin{function}[added=2021-09-07]{degree}
% \begin{syntax}
% degree = <(ug)|mg|mf|phd>
% \end{syntax}
-% 选择学位,分别为学士、学术型硕士、专业硕士、博士。
+% 选择学位,分别为学士、学术型硕士、专业硕士、博士,默认为学士(即本科生)。
% \end{function}
%
+% \begin{function}[added=2021-09-07]{type}
+% \begin{syntax}
+% type = <(thesis)|design>
+% \end{syntax}
+% 用于选择文档类型并将相关字段输出在封面和摘要页,可选值分别为毕业论文和毕业设计,默认为毕业论文。
+% \end{function}
+%
+%
+% \subsubsection{特殊页面}
+%
% \begin{function}[added=2021-09-07]{nlcover}
% \begin{syntax}
-% nlcover = <\TTF>
+% nlcover = <\TFF>
% \end{syntax}
-% 通过此项可选择是否用国家图书馆封面替换普通封面。
+% 是否使用国家图书馆封面,默认关闭。
+% \end{function}
+%
+% 通过此项可用国家图书馆封面替换普通封面。
% 由于本科生院文件中并未提及相关规定,故本选项仅对于研究生有效。
-% \end{function}
%
-% \begin{function}[added=2021-09-07]{type}
+% \begin{function}[updated=2022-01-06]{decl-page}
% \begin{syntax}
-% type = <(thesis)|design>
+% decl-page = <\TFF>
% \end{syntax}
-% 用于选择文档类型并将相关字段输出在封面和摘要页,可选值分别为毕业论文和毕业设计。
+% 是否需要诚信承诺书或原创性声明页面,默认关闭。
% \end{function}
%
+% 通过此项可在封面后添加本科生的诚信承诺书或研究生的原创性声明。
+%
+%
+% \subsubsection{单双面模式}
+%
+% \begin{function}[added=2022-01-14]{oneside,twoside}
+% \begin{syntax}
+% <oneside|(twoside)>
+% \end{syntax}
+% 开启单面或双面模式,默认为双面模式。
+% \end{function}
+%
+% 本选项继承自 \hologo{LaTeX2e} \cls{book} 标准文档类。单双面选项为全局选项,开启后会改变页码编号,以及部分宏包的行为。在单面模式下,页面是连续的,不会产生空白页;在双面模式下,封面、摘要、参考文献列表等特殊页面以及新的章节都会从奇数页开始,更适合印刷输出。
+%
+%
+% \subsubsection{草稿模式}
+%
+% \begin{function}[added=2021-12-15]{draft}
+% \begin{syntax}
+% draft = <\TFF>
+% \end{syntax}
+% 选择是否开启草稿模式,默认关闭。
+% \end{function}
+%
+% 本选项继承自 \hologo{LaTeX2e} \cls{book} 标准文档类。草稿模式为全局选项,启用这一选项将产生以下整体影响:
+% \begin{itemize}
+% \item 禁用封面的绘制(包括承诺和声明)
+% \item 显示页面文字范围边框以及页眉页脚线
+% \item 在超出宽度的内容右侧添加黑色方块标记
+% \item 不再渲染图片,使用含有图片路径的空白盒子占位
+% \item 不再渲染超链接及生成 PDF 书签
+% \end{itemize}
+% 草稿模式有助于提升编译速度以及检查格式问题,建议在定稿前始终开启。
+%
+% 启用这一选项也会改变特定宏包的行为,譬如在草稿模式下 \pkg{listings} 宏包的代码环境不会显示内容,具体效果需要参照各个宏包的说明文档。如需抵消草稿模式的影响,请使用 \opt{final} 选项载入相关红包。
+%
%
% \subsubsection{指定字体}
%
% 学校论文格式要求使用的字体一般已经预装在各个操作系统,本模板针对不同平台进行了自动检测适配,可以开箱即用。
%
% 如果希望更改本模板使用的字体,请填写以下两个选项以覆盖操作系统检测得到的设置。
-%
-% \begin{function}[added=2021-09-07,updated=2021-12-12]{cjk-font,latin-font}
+%
+% \begin{function}[added=2021-09-07,updated=2021-12-18]{cjk-font,latin-font}
% \begin{syntax}
-% cjk-font = <(win)|mac|fandol|founder|noto|none>
-% latin-font = <(win)|mac|gyre|none>
+% cjk-font = <win|mac|fandol|founder|noto|source|none>
+% latin-font = <win|mac|gyre|none>
% \end{syntax}
% 手动指定字体。
% \end{function}
%
-%
% 根据学校论文格式的要求,本模板使用的中文字体主要有{\songti 宋体}、{\heiti 黑体}、{\kaishu 楷体}、{\fangsong 仿宋}四种;
% 西文字体主要有衬线体(\textup{serif})、无衬线体(\textsf{sans-serif})和等宽字体(\texttt{monospace})三种。
% 在生成论文时,需要将每一种字体(宋体、楷体)与一种字库(操作系统中的 ttf 文件)相对应。
% 由于不同操作系统自带的字库不同,在不同的操作系统上使用同一套配置会导致缺字、编译出错等后果。
% 因此,本模板对于中文字体和西文字体都提供了多种字体配置。
%
-% 本模板提供的中文字体配置如表 \ref{tab:chinesefontset} 所示。
+% 本模板提供的中文字体配置如表 \ref{tab:cjk-fontset} 所示。
% 在不指定字体配置的情况下,本模板默认使用与操作系统相对应的字体配置
% (见表中前三行,Windows 和 macOS 以外的系统采用 Fandol 配置)。
% 此外,我们也单独提供了方正和思源两套中文字体配置。
@@ -623,39 +764,43 @@ through XeTeX.
% \begin{table}[htbp]
% \centering
% \begin{talltblr}[
-% caption = {中文字体配置列表},
-% label = {tab:chinesefontset},
-% note{a} = {使用
-% \href{http://www.foundertype.com/index.php/FontInfo/index/id/164}{方正小标宋}
-% 作为方正书宋的粗体,使用
-% \href{http://www.foundertype.com/index.php/FontInfo/index/id/131}{方正黑体}
-% 作为方正细黑一的粗体},
-% note{b} = {思源字体并不包含楷书和仿宋,而Adobe楷体和仿宋难以直接下载,
-% 因此使用方正字体代替;考虑到获取字体的难易程度,采用
-% \href{https://www.google.com/get/noto}{noto} 字体表示思源字体},
-% ] { cell{2}{2,4} = {njuyellow}, cell{4}{4} = {njuyellow}, colspec = {ccccc} }
+% caption = {中文字体配置列表},
+% label = {tab:cjk-fontset},
+% note{a} = {请下载简繁扩展(即 GBK 编码)版本},
+% note{b} = {使用
+% \href{http://www.foundertype.com/index.php/FontInfo/index/id/164}{方正小标宋}
+% 作为方正书宋的粗体},
+% note{c} = {使用
+% \href{http://www.foundertype.com/index.php/FontInfo/index/id/131}{方正黑体}
+% 作为方正细黑一的粗体},
+% note{d} = {在部分操作系统中可能已经预装 Google Noto 字体。考虑到获取字体的难易程度,单独安装时请采用
+% \href{https://mirrors.nju.edu.cn/download/Adobe%20Source%20Han}{Adobe Source Han}
+% 字体表示思源字体,请下载 Simplified Chinese(即后缀名为 SC)的版本},
+% note{e} = {思源字体并不包含楷书和仿宋,而 Adobe 楷体和仿宋难以直接下载,
+% 因此使用方正字体代替},
+% ] { cell{2}{2,4} = {white!70!njuyellow}, cell{4}{4} = {white!70!njuyellow}, colspec = {ccccc} }
% \toprule
-% 配置名称 & 宋体 & 黑体 & 楷书 & 仿宋 \\
+% \bf 配置名称 & \bf 宋体 & \bf 黑体 & \bf 楷书 & \bf 仿宋 \\
% \midrule
-% Windows & 中易宋体 & 中易黑体 & 中易楷体 & 中易仿宋 \\
-% macOS & 华文宋体 & 华文黑体 & 华文楷体 & 华文仿宋 \\
-% \href{https://www.ctan.org/pkg/fandol} {Fandol}
-% & Fandol宋体 & Fandol黑体 & Fandol楷体 & Fandol仿宋 \\
-% \href{https://www.foundertype.com} {方正}\TblrNote{a}
-% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/151}{方正书宋}
-% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/161}{方正细黑一}
-% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/137}{方正楷体}
-% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/128}{方正仿宋} \\
-% \href{https://github.com/adobe-fonts} {思源}\TblrNote{b}
-% & \href{https://fonts.google.com/noto/specimen/Noto+Serif+SC}{思源宋体}
-% & \href{https://fonts.google.com/noto/specimen/Noto+Sans+SC}{思源黑体}
-% & 方正楷体 & 方正仿宋 \\
+% Windows & 中易宋体 & 中易黑体 & 中易楷体 & 中易仿宋 \\
+% macOS & 华文宋体 & 华文黑体 & 华文楷体 & 华文仿宋 \\
+% \href{https://www.ctan.org/pkg/fandol} {Fandol}
+% & Fandol宋体 & Fandol黑体 & Fandol楷体 & Fandol仿宋 \\
+% \href{https://www.foundertype.com}{方正}\TblrNote{a}
+% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/151}{方正书宋}\TblrNote{b}
+% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/161}{方正细黑一}\TblrNote{c}
+% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/137}{方正楷体}
+% & \href{http://www.foundertype.com/index.php/FontInfo/index/id/128}{方正仿宋} \\
+% \href{https://github.com/adobe-fonts}{思源}\TblrNote{d}
+% & \href{https://mirrors.nju.edu.cn/adobe-fonts/source-han-serif/OTF/SimplifiedChinese/}{思源宋体}
+% & \href{https://mirrors.nju.edu.cn/adobe-fonts/source-han-sans/OTF/SimplifiedChinese/}{思源黑体}
+% & 方正楷体\TblrNote{e} & 方正仿宋 \\
% \bottomrule
% \end{talltblr}
% \end{table}
%
% 由于各操作系统对自带字体的支持程度不同,本模板对不同字体加粗的方式有所差别,
-% 表 \ref{tab:chinesefontset} 中,黄色底色的字体采用算法加粗。
+% 表 \ref{tab:cjk-fontset} 中,黄色底色的字体采用算法加粗。
% 除此以外,各种字体在设计上也存在差异,因此本模板在不同操作系统下编译的结果可能存在细微不同,使用时请注意。
% 若想要获得与 Word 版本模板最为贴近的体验,
% 可以通过手动安装 Windows 自带的中易宋体、中易黑体、中易楷体和中易仿宋,并设置使用 Windows 字体来实现。
@@ -669,14 +814,14 @@ through XeTeX.
% \caption{西文字体清单}
% \label{tab:latinfontset}
% \begin{tabular}{cccc}
-% \toprule
-% 配置名称 & 衬线体 & 无衬线体 & 等宽字体 \\
-% \midrule
-% Windows & Times~New~Roman & Arial & Courier~New \\
-% macOS & Times~New~Roman & Arial & Menlo \\
-% \href{http://www.gust.org.pl/projects/e-foundry/tex-gyre}{gyre}
-% & \Hologo{TeX}~Gyre~Termes & \Hologo{TeX}~Gyre~Heros & \Hologo{TeX}~Gyre~Cursor \\
-% \bottomrule
+% \toprule
+% \bf 配置名称 & \bf 衬线体 & \bf 无衬线体 & \bf 等宽字体 \\
+% \midrule
+% Windows & Times~New~Roman & Arial & Courier~New \\
+% macOS & Times~New~Roman & Arial & Menlo \\
+% \href{http://www.gust.org.pl/projects/e-foundry/tex-gyre}{gyre}
+% & \Hologo{TeX}~Gyre~Termes & \Hologo{TeX}~Gyre~Heros & \Hologo{TeX}~Gyre~Cursor \\
+% \bottomrule
% \end{tabular}
% \end{table}
%
@@ -694,18 +839,18 @@ through XeTeX.
% \begin{function}[added=2021-09-10]{\njusetup}
% \begin{syntax}
% \tn{njusetup} \Arg{键值列表}
-% \end{syntax}
+% \end{syntax}
% 是 \cls{njuthesis} 文档类的通用设置命令,用来设置各项功能。\tn{njusetup} 的参数是一个使用英文半角逗号分隔的键值列表,通常形如 \meta{key}|=|\meta{value}。
% \end{function}
%
% 目前,\tn{njusetup} 仅包含用于设置个人信息的 |info| 类。以下为全部的个人信息参数,其中带有星号的为对应的英文字段。请注意,部分参数已被弃置,列于后方。
%
-% \begin{function}[updated=2021-12-12]{info/title,info/title*}
+% \begin{function}[updated=2022-01-14]{info/title,info/title*}
% \begin{syntax}
% title = \Arg{标题}
% title* = \Arg{英文标题}
% \end{syntax}
-% 题目。由于封面上提供给中文题目的横线长度有限(单行最长为15个汉字),默认会自动对标题进行换行。如果需要手动制定换行位点,请使用英文半角感叹号 |!|,最多两处。
+% 题目。由于封面上提供给中文题目的横线长度有限\footnote{单行最长为15个汉字,建议总长度不超过45字},本模板默认会自动对标题进行换行。如果需要手动制定换行位点,请使用换行控制符( |\\| ),最多两处。
% \end{function}
%
% \begin{function}[updated=2021-10-01]{info/keywords,info/keywords*}
@@ -713,7 +858,7 @@ through XeTeX.
% keywords = \Arg{关键词}
% keywords* = \Arg{英文关键词}
% \end{syntax}
-% 关键词列表。关键词之间需要使用英文半角逗号隔开,含有空格的关键字需要使用花括号包裹以避免歧义。可以参照示例模板中的填写方式。
+% 关键词列表。关键词之间需要使用英文半角逗号隔开,含有空格的关键字需要使用花括号包裹以避免歧义。可以参照下方的填写示例。
% \end{function}
%
% \begin{function}[updated=2021-10-01]{info/grade}
@@ -737,7 +882,7 @@ through XeTeX.
% \end{syntax}
% 姓名。
% \end{function}
-%
+%
% \begin{function}[updated=2021-10-01]{info/department,info/department*}
% \begin{syntax}
% department = \Arg{院系}
@@ -745,7 +890,7 @@ through XeTeX.
% \end{syntax}
% 院系。
% \end{function}
-%
+%
% \begin{function}[updated=2021-10-01]{info/major,info/major*}
% \begin{syntax}
% major = \Arg{专业}
@@ -753,50 +898,51 @@ through XeTeX.
% \end{syntax}
% 专业。
% \end{function}
-%
+%
% \begin{function}[updated=2021-10-01]{info/field,info/field*}
% \begin{syntax}
% field = \Arg{方向}
% field* = \Arg{方向}
% \end{syntax}
-% 研究领域。只有研究生有研究领域的说法。
+% 研究领域。只有研究生存在研究领域的说法,本科生无需填写。
% \end{function}
%
-% \begin{function}[updated=2021-12-12]{info/supervisor,info/supervisor*,info/supervisor-title,info/supervisor-title*}
+% \begin{function}[updated=2022-01-12]{info/supervisor,info/supervisor*}
% \begin{syntax}
-% supervisor = \Arg{导师}
-% supervisor* = \Arg{导师}
-% supervisor-title = \Arg{导师职称}
-% supervisor-title* = \Arg{导师职称}
+% supervisor = \Arg{导师姓名,职称}
+% supervisor* = \Arg{导师英文全称}
% \end{syntax}
-% 导师。
+% 导师全称。请使用逗号( |,| )分隔导师的中文姓名与职称,英文名则不需添加逗号。
% \end{function}
%
-% \begin{function}[updated=2021-12-12]{info/supervisor-ii,info/supervisor-ii*,info/supervisor-ii-title,info/supervisor-ii-title*}
+% \begin{function}[updated=2021-01-12]{info/supervisor-ii,info/supervisor-ii*}
% \begin{syntax}
-% supervisor-ii = \Arg{第二导师}
-% supervisor-ii* = \Arg{第二导师}
-% supervisor-ii-title = \Arg{第二导师职称}
-% supervisor-ii-title* = \Arg{第二导师职称}
+% supervisor-ii = \Arg{第二导师姓名,职称}
+% supervisor-ii* = \Arg{第二导师英文全称}
% \end{syntax}
-% 第二导师。
+% 第二导师全称。无第二导师时不填即可。
% \end{function}
%
-% \begin{function}[updated=2021-10-01]{info/submit-date,info/submit-date*}
+% \begin{function}[updated=2022-01-14]{info/submit-date}
% \begin{syntax}
-% submit-date = \Arg{提交日期}
-% submit-date* = \Arg{提交日期}
+% submit-date = \Arg{yyyy-mm-dd}
% \end{syntax}
-% 提交日期。
+% 提交日期。中英文日期现在可以由 ISO 日期格式\cite{gb-t-7408-2005}的字符串统一生成。如果留空,则自动使用编译当天日期。
% \end{function}
%
-% \begin{function}[updated=2021-10-01]{info/defend-date,info/chairman,info/reviewer}
+% \begin{function}[updated=2021-01-14]{info/defend-date}
+% \begin{syntax}
+% defend-date = \Arg{yyyy-mm-dd}
+% \end{syntax}
+% 答辩日期,只对研究生有效,要求同提交日期。
+% \end{function}
+%
+% \begin{function}[updated=2021-10-01]{info/chairman,info/reviewer}
% \begin{syntax}
-% defend-date = \Arg{答辩日期}
% chairman = \Arg{答辩主席}
% reviewer = \Arg{评委姓名职称}
% \end{syntax}
-% 答辩相关的内容,只对研究生有效,包括答辩日期,评审委员会主席及四位成员的姓名加职称。其中,四位评审成员是以列表的形式存储的,填写方法同关键词。如果是盲审,填入“盲审”二字即可。
+% 答辩委员会信息,分别为评审委员会主席及四位成员的姓名加职称,只对研究生有效。四位评审成员是以列表的形式存储的,填写方法同关键词。如果是盲审,填入“盲审”二字即可。
% \end{function}
%
% \begin{function}[updated=2021-10-01]{info/clc,info/secret-level,info/udc,info/supervisor-contact}
@@ -813,6 +959,10 @@ through XeTeX.
% 这些选项已在 v0.13 弃置,请不要使用。
% \end{function}
%
+% \begin{function}{info/supervisor-title,info/supervisor-title*,info/supervisor-ii-title,info/supervisor-ii-title*,info/submit-date*}
+% 这些选项已在 v0.14 弃置,请不要使用。
+% \end{function}
+%
%
% \subsubsection{输入示范}
%
@@ -821,25 +971,23 @@ through XeTeX.
% \begin{latexexample}[moretexcs={\njusetup},emph={[2]info}]
% \njusetup {
% info = {
-% title = {第一行标题!第二行标题},
-% title* = {My title in English},
+% title = {第一行标题\\第二行标题},
+% title* = {My title in English},
% keywords = {我,就是,充数的,关键词},
% keywords* = {Dummy,Keywords,Here,{it is}},
% grade = {2018},
% student-id = {189114514},
% author = {周煜华},
% author* = {Zhou Yuhua},
-% department = {拉太赫科学与技术学院},
-% department* = {School of \hologo{LaTeX}},
-% major = {拉太赫语言学},
-% major* = {\hologo{LaTeX} Linguistics},
-% supervisor = {李成殿},
-% supervisor*= {Li Chengdian},
-% supervisor-title = {教授},
-% supervisor-title* = {Professor},
-% submit-date = {2021年8月10日},
-% }
-% }
+% department = {化学化工学院},
+% department* = {School of Chemistry and Chemical Engineering},
+% major = {化学},
+% major* = {Chemistry},
+% supervisor = {李成殿,教授},
+% supervisor*= {Professor Li Chengdian},
+% submit-date = {2021-09-12}
+% }
+% }
% \end{latexexample}
%
% 研究生可以参考如下列表输入个人信息
@@ -847,44 +995,41 @@ through XeTeX.
% \begin{latexexample}[moretexcs={\njusetup},emph={[2]info}]
% \njusetup {
% info = {
-% title = {第一行标题!第二行标题!第三行标题},
-% title* = {My title in English},
+% title = {第一行标题\\第二行标题\\第三行标题},
+% title* = {My title in English},
% keywords = {我,就是,充数的,关键词},
% keywords* = {Dummy,Keywords,Here,{it is}},
% grade = {2018},
-% student-id = {dz18114514},
+% student-id = {DZ18114514},
% author = {周煜华},
% author* = {Zhou Yuhua},
-% department = {拉太赫科学与技术学院},
-% department* = {School of \hologo{LaTeX}},
-% major = {拉太赫语言学},
-% major* = {\hologo{LaTeX} Linguistics},
-% field = {拉太赫语言在现当代的使用},
-% field* = {Contemporary Usage of the \hologo{LaTeX}~Language},
-% supervisor = {李成殿},
-% supervisor*= {Li Chengdian},
-% supervisor-title = {教授},
-% supervisor-title* = {Professor},
-% submit-date = {2021年8月10日},
-% submit-date* = {Aug 10, 2021},
-% defend-date = {2021年9月19日},
+% department = {化学化工学院},
+% department* = {School of Chemistry and Chemical Engineering},
+% major = {化学},
+% major* = {Chemistry},
+% field = {物理化学},
+% field* = {Physical Chemistry},
+% supervisor = {李成殿,教授},
+% supervisor*= {Professor Li Chengdian},
+% submit-date = {2021-09-12},
+% defend-date = {2022-01-15},
% chairman = {张晓山~教授},
% reviewer = {王瑞希~教授,郭德纲~副教授,华芈库~教授,戴菲菲~教授},
% clc = {0175.2},
% secret-level = {限制},
% udc = {004.72},
-% supervisor-contact = {拉太赫科学与技术学院 枝江市结丘路 19 号 114514},
-% }
-% }
+% supervisor-contact = {拉太赫科学与技术学院 枝江市结丘路 19 号 114514}
+% }
+% }
% \end{latexexample}
%
%
% \subsection{编写正文}
%
-% 与导言区相对的是正文,位于\env{document}环境内。
-%
+% 与导言区相对的是正文,位于 \env{document} 环境内。
+%
% \begin{function}{\mainmatter}
-% \cs{mainmatter} 标志着正文的开始,重新开始字号计数并设置页眉。
+% \cs{mainmatter} 标志着正文的开始,使用阿拉伯数字重新进行页码编号,并设置页眉格式。
% \end{function}
%
% 在页面布局方面,页面编号居中位于页脚,本科生无页眉,研究生页眉包括章名(奇数页)和节名(偶数页)。
@@ -898,7 +1043,7 @@ through XeTeX.
% \end{syntax}
% \pkg{ctex} 宏集提供了其中用于处理长标题的可选参数。对于过长的标题,目录中会使用其短描述。
% \end{function}
-%
+%
%
% \subsubsection{文字}
%
@@ -906,30 +1051,34 @@ through XeTeX.
% \begin{syntax}
% \tn{njuline}\Arg{文字}
% \end{syntax}
-%
-% 为了避免原生\tn{uline}命令在中文环境下不能正常换行的问题,本模板使用\tn{njuline}作为替代方案,分别对\hologo{XeLaTeX} 的\pkg{xeCJKfntef}包和\hologo{LuaLaTeX}的\pkg{lua-ul}包中的下划线命令进行了包装。
+% 为了避免原生\tn{uline}命令在中文环境下不能正常换行的问题,本模板使用\tn{njuline}作为替代方案,分别对 \hologo{XeLaTeX} 的 \pkg{xeCJKfntef} 包和 \hologo{LuaLaTeX} 的 \pkg{lua-ul} 包中的下划线命令进行了包装。
% \end{function}
%
% \begin{function}{\footnote}
% \begin{syntax}
% \tn{footnote}\Arg{脚注}
% \end{syntax}
-% 添加脚注
+% 添加脚注。
% \end{function}
%
-%
-% \subsubsection{图片}
+%
+% \subsubsection{图片}
%
% \begin{function}{\graphicspath}
% \begin{syntax}
% \tn{graphicspath}\{\marg{路径1}\marg{路径2}\}
% \end{syntax}
-% 使用自己的图片时,需要在导言区通过本命令添加图片存放路径,允许的文件名包括\file{*.jpg}, \file{*.png}, \file{*.pdf}, \file{*.eps}。
+% 添加图像路径。
% \end{function}
%
+% \pkg{graphicx} 宏包会对一些常见路径进行搜索。使用自己的图片时,如果提示不能找到文件,需要在导言区通过本命令添加图片存放路径。
+%
+% 在使用特定类型的图片文件时,可以省略其扩展名,包括 \file{*.jpg}, \file{*.png}, \file{*.pdf}, \file{*.eps}。
+%
%
-% 下面这个例子展示了如何插入一张名称为\file{myfig.jpg},宽度占页面文字宽度一半的图片。注意标签命令\tn{label}必须放在图注命令\tn{caption}之后。
+% \paragraph{图片}
%
+% 下面这个例子展示了如何插入一张名称为 \file{myfig.jpg},宽度占页面文字宽度一半的图片。注意标签命令 \tn{label} 必须放在图注命令 \tn{caption} 之后。
% \begin{latexexample}[moretexcs={\includegraphics},emph={[1]figure}]
% \begin{figure}[h]
% \centering
@@ -939,8 +1088,12 @@ through XeTeX.
% \end{figure}
% \end{latexexample}
%
-% 对于较为瘦长,或者仅起到辅助作用的图像,可以使用\env{wrapfigure}实现文字环绕效果。注意这个环境后紧跟的一行不能为空。
+% \emph{以下图片相关功能的实现均需要手动载入相关宏包}。
+%
+%
+% \paragraph{文字环绕}
%
+% 对于较为瘦长,或者仅起到辅助作用的图像,可以使用 \pkg{wrapfig} 宏包提供的 \env{wrapfigure} 实现文字环绕效果。注意这个环境后紧跟的一行不能为空。
% \begin{latexexample}[moretexcs={\includegraphics},emph={[1]wrapfigure}]
% \begin{wrapfigure}{r}{0cm}
% \centering
@@ -950,34 +1103,38 @@ through XeTeX.
% \end{wrapfigure}
% <text>
% \end{latexexample}
-%
-% 使用 \pkg{caption} 内置的 \pkg{subcaption} 提供 \env{subfigure} 环境,实现多张图片并排的效果。较为老旧的 \pkg{subfigure} 并不在此受到支持。
%
+%
+% \paragraph{多张嵌套}
+%
+% 使用 \pkg{subcaption} 宏包提供的 \env{subfigure} 环境可以实现多张图片嵌套的效果。
% \begin{latexexample}[moretexcs={\includegraphics},emph={[1]figure,subfigure}]
% \begin{figure}
% \begin{subfigure}{.32\textwidth}
% \centering
-% \includegraphics[width=\textwidth]{fig1}
+% \includegraphics[width=\textwidth]{fig1}
% \caption{fig1}
% \end{subfigure}
% \begin{subfigure}{.32\textwidth}
% \centering
-% \includegraphics[width=\textwidth]{fig2}
+% \includegraphics[width=\textwidth]{fig2}
% \caption{fig2}
% \end{subfigure}
% \begin{subfigure}{.32\textwidth}
% \centering
-% \includegraphics[width=\textwidth]{fig3}
+% \includegraphics[width=\textwidth]{fig3}
% \caption{fig3}
% \end{subfigure}
% \caption{subfigures}
% \end{figure}
% \end{latexexample}
%
+% 请尽量避免使用较为老旧的 \pkg{subfig} 宏包,完全不要使用过时的 \pkg{subfigure} 宏包。两者的 CTAN 页面上均建议转移至更新的 \pkg{subcaption} 宏包。
+%
%
% \subsubsection{表格}
%
-% 下面这个例子展示了如何插入一张表格。通过 \pkg{booktabs} 提供的 \tn{toprule}、\tn{midrule} 和 \tn{bottomrule},我们可以很轻松地绘制出一张漂亮规范的三线表。
+% 下面这个例子展示了如何插入一张表格。通过 \pkg{booktabs} 宏包提供的 \tn{toprule}、\tn{midrule} 和 \tn{bottomrule} 命令,我们可以很轻松地绘制出一张漂亮规范的三线表。
% \begin{latexexample}[moretexcs={\toprule,\midrule,\bottomrule},emph={[1]table,tabular}]
% \begin{table}[htbp]
% \centering
@@ -993,43 +1150,37 @@ through XeTeX.
% \end{table}
% \end{latexexample}
%
+% \emph{以下表格功能的实现均需要手动载入相关宏包。}
+%
+%
+% \paragraph{合并单元格}
+%
% \begin{function}{\multirow,\multicolumn}
% \begin{syntax}
-% \tn{multirow}\Arg{nrows}\oarg{bigstructs}\Arg{width}[\oarg{fixup}\Arg{text}
+% \tn{multirow}\Arg{nrows}\oarg{bigstructs}\Arg{width}\oarg{fixup}\Arg{text}
% \tn{multicolumn}\Arg{nrows}\Arg{width}\Arg{text}
% \end{syntax}
-%
-% TODO:\pkg{multirow}\pkg{multicol}合并单元格
-% \url{http://www.ctex.org/documents/packages/table/multirow.htm}
-%
+% 合并单元格。
% \end{function}
%
+% TODO:\pkg{multirow} 宏包的使用方法,命令较为复杂。
+% \url{http://www.ctex.org/documents/packages/table/multirow.htm}
%
-% \subsubsection{代码}
%
-% 由 \pkg{listings} 提供代码排版。代码块 \env{lstlisting},注意这个环境中的缩进空格会如实输出。
-% 如需指定语言,可以使用 |language| 选项。如需自定义关键字,可以使用 |morekeywords| 选项
-% \begin{latexexample}[emph={[1]lstlisting},emph={[2]language}]
-% \begin{lstlisting}[language=python]
-% <code>
-% \end{lstlisting}
-% \end{latexexample}
+% \paragraph{更多样式}
%
-% 行间代码可以使用抄录环境 \tn{verb} ,
-% 格式如 |\verb!<code>!|。其中包裹代码的两个感叹号并不是绝对的,可以替换成任何两个相同的没有在这段代码中出现过的符号。
-% 同时,也可以使用简写的行内代码环境,使用两条竖线包裹代码即可。请注意,\pkg{listings} 提供的 \tn{lstinline} 会被全局的字号设置污染。如果需要在行内代码指定语言,请参考如下设置:
-% \begin{latexexample}[moretexcs={\lstinline,\tt},deletetexcs={\usepackage},emph={[2]language,basicstyle}]
-% \lstinline[language=[LaTeX]TeX, basicstyle=\tt]!\usepackage{njuvisual}!
-% \end{latexexample}
+% \pkg{tabularray} 宏包\cite{tabularray}运用 \hologo{LaTeX3} 语法重新实现了表格的绘制,提供了简明的用户接口与丰富的单元格样式,详见其使用手册。
%
%
% \subsubsection{数学}
%
-% 符号表可以参考\url{https://www.caam.rice.edu/~heinken/latex/symbols.pdf}。单位请参考\pkg{siunitx}。\pkg{siunitx}是一个更新频繁的包,可能会引发兼容性问题。
+% 符号表可以参考 \url{https://www.caam.rice.edu/~heinken/latex/symbols.pdf}。
%
-% 行内公式形如|$\mathrm{e}^{(a+2b)x}$|
+% 单位请参考相关国家标准\footnote{GB 3100-1993, GB/T 3101-1993, GB/T 3102-1993},使用 \pkg{siunitx} 宏包。\pkg{siunitx} 是一个更新频繁的包,可能会引发兼容性问题。
%
-% 带有编号的行间公式\env{equation}
+% 行内公式形如|$\mathrm{e}^{(a+2b)x}$|。
+%
+% 带有编号的行间公式 \env{equation}。
% \begin{latexexample}[emph={[1]equation}]
% \begin{equation}\label{eq:myeqlabel}
% \pi
@@ -1038,21 +1189,24 @@ through XeTeX.
%
% 如不需要编号,可以用 \env{equation*} 或者 |\[|\meta{公式}|\]|,请不要使用可能引发问题的 |$$|\meta{公式}|$$|\footnote{\url{https://tex.stackexchange.com/questions/503/why-is-preferable-to}}。
%
-% 本模板也提供了一系列的数学环境。
-% 全部预定义的数学环境如表~\ref{tab:mathenv} 所示。其中证明环境较为特殊,会在结尾添加证毕符号(\mdwhtsquare)。
-%
+%
+% \paragraph{定理环境}
+%
+% 本模板也提供了一系列的数学定理环境。
+% 全部预定义的数学定理环境如表~\ref{tab:mathenv} 所示。其中证明环境较为特殊,会在结尾添加证毕符号(\mdwhtsquare)。用户也可以选择使用 \tn{newtheorem} 定义新的定理环境。
+%
% \begin{table}[htbp]
% \centering
-% \caption{数学环境}
+% \caption{数学定理环境}
% \label{tab:mathenv}
% \begin{tabular}{cc|cc}
% \toprule
-% 标签 & 名称 & 标签 & 名称 \\
+% \bf 标签 & \bf 名称 & \bf 标签 & \bf 名称 \\
% \midrule
-% axiom & 公理 & lemma & 引理 \\
-% corollary & 推论 & proof & 证明 \\
-% definition & 定义 & theorem & 定理 \\
-% example & 例 & & \\
+% axiom & 公理 & lemma & 引理 \\
+% corollary & 推论 & proof & 证明 \\
+% definition & 定义 & theorem & 定理 \\
+% example & 例 & & \\
% \bottomrule
% \end{tabular}
% \end{table}
@@ -1069,10 +1223,64 @@ through XeTeX.
% 定义他人即地狱
% \end{definition}
% \end{latexexample}
-%
-%
+%
+%
+% \subsubsection{代码}
+% \changes{v0.13}{2021/12/13}{提供简化的行内代码环境。}
+% \changes{v0.13}{2021/12/16}{默认不加载 \pkg{listings} 宏包。}
+%
+% 如需展示代码,可以使用抄录环境 \tn{verb},格式如 |\verb!<code>!|。其中包裹代码的两个感叹号并不是绝对的,可以替换成任何两个相同的、没有在这段代码中出现过的符号。
+%
+% 抄录环境仅会用等宽字体如实呈现代码本身,并无任何附加功能。若需格式更为多样的代码环境,可以使用 \pkg{listings} 宏包。v0.14.0 版以后,本模板默认不会调用该宏包,使用代码环境前请在导言区自行导入。
+% \begin{latexexample}
+% \usepackage{listings}
+% \end{latexexample}
+%
+% \pkg{listings} 宏包\cite{listings}提供了 \env{lstlisting} 环境,可以生成代码块,提供语法高亮功能,会如实输出缩进空格。且值得注意的是这个环境中的代码不会在草稿模式下显示。
+% 如需指定语言,可以使用 |language| 选项。如需自定义关键字,可以使用 |morekeywords| 选项。这一宏包也提供了为某种样式单独一种环境的方法,详见其手册,此处仅展示一个最简化的例子:
+% \begin{latexexample}[emph={[1]lstlisting},emph={[2]language},morekeywords={print}]
+% \begin{lstlisting}[language=python]
+% print("Hello World")
+% \end{lstlisting}
+% \end{latexexample}
+%
+% 当然,默认提供的代码样式在本模板中并不和谐。可以参照以下代码在导言区设置代码环境通用样式。
+% \begin{latexexample}[moretexcs={\lstdefinestyle,\lstset},emph={[2]basewidth,lineskip,basicstyle,keywordstyle,commentstyle,numbers,captionpos,breaklines,xleftmargin,xrightmargin,style,flexiblecolumns}]
+% \lstdefinestyle { njulisting }
+% {
+% basewidth = 0.5 em, % 单个字体宽度
+% lineskip = 3 pt, % 在代码行间添加额外行距
+% basicstyle = \tiny\ttfamily, % 基本字体样式,小号等宽
+% keywordstyle = \bfseries, % 关键词样式,粗体
+% commentstyle = \itshape\color{gray}, % 注释样式,灰色斜体
+% numbers = left, % 行号位置,左侧
+% captionpos = t, % 题注位置,顶部
+% breaklines = true, % 是否允许自动折行
+% xleftmargin = 2 em, % 左侧边距
+% xrightmargin = 2 em % 右侧边距
+% }
+% \lstset{
+% style = njulisting, % 调用上述样式
+% flexiblecolumns % 允许调整字符宽度
+% }
+% \end{latexexample}
+%
+% \pkg{listings} 同时提供了用于展示行内代码的 \tn{lstinline} 命令,用法同 \tn{verb}。但这一命令会被全局的代码字号设置污染。请参考如下使用方法:
+% \begin{latexexample}[moretexcs={\lstinline,\tt},deletetexcs={\usepackage},emph={[2]language,basicstyle}]
+% \lstinline[language=[LaTeX]TeX, basicstyle=\tt]!\usepackage{njuvisual}!
+% \end{latexexample}
+%
+% 简便起见,不妨单独创建使用简写的行内代码环境,指定某个符号后用其包裹代码即可。这个符号不可以出现在正文及其他命令中,请谨慎设置。
+% \begin{latexexample}[moretexcs={\lstMakeShortInline},emph={[2]style,basicstyle,columns}]
+% \lstMakeShortInline[
+% style = njulisting,
+% basicstyle = \normalsize\tt,
+% columns = fixed]|
+% \end{latexexample}
+%
+%
% \subsubsection{引用}
-%
+%
% \begin{function}{\cref}
% \begin{syntax}
% \tn{cref}\Arg{标签}
@@ -1087,24 +1295,179 @@ through XeTeX.
% \end{syntax}
% 超链接。\tn{href} 会将特定字符显示为可点击的超链接,\tn{url} 会输出可点击的链接原文。
% \end{function}
-%
-%
+%
+%
+% \subsection{参考文献}
+%
+% 本模板默认载入 \pkg{biblatex} 宏包,使用 \hologo{biber} 作为后端\footnote{出于简化命令的考虑,现阶段并不计划支持 \hologo{BibTeX}。},通过 \pkg{biblatex-gb7714-2015}\cite{biblatex-gb7714-2015} 实现 GB/T 7714--2015\cite{gb-t-7714-2015} 规定的参考文献著录规则国家标准。
+%
+% 需要使用 |biber| 命令编译才会显示正确的条目序号,详情请参照 \ref{subsubsec:compileseq}。
+%
+%
+% \subsubsection{选项}
+%
+% \begin{function}[added=2021-12-19]{bib/style}
+% \begin{syntax}
+% style = <(numeric)|author-year>
+% \end{syntax}
+% 参考文献样式。分为顺序编码制 \opt{numeric} 和著者-出版年制 \opt{author-year},默认为顺序编码制。
+% \end{function}
+%
+% 参考文献样式是一个整体的设置,会对正文中引用的文献的标注方法和参考文献表的输出格式产生影响。根据国家规定\cite{gb-t-7714-2015},可以按照参考文献表的组织方式分为以下两种样式:
+% \begin{description}
+% \item[顺序编码制] 顺序编码制是按正文中引用的文献出现的先后顺序连续编码,将序号置于方括号中。参考文献表采用顺序编码制组织时,各篇文献应按正文部分标注的序号依次列出。
+% \item[著者-出版年制] 正文引用的文献采用著者-出版年制时,各篇文献的标注内容由著者姓氏与出版年构成,并置于"()"内。参考文献表采用著者-出版年制组织时,各篇文献首先按文种集中,然后按著者字顺和出版年排列。
+% \end{description}
+%
+% 对于本科生而言,学校规定文件表明参考文献表应当“用数字加方括号表示”\cite{nju2021},符合顺序编码制的格式,保持默认设置即可。
+%
+% \begin{function}[added=2021-12-19]{bib/resource}
+% \begin{syntax}
+% resource = \Arg{文件}
+% \end{syntax}
+% 参考文献数据源。类似于 \tn{addbibresource} 命令,但可以使用逗号分隔的列表形式。必须使用带扩展名(\file{.bib})的完整文件名。
+% \end{function}
+%
+% \begin{function}{\addbibresource}
+% \begin{syntax}
+% \tn{addbibresource}\Arg{文件}
+% \end{syntax}
+% 添加参考文献源文件。为了与 \pkg{biblatex} 进行兼容,也可使用本命令添加数据源。本命令不支持逗号分隔多个文件的形式,如果希望额外添加参考文献列表,需要在导言区中多次调用。
+% \end{function}
+%
+% 示例参考文献存储于 \file{njuthesis-sample.bib},直接向其中粘贴新的参考文献即可。
+%
+% 可以参考如下范例进行参考文献设置。
+% \begin{latexexample}[moretexcs={\njusetup},emph={[2]bib}]
+% \njusetup {
+% bib = {
+% style = author-year,
+% resource = {njuthesis-sample.bib}
+% }
+% }
+% \end{latexexample}
+%
+% \begin{function}{\printbibliography}
+% 生成参考文献表页面。
+% \end{function}
+%
+% 显然只有被引用过的条目才会被输出至参考文献表。
+%
+% 如果开启了草稿模式,您可能会注意到部分条目存在超宽的问题,这时就要果断假装没有看到。
+% 该问题的产生是由于 \hologo{LaTeX} 中只有固定的字母组合中间可以断行。使条目右侧平齐的方法有如下两种
+% \footnote{详见 \url{https://github.com/nju-lug/NJUThesis/issues/57}。很不幸,\pkg{microtype} 与 \pkg{babel} 没能在我们的模板中解决问题。}:
+% \begin{itemize}
+% \item 自行在 \file{.bib} 文件中设置断行点,例如可以将 graphene 一词修改为 graph|\-|ene。缺点是需要逐条手动排查,建议在定稿时进行修改。
+% \item 在 |\printbibliography| 前添加 |\sloppy| 命令拉伸词间距,缺点是可能降低美观度。
+% \end{itemize}
+%
+%
+% \subsubsection{正文引用}
+%
+% \begin{function}{\cite}
+% \begin{syntax}
+% \tn{cite}\marg{文献}
+% \tn{cite}\oarg{页码}\marg{文献}
+% \end{syntax}
+% 在正文中引用参考文献。
+% \end{function}
+%
+% 引用命令 \tn{cite} 含有多个变体,以便使用文献条目中不同的信息域。在两种参考文献样式下,这些命令的行为具体存在一些差异,详见表 \ref{tab:numeric-style} 和表 \ref{tab:author-year-style}。
+%
+% \begin{table}[ht]
+% \caption{顺序编码制下的引用样式}
+% \label{tab:numeric-style}
+% \centering
+% \begin{tblr}{cll}
+% \toprule
+% \bf 引用方式 & \bf 命令 & \bf 排版效果 \\
+% \midrule
+% 单篇文献 & \tn{cite} & 上标可设置页码 \\
+% 单篇文献 & \tn{parencite} & 非上标可设置页码 \\
+% 多篇文献 & \tn{cite} & 上标,逗号隔开或短横线连接 \\
+% 标注页码 & \tn{pagescite} & 上标加自动页码 \\
+% 标注作者 & \tn{textcite} & 作者为主语加非上标编号 \\
+% 标注作者 & \tn{authornumcite} & 作者为主语加上标编号 \\
+% 完整脚注 & \tn{footfullcite} & 脚注方式 \\
+% \bottomrule
+% \end{tblr}
+% \end{table}
+%
+% \begin{table}[ht]
+% \centering
+% \begin{talltblr}[
+% caption = {著者-出版年制下的引用样式},
+% label = {tab:author-year-style},
+% note{a} = {在此样式下 \tn{parencite} 效果等同于 \tn{cite}} ] {cll}
+% \toprule
+% \bf 引用方式 & \bf 命令 & \bf 排版效果 \\
+% \midrule
+% 单篇文献 & \tn{cite}\TblrNote{a} & 作者加年份用括号包围可设置页码 \\
+% 多篇文献 & \tn{cite} & 分号隔开 \\
+% 标注页码 & \tn{pagescite} & 作者加年份用括号包围自动页码 \\
+% 标注年份 & \tn{yearcite} & 用括号包围的年份 \\
+% 标注年份、页码 & \tn{yearpagescite} & 提供年份用括号包围自动页码 \\
+% 标注作者 & \tn{textcite} & 作者为主语加加括号包围年份 \\
+% 完整脚注 & \tn{footfullcite} & 脚注方式 \\
+% \bottomrule
+% \end{talltblr}
+% \end{table}
+%
+%
+% \subsubsection{文献管理}
+%
+% 参考文献数据源理应是通过文献管理软件导出的,而不是逐条手动填写的。
+%
+% \subparagraph{使用EndNote}
+%
+% 南京大学信息化建设管理服务中心已购买 \href{https://itsc.nju.edu.cn/EndNote/list.htm}{EndNote} 供全校师生免费使用,最新版为 EndNote 20。
+%
+%
+% \subparagraph{使用Zotero}
+%
+% \href{https://www.zotero.org/}{Zotero}是一款免费的文献管理软件,支持所有桌面平台。
+%
+% 在保持 Zotero 程序运行的情况下,点击浏览器工具栏的 Zotero Connector 插件即可自动从网页抓取参考文件信息。Zotero 可以通过\href{https://github.com/l0o0/jasminum}{jasminum插件}支持中文参考文献的识别。在选中希望使用的文献后右键导出文献条目即可生成 \file{.bib} 文件。
+%
+%
% \subsection{特殊页面}
-%
-% 本模板还提供一系列命令与环境用于生成所需的特殊页面。
+%
+% 本模板也预定义了一系列用于生成所需的特殊页面的命令与环境。
+%
%
% \subsubsection{封面}
%
% \begin{function}{\maketitle}
-% 用于生成封面。
-% 本科生仅会生成中文封面;研究生会生成中英文封面。
-% 如果选择了 \opt{nlcover},仅会生成研究生的国家图书馆封面和原创性声明页。
+% 生成封面。
% \end{function}
%
+% 本科生模板仅会生成中文封面;研究生模板会生成中英文封面。
+% 如果选择了 \opt{nlcover},仅会生成研究生的国家图书馆封面。
+% 如果选择了 \opt{decl-page},会在封面后生成本科生的诚信承诺书或研究生的原创性声明。
+% 在启用草稿模式后封面绘制将被禁用。
+%
+% \paragraph{封面图片}
+%
+% \begin{function}[added=2021-12-23]{style/emblem-img}
+% \begin{syntax}
+% emblem-img = \Arg{文件}
+% \end{syntax}
+% 校徽图片文件。
+% \end{function}
+%
+% \begin{function}[added=2021-12-23]{style/name-img}
+% \begin{syntax}
+% name-img = \Arg{文件}
+% \end{syntax}
+% 校名图片文件。
+% \end{function}
+%
+% 通过以上两个选项可以使用外置的校徽和校名图片。本模板封面中校徽及校名的绘制默认依赖 \pkg{njuvisual} 宏包提供的 \pkg{tikz} 矢量曲线,耗时较长,在替换为外置图片后可节省约1秒的编译时长。
+%
%
% \subsubsection{摘要页}
% \changes{v0.11}{2021/10/01}{简化了摘要的编写方式。}
-%
+%
% \begin{function}{abstract,abstract*}
% 摘要。带星号的会生成英文摘要。
% \end{function}
@@ -1121,11 +1484,11 @@ through XeTeX.
%
%
% \subsubsection{前言页}
-%
+%
% \begin{function}{preface}
% 使用 \env{preface} 环境定义。
% \end{function}
-%
+%
% \begin{latexexample}[emph={[1]preface,flushright}]
% \begin{preface}
% 我的前言
@@ -1141,16 +1504,26 @@ through XeTeX.
% \subsubsection{目录页}
%
% \begin{function}{\tableofcontents,\listoffigures,\listoftables}
-% 分别生成目录、图片清单和表格清单。
+% 分别生成目录、图片目录和表格目录。
% \end{function}
-%
+%
+% 目录页的标题名称一般无需修改。用户可以选择使用 \pkg{ctex} 宏集提供的 \tn{ctexset} 命令进行自定义。
+% \begin{latexexample}[moretexcs={\ctexset},emph={[1]contentsname,listfigurename,listtablename}]
+% \ctexset{
+% contentsname = { 目\hspace{2em}次 },
+% listfigurename = { 插图清单 },
+% listtablename = { 表格清单 }
+% }
+% \end{latexexample}
+% 实际上,根据《学位论文编写规则》国家标准\cite{gb-t-7713.1-2006},尽管“目录”这一说法已流传甚广,但学位论文中理应使用“目次”这一名称来指代篇目的列表。
+%
%
% \subsubsection{致谢页}
%
% \begin{function}{acknowledgement}
% 同前言,使用 \env{acknowledgement} 环境。
% \end{function}
-%
+%
% \begin{latexexample}[emph={[1]acknowledgement}]
% \begin{acknowledgement}
% 感谢NJU LUG
@@ -1161,67 +1534,45 @@ through XeTeX.
% \subsubsection{附录页}
%
% \begin{function}{\appendix}
-% 附录放在本命令后,以英文字母进行编号,编写方式同正文
-% \end{function}
-%
-%
-% \subsubsection{成果列表}
-%
-% \begin{function}{\njupaperlist,\njupaperlist*}
-% \begin{syntax}
-% \tn{njupaperlist}\Arg{文献}
-% \end{syntax}
-% 成果列表,分别为发表文章目录与合作文章目录。\Arg{文献} 的填写方式同 \tn{cite},多个文献需要使用英文半角逗号隔开。
-% \end{function}
-%
-% \subsection{参考文献}
-%
-% 符合GB7714-2015规范。使用\hologo{biber}作为后端。需要使用 |biber| 命令手动编译才会显示
-%
-% \begin{function}{\addbibresource}
-% \begin{syntax}
-% \tn{addbibresource}\Arg{文件}
-% \end{syntax}
-% 添加参考文献源文件。
+% 附录放在本命令后,以英文字母进行编号,编写方式同正文。
% \end{function}
%
-% 示例参考文献存储于 \file{njuthesis-sample.bib},直接向其中粘贴新的参考文献即可。如果希望额外添加参考文献列表,可以在导言区中多次调用 \tn{addbibresource} 命令。注意本命令与 |\bibliography{bibfile1,bibfile2}| 不同,不可以用逗号分隔多个输入文件,且必须使用带扩展名的完整文件名。
-%
-% \begin{function}{\printbibliography}
-% 生成参考文献列表页面。
-% \end{function}
%
+% \subsubsection{成果列表}
%
-% \subsubsection{文段内引用}
-%
-% \begin{function}{\cite,\citeauthor,\citeyear}
+% \begin{function}[added=2021-09-29,updated=2021-12-20]{\njupaperlist}
% \begin{syntax}
-% \tn{cite}\Arg{文献}
-% \tn{citeauthor}\Arg{文献}
-% \tn{citeyear}\Arg{文献}
+% \tn{njupaperlist}\oarg{标题}\marg{文献}
% \end{syntax}
-% 引用文献
+% 成果列表,默认标题为发表文章目录。\Arg{文献} 的填写方式同 \tn{cite},多个文献需要使用英文半角逗号隔开。
% \end{function}
-%
-%
-% \subsubsection{文献管理}
-%
-% \subparagraph{使用EndNote}
%
-% 南京大学信息化建设管理服务中心已购买\href{https://itsc.nju.edu.cn/EndNote/list.htm}{EndNote}供全校师生免费试用,最新版为EndNote 20。
-%
-%
-% \subparagraph{使用Zotero}
+% 为了便于识别,成果列表中默认对发表年份进行加粗处理。而对作者姓名的处理较为复杂。利用 \pkg{biblatex} 的数据注解机制可以实现对特定文献信息的样式修改\footnote{\url{https://blog.csdn.net/xenonhu/article/details/120853247}},在此可以用来实现指定作者姓名的突出。经过注解后的一则参考文献条目如下所示:
+% \begin{latexexample}[emph={[1]@inproceedings},emph={[2]author}]
+% @inproceedings{Nemec1997-209-214,
+% title = {Force control of redundant robots},
+% author = {B Nemec and Zhao, Mou Mou},
+% author+an = {2=thesisauthor},
+% booktitle = {Processings of Symposium on Robot Control},
+% shortbooktitle = {(PSRC)},
+% pages = {209-214},
+% country = {Nantes France},
+% year = {1997}
+% }
+% \end{latexexample}
+% 其中 |author+an| 提供了注解的标记,格式为 \meta{序号}|=|\meta{标签},以上条目中即是将第二名作者加入了指定论文作者的注解。\tn{njupaperlist} 会识别 |thesisauthor| 标签,为其指代的作者姓名进行加粗下划线处理。
%
-% \href{https://www.zotero.org/}{Zotero}是一款免费的文献管理软件,支持所有桌面平台。
+% 除手动进行标记以外,以下也提供一种自动化处理办法。下载 \href{https://github.com/hushidong/biblatex-map}{bibmap} 全部文件后,修改主目录下的 \file{bibmapaddauthoran.py} 中 |fieldsource| 为需要匹配的姓名,将需要进行标记的 \file{.bib} 文件拷贝至本目录(此处使用 \file{test.bib} 进行示范),运行以下命令生成的参考文献数据源即可被成果列表识别加粗。
%
-% 在保持Zotero程序运行的情况下,点击浏览器工具栏的Zotero Connector插件即可自动从网页抓取参考文件信息。Zotero可以通过\href{https://github.com/l0o0/jasminum}{jasminum插件}支持中文参考文献的识别。在选中希望使用的文献后右键导出文献条目即可生成\file{.bib}文件。
+% \begin{shellexample}[morekeywords={python}]
+% python bibmap.py test.bib -m bibmapaddauthoran.py
+% \end{shellexample}
%
%
% \subsection{视觉识别系统}
%
-% 视觉识别系统 \pkg{njuvisual} 现已被分离为独立宏包,基本使用方法举例如下:
-% \begin{latexexample}[moretexcs={\njuemblem,\njuname}]
+% 视觉识别系统 \pkg{njuvisual} 现已被分离为独立宏包\cite{njuvisual},基本使用方法举例如下:
+% \begin{latexexample}[moretexcs={\njuemblem,\njuname,\njuname*}]
% \njuemblem{!}{3cm} % 生成指定大小的紫色南大校徽
% \njuname{4cm}{!} % 生成指定大小的紫色南大中文校名
% \njuname*{4cm}{!} % 生成指定大小的紫色南大英文校名
@@ -1230,7 +1581,7 @@ through XeTeX.
% \njuemblem[department=cs,color=blue]{!}{3cm} % 纯蓝色计科徽标
% \end{latexexample}
%
-% 本宏包的详细使用方法请参考其\href{http://mirrors.ctan.org/macros/latex/contrib/njuvisual/njuvisual.pdf}{说明文档}。
+% 本宏包的详细使用方法请参考其使用手册。
%
%
% \begin{thebibliography}{99}
@@ -1241,7 +1592,7 @@ through XeTeX.
% \newcommand\CTANurl[2][]{{^^A
% \small\textit{#1}~\href{http://mirror.ctan.org/#2}{\texttt{CTAN://#2}}}}
%
-% \subsubsection{书籍}
+% \subsection*{书籍}
%
% \bibitem{lshort}
% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al.
@@ -1260,8 +1611,53 @@ through XeTeX.
% \urlprefix\url{https://ctan.org/pkg/lshort-zh-cn}
% \urlprefix\CTANurl[文档:]{info/lshort/chinese/lshort-zh-cn.pdf}
%
+% \bibitem{install-latex-guide-zh-cn}
+% 王然.
+% \newblock \textit{一份简短的关于 \hologo{LaTeX} 安装的介绍} [EB/OL].
+% \newblock version 2021.12.1,
+% \newblock (2021-12-01)
+% \urlprefix\url{https://ctan.org/pkg/install-latex-guide-zh-cn}
+% \urlprefix\CTANurl[文档:]{info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf}
+%
+% \bibitem{刘海洋2013latex入门}
+% 刘海洋.
+% \newblock \textit{\hologo{LaTeX} 入门} [M].
+% \newblock 北京: 电子工业出版社, 2013
+%
+%
+% \subsection*{标准、规范}
+%
+% \bibitem{gb-t-7408-2005}
+% 全国信息与文献标准化技术委员会.
+% \newblock \textit{数据元和交换格式\quad 信息交换~ 日期和时间表示法: GB/T 7408--2005} [S].
+% \newblock 北京: 中国标准出版社, 2005
+%
+% \bibitem{gb-t-7713.1-2006}
+% 全国信息与文献标准化技术委员会.
+% \newblock \textit{学位论文编写规则: GB/T 7713.1--2006} [S].
+% \newblock 北京: 中国标准出版社, 2006
+%
+% \bibitem{gb-t-7714-2015}
+% 全国信息与文献标准化技术委员会.
+% \newblock \textit{信息与文献\quad 参考文献著录规则: GB/T 7714--2015} [S].
+% \newblock 北京: 中国标准出版社, 2015
+%
+% \bibitem{nju2021}
+% 南京大学本科生院.
+% \newblock \textit{关于启动南京大学2022届本科毕业论文(设计)工作的通知} [EB/OL].
+% \newblock (2021-12-14)
+% \urlprefix\url{https://jw.nju.edu.cn/7c/86/c26263a556166/page.htm}
+%
+%
+% \subsection*{宏包}
%
-% \subsubsection{宏包、模版}
+% \bibitem{biblatex-gb7714-2015}
+% 胡振震.
+% \newblock \textit{符合 GB/T 7714-2015 标准的 biblatex 参考文献样式} [EB/OL].
+% \newblock version 1.1b,
+% \newblock (2021-12-11)
+% \urlprefix\url{https://ctan.org/pkg/biblatex-gb7714-2015}
+% \urlprefix\CTANurl[文档:]{biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf}
%
% \bibitem{latexmk}
% \textsc{Collins J}.
@@ -1271,6 +1667,113 @@ through XeTeX.
% \urlprefix\url{https://www.ctan.org/pkg/latexmk}
% \urlprefix\CTANurl[文档:]{support/latexmk/latexmk.pdf}
%
+% \bibitem{listings}
+% \textsc{Heinz C}, \textsc{Moses B}, \textsc{Hoffmann J}.
+% \newblock \textit{Typeset source code listings using \hologo{LaTeX}} [EB/OL].
+% \newblock version 1.8d,
+% \newblock (2020-03-24)
+% \urlprefix\url{https://www.ctan.org/pkg/listings}
+% \urlprefix\CTANurl[文档:]{macros/latex/contrib/listings/listings.pdf}
+%
+% \bibitem{njuvisual}
+% \textsc{Yu Xiong}.
+% \newblock \textit{Display logos related to Nanjing University} [EB/OL].
+% \newblock version 0.2.1,
+% \newblock (2022-01-09)
+% \urlprefix\url{https://ctan.org/pkg/njuvisual}
+% \urlprefix\CTANurl[文档:]{macros/latex/contrib/njuvisual/njuvisual.pdf}
+%
+% \bibitem{tabularray}
+% \textsc{Jianrui Lyu}.
+% \newblock \textit{Typeset tabulars and arrays with \hologo{LaTeX3}} [EB/OL].
+% \newblock version 2021Q,
+% \newblock (2021-12-01)
+% \urlprefix\url{https://ctan.org/pkg/tabularray}
+% \urlprefix\CTANurl[文档:]{macros/latex/contrib/tabularray/tabularray.pdf}
+%
+%
+% \subsection*{模板}
+%
+% \bibitem{fduthesis}
+% 曾祥东.
+% \newblock \textit{fduthesis: 复旦大学论文模板} [EB/OL].
+% \newblock version 0.7e,
+% \newblock (2020-08-30)
+% \urlprefix\url{https://ctan.org/pkg/fduthesis}
+% \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/fduthesis/fduthesis.pdf}
+%
+% \bibitem{thuthesis}
+% 清华大学 TUNA 协会.
+% \newblock \textit{\textsc{ThuThesis}:清华大学学位论文模板} [EB/OL].
+% \newblock version 7.2.3,
+% \newblock (2021-05-31)
+% \urlprefix\url{https://ctan.org/pkg/thuthesis}
+% \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/thuthesis/thuthesis.pdf}
+%
+%
+% \emph{以下模版现已停止更新。}
+%
+% \bibitem{wenboyang2013}
+% 杨文博.
+% \newblock \textit{南京大学学位论文 \hologo{LaTeX} 模板} [EB/OL].
+% \newblock (2018-06-23)
+% \urlprefix\url{https://github.com/solrex/njuthesis}
+%
+% \bibitem{fireblue2013}
+% \textsc{fireblue}.
+% \newblock \textit{南京大学学位论文 \hologo{LaTeX} 模板} [EB/OL].
+% \newblock (2013-04-13)
+% \urlprefix\url{https://github.com/fireblue/NJUThesis}
+%
+% \bibitem{wenhai-zheng2013}
+% \textsc{wenhai-zheng}.
+% \newblock \textit{南京大学本科毕业论文 \hologo{LaTeX} 模板} [EB/OL].
+% \newblock (2013-08-12)
+% \urlprefix\url{https://github.com/wenhai-zheng/NJUThesis}
+%
+% \bibitem{zenglecao2013}
+% 曹增乐.
+% \newblock \textit{南京大学本科毕业论文(设计) \hologo{LaTeX} 模板} [EB/OL].
+% \newblock (2019-06-26)
+% \urlprefix\url{https://github.com/ZLCao/NJUBachelor}
+%
+% \bibitem{haixinghu2013}
+% 胡海星.
+% \newblock \textit{南京大学学位论文 \hologo{XeLaTeX} 模板} [EB/OL].
+% \newblock (2018-08-08)
+% \urlprefix\url{https://github.com/Haixing-Hu/nju-thesis}
+%
+% \bibitem{chuhengzhang2016}
+% 张楚珩.
+% \newblock \textit{南京大学本科生毕业论文 \hologo{LaTeX} 模板} [EB/OL].
+% \newblock (2016-06-01)
+% \urlprefix\url{https://github.com/zhangchuheng123/NJUThesis}
+%
+% \bibitem{yanyanjiang2017}
+% 蒋炎岩.
+% \newblock \textit{南京大学山寨 \hologo{LyX} 研究生毕业论文模板} [EB/OL].
+% \newblock (2019-01-16)
+% \urlprefix\url{https://github.com/jiangyy/njuthesis}
+%
+% \bibitem{njuHan2018}
+% \textsc{njuHan}.
+% \newblock \textit{南京大学学位论文(本科/硕士/博士),毕业论文 \hologo{LaTeX} 模板} [EB/OL].
+% \newblock (2021-06-15)
+% \urlprefix\url{https://github.com/njuHan/njuthesis-nju-thesis-template}
+%
+% \bibitem{anyirao2018}
+% 饶安逸.
+% \newblock \textit{南京大学本科生毕业论文 \hologo{LaTeX} 模板 2018 新版} [EB/OL].
+% \newblock (2018-06-24)
+% \urlprefix\url{https://github.com/AnyiRao/NJUThesis2018}
+%
+% \bibitem{yichenzhao2021}
+% 赵懿晨.
+% \newblock \textit{南京大学本科生毕业论文 \hologo{LaTeX} 模板(2021版)} [EB/OL].
+% \newblock (2021-09-23)
+% \urlprefix\url{https://github.com/FengChendian/NJUThesis2021}
+%
+%
% \end{thebibliography}
%
%
@@ -1285,15 +1788,15 @@ through XeTeX.
% 本模板使用 \hologo{LaTeX3} 语法编写,依赖 \pkg{expl3} 环境,
% 并需调用 \pkg{l3packages} 中的相关宏包。
%
-% 以下代码中有一些形如 |<*class>|
+% 以下代码中有一些形如 \textsf{\color{guard@series!!}〈*class〉}
% 的标记,这是 \pkg{DocStrip} 中的“guard”,用来选择性地提取文件。
% “|*|”和“|/|”分别表示该部分的开始和结束。不含
% “|*|”和“|/|”的 guard 出现在行号右侧,它们用来确定
% 单独一行代码的归属。这些 guard 的颜色深浅不一,用以明确嵌套关系。
%
-% 另有若干包含 |@@| 的guard,用以表示名空间(模块)。
-% 在删除注释生成格式文件时,变量名称中的 |@@| 会被等号后的字段替换,
-% 譬如在本模板 \cls{njuthesis} 中 |@@=nju|。
+% 另有若干包含 \textsf{\color{at@guard}@@} 的 guard,用以表示名空间(模块)。
+% 在删除注释生成格式文件时,源代码变量名称中的 |@@| 会被等号后的字段替换,
+% 譬如在本模板中 \textsf{\color{at@guard}〈@@=nju〉}。
%
%
% \subsection{准备}
@@ -1328,9 +1831,9 @@ through XeTeX.
% \begin{macrocode}
\msg_new:nnn { njuthesis } { unsupported-engine }
{
- The~ njuthesis~ class~ requires~ either~
+ The~ njuthesis~ class~ requires~ either~
XeTeX~ or~ LuaTeX. \\
- "#1"~ is~ not~ supported~ at~ present.~
+ "#1"~ is~ not~ supported~ at~ present.~
You~ must~ change your~ typesetting~ engine~
to~ "xelatex"~ or~ "lualatex".
}
@@ -1347,7 +1850,7 @@ through XeTeX.
%
% \subsection{定义变量}
%
-% l代表局部变量,g代表全局变量。
+% 在变量名称中,|l| 代表局部变量,|g| 代表全局变量,|c| 代表常量,最后一个下划线后的内容指示其类型。
%
% \begin{variable}{\l_@@_tmp_box,\l_@@_tmp_clist,\l_@@_tmp_dim,
% \l_@@_tmp_int,\l_@@_tmp_seq,\l_@@_tmp_tl}
@@ -1362,35 +1865,34 @@ through XeTeX.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_@@_name_type_clist,\c_@@_name_type_en_clist,
-% \c_@@_name_degree_clist,\c_@@_name_degree_en_clist}
-% 论文类型与学位类型。
+% \begin{variable}{\l_@@_info_degree_int,
+% \l_@@_info_diploma_int,\l_@@_info_type_int}
+% 用于存储学位类型的变量。
% \begin{macrocode}
-\clist_const:Nn \c_@@_name_type_clist
- { 毕业论文, 毕业设计 }
-\clist_const:Nn \c_@@_name_type_en_clist
- { THESIS, DESIGN }
-\clist_const:Nn \c_@@_name_degree_clist
- { 学士, 硕士, 硕士专业, 博士 }
-\clist_const:Nn \c_@@_name_degree_en_clist
- { Bachelor, Master, Master, Doctor~of~Philosophy }
+\int_new:N \l_@@_info_degree_int
+\int_new:N \l_@@_info_diploma_int
+\int_new:N \l_@@_info_type_int
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_@@_info_degree_int,\l_@@_info_degree_tl,
-% \l_@@_info_diploma_int,\l_@@_info_diploma_tl,
-% \l_@@_info_type_int,\l_@@_info_type_tl}
+% \begin{variable}{\l_@@_info_degree_tl,\l_@@_info_diploma_tl,
+% \l_@@_info_type_tl}
% 用于存储学位名称的变量。
% \begin{macrocode}
-\int_new:N \l_@@_info_degree_int
\tl_new:N \l_@@_info_degree_tl
-\int_new:N \l_@@_info_diploma_int
\tl_new:N \l_@@_info_diploma_tl
-\int_new:N \l_@@_info_type_int
\tl_new:N \l_@@_info_type_tl
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_twoside_bool}
+% 定义用于判断是否使用双面模式的变量,初始值为使用双面模式。
+% \begin{macrocode}
+\bool_new:N \g_@@_twoside_bool
+\bool_set_true:N \g_@@_twoside_bool
+% \end{macrocode}
+% \end{variable}
+%
% \begin{variable}{\l_@@_second_supv_bool}
% 定义用于判断是否有第二导师的变量。
% \begin{macrocode}
@@ -1421,6 +1923,53 @@ through XeTeX.
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_@@_info_sm_date_tl,\l_@@_info_sm_date_en_tl,\l_@@_info_df_date_tl}
+% 用于存储格式化后的论文提交日期和答辩日期的变量。
+% \begin{macrocode}
+\tl_new:N \l_@@_info_sm_date_tl
+\tl_new:N \l_@@_info_sm_date_en_tl
+\tl_new:N \l_@@_info_df_date_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_today_tl}
+% 编译当天日期,格式为 |yyyy-mm-dd|。
+% \begin{macrocode}
+\tl_const:Nx \c_@@_today_tl
+ {
+ \int_to_arabic:n { \c_sys_year_int } -
+ \int_to_arabic:n { \c_sys_month_int } -
+ \int_to_arabic:n { \c_sys_day_int }
+ }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_name_type_clist,\c_@@_name_type_en_clist,
+% \c_@@_name_degree_clist,\c_@@_name_degree_en_clist}
+% 论文类型与学位类型。
+% \begin{macrocode}
+\clist_const:Nn \c_@@_name_type_clist
+ { 毕业论文, 毕业设计 }
+\clist_const:Nn \c_@@_name_type_en_clist
+ { THESIS, DESIGN }
+\clist_const:Nn \c_@@_name_degree_clist
+ { 学士, 硕士, 硕士专业, 博士 }
+\clist_const:Nn \c_@@_name_degree_en_clist
+ { Bachelor, Master, Master, Doctor~of~Philosophy }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_month_en_clist}
+% 英文月份名称。
+% \begin{macrocode}
+\clist_const:Nn \c_@@_month_en_clist
+ {
+ January, February, March, April, May, June,
+ July, August, September, October, November, December
+ }
+% \end{macrocode}
+% \end{variable}
+%
%
% \subsection{内部函数}
%
@@ -1444,11 +1993,11 @@ through XeTeX.
% 用来定义默认名称的辅助函数。
% \begin{macrocode}
\cs_new_protected:Npn \@@_define_name:nn #1#2
- { \tl_const:cn { c_@@_name_ #1 _tl } {#2} }
+ { \tl_const:cn { c_@@_name_ #1 _tl } { #2 } }
\cs_new_protected:Npn \@@_define_name:nnn #1#2#3
{
- \tl_const:cn { c_@@_name_ #1 _tl } {#2}
- \tl_const:cn { c_@@_name_ #1 _en_tl } {#3}
+ \tl_const:cn { c_@@_name_ #1 _tl } { #2 }
+ \tl_const:cn { c_@@_name_ #1 _en_tl } { #3 }
}
% \end{macrocode}
% \end{macro}
@@ -1473,7 +2022,7 @@ through XeTeX.
\mode_leave_vertical:
\rule [ -0.5 ex ] { #1 } { 0.4 pt }
\skip_horizontal:n { -#1 }
- \hbox_to_wd:nn {#1} { \hfil #2 \hfil }
+ \hbox_to_wd:nn { #1 } { \hfil #2 \hfil }
}
% \end{macrocode}
% \end{macro}
@@ -1490,14 +2039,14 @@ through XeTeX.
\cs_new_protected:Npn \@@_spread_box:nnn #1#2#3
{
\mode_leave_vertical:
- \hbox_to_wd:nn {#1}
- { #2 \tl_map_inline:xn {#3} { ##1 \hfil } \unskip }
+ \hbox_to_wd:nn { #1 }
+ { #2 \tl_map_inline:xn { #3 } { ##1 \hfil } \unskip }
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_multiline_box:nnnn}
-% 多行固定长度的下划线内容。
+% 多行固定长度的下划线内容,用于国家图书馆封面。
% \begin{arguments}
% \item 用于循环的 |int| 型变量
% \item 内容,|clist| 型变量
@@ -1509,8 +2058,8 @@ through XeTeX.
{
\int_set:Nn #1 { 1 }
\int_do_until:nn { #1 > #3 }
- {
- \@@_ulined_center_box:nn { #4 }
+ {
+ \@@_ulined_center_box:nn { #4 }
{ \clist_item:Nn #2 { #1 } } \\
\int_incr:N #1
}
@@ -1528,8 +2077,10 @@ through XeTeX.
% \begin{macrocode}
\cs_new_protected:Npn \@@_put_inempty_seg:nnn #1#2#3
{
- \tl_set:Nx \l_@@_tmp_tl { \tl_range:Nnn { #1 } { #2 } { #2 + #3 - 1 } }
- \tl_if_empty:NF \l_@@_tmp_tl { \clist_put_right:NV \l_@@_tmp_clist { \l_@@_tmp_tl } }
+ \tl_set:Nx \l_@@_tmp_tl
+ { \tl_range:Nnn { #1 } { #2 } { #2 + #3 - 1 } }
+ \tl_if_empty:NF \l_@@_tmp_tl
+ { \clist_put_right:NV \l_@@_tmp_clist { \l_@@_tmp_tl } }
}
% \end{macrocode}
% \end{macro}
@@ -1594,7 +2145,7 @@ through XeTeX.
\cs_new_protected:Npn \@@_full_uline:Nn #1#2
{
\@@_get_text_width:Nn #1 { #2 }
- \dim_set:Nn #1 { \textwidth - #1 } #2
+ \dim_set:Nn #1 { \textwidth - #1 } #2
}
\cs_generate_variant:Nn \@@_full_uline:Nn { NV }
% \end{macrocode}
@@ -1635,64 +2186,117 @@ through XeTeX.
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_date:www,\@@_date_en:www}
+% 将形如 |yyyy-mm-dd| 的 ISO 日期格式字符串转化为日期表示。该格式符合国际标准 ISO 8601 以及国内标准 GB/T 7408--2005《数据元和交换格式 信息交换 日期和时间表示法》。
+% \begin{arguments}
+% \item 年份
+% \item 月份
+% \item 日期
+% \end{arguments}
+% 中文日期表示通过封装 \pkg{zhnumber} 的内部函数实现;英文日期表示通过用于研究生英文封面。其中,变量类型 |w| 表明参数符合特定语法格式。
+% \begin{macrocode}
+\cs_new:Npn \@@_date:www #1-#2-#3 \q_stop
+ { \__zhnum_date_aux:nnn { #1 } { #2 } { #3 } }
+\cs_new:Npn \@@_date_en:www #1-#2-#3 \q_stop
+ { \clist_item:Nn \c_@@_month_en_clist { #2 } ~#3 , ~#1 }
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsection{模板选项}
% \changes{v0.11}{2021/11/15}{进行了效率优化。}
%
-% 学位信息的设置
% \begin{macrocode}
\keys_define:nn { nju }
{
% \end{macrocode}
%
% \begin{macro}{degree}
-% 学位类型。
+% 学位类型,默认为本科。
% \begin{macrocode}
- degree .choices:nn = { ug, mg, mf, phd }
- { \int_set_eq:NN \l_@@_info_degree_int \l_keys_choice_int
+ degree .choices:nn = { ug, mg, mf, phd }
+ {
+ \int_set_eq:NN \l_@@_info_degree_int \l_keys_choice_int
\tl_set:Nn \l_@@_info_degree_tl
- { \clist_item:Nn \c_@@_name_degree_clist { \l_@@_info_degree_int } }
+ {
+ \clist_item:Nn \c_@@_name_degree_clist
+ { \l_@@_info_degree_int }
+ }
% \end{macrocode}
% 进行学位的判断。
% \begin{macrocode}
\int_compare:nTF { \l_@@_info_degree_int == 1 }
{ \tl_set:Nn \l_@@_info_diploma_tl { ug } }
- { \tl_set:Nn \l_@@_info_diploma_tl { g } } },
- degree .initial:n = ug,
+ { \tl_set:Nn \l_@@_info_diploma_tl { g } }
+ },
+ degree .initial:n = ug,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{type}
-% 论文类型。\cs{l_keys_choice_int} 需要被展开以获取正确的序号。
+% 论文类型,默认为毕业论文。
% \begin{macrocode}
- type .choices:nn = { thesis, design }
- { \int_set_eq:NN \l_@@_info_type_int \l_keys_choice_int
+ type .choices:nn = { thesis, design }
+ {
+ \int_set_eq:NN \l_@@_info_type_int \l_keys_choice_int
\tl_set:Nn \l_@@_info_type_tl
{ \clist_item:Nn \c_@@_name_type_clist { \l_@@_info_type_int } }
- \tl_put_left:Nn \l_@@_info_type_tl
- { \tl_use:c { c_@@_name_ \l_@@_info_diploma_tl _tl } } },
- type .initial:n = thesis,
+ \tl_put_left:Nn \l_@@_info_type_tl
+ { \tl_use:c { c_@@_name_ \l_@@_info_diploma_tl _tl } }
+ },
+ type .initial:n = thesis,
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{nlcover}
-% 是否需要国家图书馆封面的设置。
+% 是否需要国家图书馆封面(仅对研究生有效,默认关闭)。
+% \footnote{nl 代表 National Library。}
% \begin{macrocode}
- nlcover .bool_set:N = \g_@@_nlcover_bool,
- nlcover .initial:n = false,
+ nlcover .bool_set:N = \g_@@_nlcover_bool,
+ nlcover .initial:n = false,
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{latin-font,cjk-font}
-% \changes{v0.13}{2021/12/12}{简化字体选项名称。}
-% 定义字体选项
+%
+% \begin{macro}{decl-page}
+% \changes{v0.13}{2021/12/15}{新增诚信承诺书选项。}
+% \changes{v0.14}{2022/01/06}{修改选项名称。}
+% 是否需要诚信承诺书或原创性声明(默认关闭)。
+% \footnote{原创性声明的英文翻译为 Declaration of Originality,为了使选项表义更清晰同时缩减名称长度,将其修改为“声明页”这一名称。}
+% \begin{macrocode}
+ decl-page .bool_set:N = \g_@@_orig_decl_bool,
+ decl-page .initial:n = false,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{draft}
+% \changes{v0.13}{2021/12/15}{新增草稿模式选项。}
+% 是否开启草稿模式(默认关闭)。
+% \begin{macrocode}
+ draft .bool_gset:N = \g_@@_draft_bool,
+ draft .initial:n = false,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{oneside,twoside}
+% \changes{v0.14}{2022/01/14}{新增单双面模式选项。}
+% 单双面模式(默认为双面)。
% \begin{macrocode}
- latin-font .choices:nn =
- { gyre, mac, win, none }
- { \tl_set_eq:NN \g_@@_latin_font_tl \l_keys_choice_tl },
- cjk-font .choices:nn =
- { fandol, founder, mac, noto, win, none }
- { \tl_set_eq:NN \g_@@_cjk_font_tl \l_keys_choice_tl },
+ oneside .value_forbidden:n = true,
+ twoside .value_forbidden:n = true,
+ oneside .bool_gset_inverse:N = \g_@@_twoside_bool,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{latin-font,cjk-font}
+% \changes{v0.14}{2021/12/12}{简化字体选项名称。}
+% 定义字体选项。
+% \begin{macrocode}
+ latin-font .choices:nn =
+ { gyre, mac, win, none }
+ { \tl_set_eq:NN \g_@@_latin_font_tl \l_keys_choice_tl },
+ cjk-font .choices:nn =
+ { fandol, founder, mac, noto, source, win, none }
+ { \tl_set_eq:NN \g_@@_cjk_font_tl \l_keys_choice_tl },
}
% \end{macrocode}
% \end{macro}
@@ -1703,17 +2307,43 @@ through XeTeX.
% \end{macrocode}
%
%
+% \subsection{用户接口}
+%
+% \begin{macro}{bib,info,style}
+% 定义元(meta)键值对。
+% \begin{macrocode}
+\keys_define:nn { nju }
+ {
+ bib .meta:nn = { nju / bib } { #1 },
+ info .meta:nn = { nju / info } { #1 },
+ style .meta:nn = { nju / style } { #1 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\njusetup}
+% \changes{v0.6}{2021/09/10}{改用键值对输入信息。}
+% 定义用于设置信息的命令。
+% \begin{macrocode}
+\NewDocumentCommand \njusetup { m } { \keys_set:nn { nju } { #1 } }
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{配置常量}
% TODO: 分离为单独文件
% 通用默认名称。注意空格是忽略掉的。
% \begin{macrocode}
\clist_map_inline:nn
{
- { id } { 学号 },
- { orig_decl } { 学位论文原创性声明 },
- { pdf_creator } { LaTeX~ with~ njuthesis~ class },
- { supv_ii } { 第二导师 },
- { supv_ttl } { 职称 }
+ { acknowledgement } { 致\hspace{2em}谢 },
+ { id } { 学号 },
+ { orig_date } { 日期 },
+ { paperlist } { 发表文章目录 },
+ { pdf_creator } { LaTeX~ with~ njuthesis~ class },
+ { preface } { 前\hspace{2em}言 },
+ { supv_ii } { 第二导师 },
+ { supv_ttl } { 职称 }
}
{ \@@_define_name:nn #1 }
% \end{macrocode}
@@ -1743,13 +2373,15 @@ through XeTeX.
% \begin{macrocode}
\clist_map_inline:nn
{
- { author_full } { 本科生姓名 },
- { grade } { 年级 },
- { sm_date } { 提交日期 },
- { supv } { 导师 },
- { title } { 题目 },
- { type } { 本科生毕业论文(设计、作品)},
- { ug } { 本科 }
+ { author_full } { 本科生姓名 },
+ { grade } { 年级 },
+ { orig_decl } { 本科毕业论文(设计)诚信承诺书 },
+ { orig_sign } { 作者签名 },
+ { sm_date } { 提交日期 },
+ { supv } { 导师 },
+ { title } { 题目 },
+ { type } { 本科生毕业论文(设计、作品) },
+ { ug } { 本科 }
}
{ \@@_define_name:nn #1 }
\clist_map_inline:nn
@@ -1759,8 +2391,23 @@ through XeTeX.
{ supv_full } { 指导教师(姓名、职称) } { MENTOR }
}
{ \@@_define_name:nnn #1 }
+% \end{macrocode}
+%
+% \begin{variable}{\c_@@_orig_decl_text_tl}
+% 学位论文诚信承诺书。
+% \begin{macrocode}
+ \tl_const:Nn \c_@@_orig_decl_text_tl
+ {
+ 本人郑重承诺:所呈交的毕业论文(设计)(题目:)是在指导教师的指导下
+ 严格按照学校和院系有关规定由本人独立完成的。本毕业论文(设计)中引用
+ 他人观点及参考资源的内容均已标注引用,如出现侵犯他人知识产权的行为,
+ 由本人承担相应法律责任。本人承诺不存在抄袭、伪造、篡改、代写、买卖毕
+ 业论文(设计)等违纪行为。
+ }
}
% \end{macrocode}
+% \end{variable}
+%
% 研究生默认名称。
% \begin{macrocode}
{
@@ -1780,8 +2427,8 @@ through XeTeX.
{ grade } { 级 },
{ major_s } { 专业 },
{ major_nl } { 专业名称 },
- { orig_sign } { 研究生签名: },
- { orig_date } { 日期: },
+ { orig_decl } { 学位论文原创性声明 },
+ { orig_sign } { 研究生签名 },
{ reviewer } { 评阅人: },
{ seclv } { 密级 },
{ sign } { (签字) },
@@ -1804,29 +2451,30 @@ through XeTeX.
}
{ \@@_define_name:nnn #1 }
% \end{macrocode}
+%
% \begin{variable}{\c_@@_cover_en_text_tl}
% 英文封面字样。
% \begin{macrocode}
\tl_const:Nn \c_@@_cover_en_text_tl
{
- A~ dissertation~ submitted~ to \\
+ A~ dissertation~ submitted~ to \\
the~ graduate~ school~ of~ Nanjing~ University \\
in~ partial~ fulfilment~ of~ the~ requirements~ for~ the~ degree~ of
}
- }
% \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_orig_decl_text_tl}
% 学位论文原创性声明。
% \begin{macrocode}
-\tl_const:Nn \c_@@_orig_decl_text_tl
- {
- 本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作
- 所取得的成果。除本论文中已经注明引用的内容外,本论文不包含其他个人或
- 集体已经发表或撰写过的研究成果,也不包含为获得南京大学或其他教育机构
- 的学位证书而使用过的材料。对本文的研究做出重要贡献的个人和集体,均已
- 在论文的致谢部分明确标明。本人郑重申明愿承担本声明的法律责任。
+ \tl_const:Nn \c_@@_orig_decl_text_tl
+ {
+ 本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作
+ 所取得的成果。除本论文中已经注明引用的内容外,本论文不包含其他个人或
+ 集体已经发表或撰写过的研究成果,也不包含为获得南京大学或其他教育机构
+ 的学位证书而使用过的材料。对本文的研究做出重要贡献的个人和集体,均已
+ 在论文的致谢部分明确标明。本人郑重申明愿承担本声明的法律责任。
+ }
}
% \end{macrocode}
% \end{variable}
@@ -1854,11 +2502,9 @@ through XeTeX.
{ \@@_define_name:nnn #1 }
% \end{macrocode}
%
+%
% \subsection{个人信息}
-% 输入个人信息的区域。
-% \begin{macrocode}
-\keys_define:nn { nju } { info.meta:nn = { nju / info } { #1 } }
-% \end{macrocode}
+% \changes{v0.11}{2021/10/01}{将个人信息变量名改为小写字母加连字符的形式。}
%
% \begin{macrocode}
\keys_define:nn { nju / info }
@@ -1866,7 +2512,9 @@ through XeTeX.
% \end{macrocode}
%
% \begin{macro}{info/title,info/title*}
-% 题目。以下标注星号(*)的为对应的英文字段。
+% \changes{v0.13}{2021/12/12}{简化多行标题的输入方式。}
+% \changes{v0.14}{2022/01/14}{将标题断行控制符修改为 |\\|。}
+% 题目。中文题目可使用 |\\| 手动断行。以下标注星号(|*|)的皆为对应的英文字段。
% \begin{macrocode}
title .tl_set:N = \l_@@_info_title_tl,
title .initial:n = { 空 },
@@ -1882,7 +2530,7 @@ through XeTeX.
keywords* .clist_set:N = \l_@@_info_keywords_en_clist,
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{info/grade,info/student-id,info/author,info/author*}
% 年级、学号、姓名。
% \begin{macrocode}
@@ -1892,7 +2540,7 @@ through XeTeX.
author* .tl_set:N = \l_@@_info_author_en_tl,
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{info/department,info/department*,info/major,info/major*,info/field,info/field*}
% 院系、专业、方向。
% \begin{macrocode}
@@ -1904,40 +2552,46 @@ through XeTeX.
field* .tl_set:N = \l_@@_info_field_en_tl,
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{info/supervisor,info/supervisor*,info/supervisor-title,info/supervisor-title*}
-% \changes{v0.13}{2021/12/11}{修改了导师键值对的变量名称。}
-% 导师
+%
+% \begin{macro}{info/supervisor,info/supervisor*}
+% \changes{v0.13}{2021/12/11}{修改了导师选项的变量名称。}
+% \changes{v0.14}{2022/01/12}{精简导师信息选项。}
+% 导师信息。中文导师全称使用 |clist| 存储,便于在本科生封面中进行分割。
% \begin{macrocode}
- supervisor .tl_set:N = \l_@@_info_supv_tl,
+ supervisor .clist_set:N = \l_@@_info_supv_clist,
supervisor* .tl_set:N = \l_@@_info_supv_en_tl,
- supervisor-title .tl_set:N = \l_@@_info_supv_ttl_tl,
- supervisor-title* .tl_set:N = \l_@@_info_supv_ttl_en_tl,
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{info/supervisor-ii,info/supervisor-ii*,info/supervisor-ii-title,info/supervisor-ii-title*}
-% 第二导师
+% \begin{macro}{info/supervisor-ii,info/supervisor-ii*}
+% 第二导师信息。
% \begin{macrocode}
- supervisor-ii .tl_set:N = \l_@@_info_supv_ii_tl,
+ supervisor-ii .clist_set:N = \l_@@_info_supv_ii_clist,
supervisor-ii* .tl_set:N = \l_@@_info_supv_ii_en_tl,
- supervisor-ii-title .tl_set:N = \l_@@_info_supv_ii_ttl_tl,
- supervisor-ii-title*.tl_set:N = \l_@@_info_supv_ii_ttl_en_tl,
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{info/submit-date,info/submit-date*}
-% 提交日期
+% \begin{macro}{info/submit-date}
+% \changes{v0.14}{2022/01/14}{精简提交日期选项。}
+% 提交日期,初始值为编译当天日期。
+% \begin{macrocode}
+ submit-date .tl_set:N = \l_@@_info_sm_date_raw_tl,
+ submit-date .initial:V = \c_@@_today_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/defend-date}
+% \changes{v0.14}{2022/01/14}{精简答辩日期选项。}
+% 答辩日期。
% \begin{macrocode}
- submit-date .tl_set:N = \l_@@_info_sm_date_tl,
- submit-date* .tl_set:N = \l_@@_info_sm_date_en_tl,
+ defend-date .tl_set:N = \l_@@_info_df_date_raw_tl,
+ defend-date .initial:V = \c_@@_today_tl,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/defend-date,info/chairman,info/reviewer}
-% 答辩信息。
+% 答辩委员会信息。
% \begin{macrocode}
- defend-date .tl_set:N = \l_@@_info_df_date_tl,
chairman .tl_set:N = \l_@@_info_chairman_tl,
reviewer .clist_set:N = \l_@@_info_reviewer_clist,
% \end{macrocode}
@@ -1954,38 +2608,24 @@ through XeTeX.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\njusetup}
-% \changes{v0.6}{2021/09/10}{改用键值对输入信息。}
-% \changes{v0.11}{2021/10/01}{将个人信息变量名改为小写字母加连字符的形式。}
-% 定义用于设置个人信息的命令
-% \begin{macrocode}
-\NewDocumentCommand \njusetup { m } { \keys_set:nn { nju } { #1 } }
-% \end{macrocode}
-% \end{macro}
-%
% 拼合双导师的姓名和职称。
% \begin{macrocode}
\bool_set:Nn \l_@@_second_supv_bool
- { ! \tl_if_empty_p:N \l_@@_info_supv_ii_tl }
+ { ! \clist_if_empty_p:N \l_@@_info_supv_ii_clist }
\tl_set:Nn \l_@@_info_supv_full_tl
{
- \l_@@_info_supv_tl \@@_hskip:
- \l_@@_info_supv_ttl_tl
+ \clist_use:Nn \l_@@_info_supv_clist { \@@_hskip: }
\bool_if:NT \l_@@_second_supv_bool
- {
- \@@_quad: \l_@@_info_supv_ii_tl
- \@@_hskip: \l_@@_info_supv_ii_ttl_tl
+ {
+ \@@_quad:
+ \clist_use:Nn \l_@@_info_supv_ii_clist { \@@_hskip: }
}
}
\tl_set:Nn \l_@@_info_supv_full_en_tl
{
- \l_@@_info_supv_ttl_en_tl \@@_hskip:
\l_@@_info_supv_en_tl
\bool_if:NT \l_@@_second_supv_bool
- {
- \@@_quad: \l_@@_info_supv_ii_ttl_en_tl
- \@@_hskip: \l_@@_info_supv_ii_en_tl
- }
+ { \@@_quad: \l_@@_info_supv_ii_en_tl }
}
% \end{macrocode}
%
@@ -1998,10 +2638,17 @@ through XeTeX.
\PassOptionsToClass
{
a4paper,
- twoside,
UTF8,
scheme=chinese,
% \end{macrocode}
+% 传入单双面模式选项。
+% \begin{macrocode}
+ \bool_if:NTF \g_@@_twoside_bool { twoside, } { oneside, }
+% \end{macrocode}
+% 开启草稿模式后传入 |draft| 选项。
+% \begin{macrocode}
+ \bool_if:NT \g_@@_draft_bool { draft, }
+% \end{macrocode}
% 关于行距,\hologo{LaTeX} 默认1.2行距,word 默认行距是1.3,要求1.5倍 word 行距,故
% $1.5\times\frac{1.3}{1.2} = 1.625$
% \begin{macrocode}
@@ -2022,14 +2669,14 @@ through XeTeX.
% \begin{macrocode}
\clist_map_inline:nn
{
- { no-math } { fontspec },
- { perpage } { footmisc },
- { amsmath, thmmarks } { ntheorem },
- { hyphens } { url },
+ { no-math } { fontspec },
+ { perpage } { footmisc },
+ { amsmath, thmmarks } { ntheorem },
+ { hyphens } { url },
{ warnings-off={ mathtools-colon, mathtools-overbracket } }
{ unicode-math },
{ capitalise, nameinlink, noabbrev }
- { cleveref }
+ { cleveref }
}
{ \PassOptionsToPackage #1 }
% \end{macrocode}
@@ -2039,23 +2686,14 @@ through XeTeX.
\LoadClass { ctexbook } [ 2018/04/01 ]
% \end{macrocode}
%
+% \changes{v0.14}{2021/12/21}{移除内置的 \pkg{hologo}。}
% 载入各种宏包。
% \begin{macrocode}
\RequirePackage
{
geometry,
- caption,
- setspace,
fancyhdr,
- hologo,
-% \end{macrocode}
-% \pkg{url} 用于生成链接文本。
-% \begin{macrocode}
- url,
-% \end{macrocode}
-% \pkg{emptypage} 用于清除空白页的页码。
-% \begin{macrocode}
- emptypage,
+ setspace,
% \end{macrocode}
% 南京大学视觉形象化标准宏包 \pkg{njuvisual} 用于绘制学校 logo。
% \begin{macrocode}
@@ -2071,18 +2709,21 @@ through XeTeX.
unicode-math,
ntheorem,
% \end{macrocode}
+% \changes{v0.14}{2021/12/21}{移除内置的 \pkg{multirow}、\pkg{subcaption} 和 \pkg{wrapfig}。}
% 图片与表格。
% \begin{macrocode}
- graphicx,
- wrapfig,
booktabs,
- multirow,
+ caption,
+ graphicx,
% \end{macrocode}
-% 列表环境
+% 列表环境。
% \begin{macrocode}
- listings,
enumitem,
% \end{macrocode}
+% \pkg{url} 用于生成链接文本。
+% \begin{macrocode}
+ url,
+% \end{macrocode}
% 按以下顺序加载两个关于引用的包。
% \pkg{hyperref} 覆写了大量命令,因此需要在其他包最后载入。
% 仅有 \pkg{cleveref} 需要在 \pkg{hyperref} 后载入,否则会报错。
@@ -2092,6 +2733,11 @@ through XeTeX.
}
% \end{macrocode}
%
+% 在双面模式下,使用 \pkg{emptypage} 清除空白页的页眉、页脚和页码。
+% \begin{macrocode}
+\bool_if:NT \g_@@_twoside_bool { \RequirePackage{ emptypage } }
+% \end{macrocode}
+%
% \changes{v0.13}{2021/12/13}{删除会与 \pkg{ntheorem} 冲突的 \pkg{microtype}。}
% \begin{macro}{\njuline}
% 针对编译引擎,使用不同的宏包构建可以对中文正常换行的下划线命令。
@@ -2140,7 +2786,7 @@ through XeTeX.
%
% \subsection{字体设置}
%
-% \pkg{fontspec} 已在 C\hologo{TeX} 套件中包含,无需另外载入。
+% \pkg{fontspec} 已在 C\hologo{TeX} 套件中包含,无需另行载入。
%
% \subsubsection{操作系统检测}
%
@@ -2148,10 +2794,10 @@ through XeTeX.
% 则使用系统预装字体覆盖字体选项。
% \begin{macrocode}
\tl_if_empty:NTF \g_@@_latin_font_tl
- { \bool_gset_true:N \g_@@_load_sys_font_bool }
- {
+ { \bool_gset_true:N \g_@@_load_sys_font_bool }
+ {
\tl_if_empty:NT \g_@@_cjk_font_tl
- { \bool_gset_true:N \g_@@_load_sys_font_bool }
+ { \bool_gset_true:N \g_@@_load_sys_font_bool }
}
% \end{macrocode}
%
@@ -2161,7 +2807,7 @@ through XeTeX.
% 这两种情况外的系统被判断为 Linux,一律使用自由字体。
% \begin{macrocode}
\bool_if:NT \g_@@_load_sys_font_bool
- {
+ {
\sys_if_platform_windows:TF
{ \tl_set:Nn \g_@@_latin_font_tl { win }
\tl_set:Nn \g_@@_cjk_font_tl { win } }
@@ -2169,7 +2815,7 @@ through XeTeX.
{ \tl_set:Nn \g_@@_latin_font_tl { mac }
\tl_set:Nn \g_@@_cjk_font_tl { mac } }
{ \tl_set:Nn \g_@@_latin_font_tl { gyre }
- \tl_set:Nn \g_@@_cjk_font_tl { fandol } } }
+ \tl_set:Nn \g_@@_cjk_font_tl { fandol } } }
}
% \end{macrocode}
%
@@ -2231,6 +2877,7 @@ through XeTeX.
% \end{macrocode}
% \end{macro}
%
+%
% \subsubsection{定义中文字库}
%
% \begin{macro}{\@@_load_cjk_font_win:}
@@ -2238,15 +2885,14 @@ through XeTeX.
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_font_win:
{
- \setCJKmainfont{SimSun}[
- AutoFakeBold=2.17,
- ItalicFont=KaiTi]
- \setCJKsansfont{SimHei}
- \setCJKmonofont{FangSong}
- \setCJKfamilyfont{zhsong}{SimSun}[AutoFakeBold=2.17]
- \setCJKfamilyfont{zhhei}{SimHei}
- \setCJKfamilyfont{zhfs}{FangSong}
- \setCJKfamilyfont{zhkai}{KaiTi}[AutoFakeBold=2.17]
+ \setCJKmainfont { SimSun }
+ [ AutoFakeBold = 2.17, ItalicFont = KaiTi ]
+ \setCJKsansfont { SimHei } [ AutoFakeBold = 2.17 ]
+ \setCJKmonofont { FangSong } [ AutoFakeBold = 2.17 ]
+ \setCJKfamilyfont { zhsong } { SimSun } [ AutoFakeBold = 2.17 ]
+ \setCJKfamilyfont { zhhei } { SimHei } [ AutoFakeBold = 2.17 ]
+ \setCJKfamilyfont { zhfs } { FangSong } [ AutoFakeBold = 2.17 ]
+ \setCJKfamilyfont { zhkai } { KaiTi } [ AutoFakeBold = 2.17 ]
}
% \end{macrocode}
% \end{macro}
@@ -2258,8 +2904,10 @@ through XeTeX.
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_font_mac:
{
- % 移除 does not contain script "CJK" 警告
- \msg_redirect_name:nnn {fontspec} {no-script} {info}
+% \end{macrocode}
+% 移除 does not contain script "CJK" 警告。
+% \begin{macrocode}
+ \msg_redirect_name:nnn { fontspec } { no-script } { info }
\setCJKmainfont{Songti~SC~Light}[
BoldFont=Songti~SC~Bold,
ItalicFont=Kaiti~SC,
@@ -2281,7 +2929,7 @@ through XeTeX.
\cs_new_protected:Npn \@@_load_cjk_font_fandol:
{
% 移除 does not contain script "CJK" 警告
- \msg_redirect_name:nnn {fontspec} {no-script} {info}
+ \msg_redirect_name:nnn {fontspec} {no-script} {info}
\setCJKmainfont{FandolSong-Regular}[
Extension=.otf,
BoldFont=FandolSong-Bold,
@@ -2318,65 +2966,109 @@ through XeTeX.
% \begin{macrocode}
\defaultCJKfontfeatures{JFM={zh_CN/{quanjiao,fzpr}}}
}
- \setCJKmainfont{FZSSK}[% 方正书宋
- Extension=.ttf,
- BoldFont=FZXBSK,% 方正小标宋
- ItalicFont=FZKTK]% 方正楷体
- \setCJKsansfont{FZXH1K}[% 方正细黑一
- Extension=.ttf,
- BoldFont=FZHTK]% FZHTK 方正黑体
- \setCJKmonofont{FZFSK}[Extension=.ttf]% 方正仿宋
- \setCJKfamilyfont{zhsong}
- {FZSSK}[
- Extension=.ttf,
- BoldFont=FZXBSK]
- \setCJKfamilyfont{zhhei}
- {FZHTK}[
- Extension=.ttf,
- AutoFakeBold=2.17]
- \setCJKfamilyfont{zhfs}
- {FZFSK}[Extension=.ttf]
- \setCJKfamilyfont{zhkai}
- {FZKTK}[Extension=.ttf]
+ \setCJKmainfont { FZShuSong-Z01 }
+ [ BoldFont = FZXiaoBiaoSong-B05, ItalicFont = FZKai-Z03 ]
+ \setCJKsansfont { FZXiHeiI-Z08 } [ BoldFont = FZHei-B01 ]
+ \setCJKmonofont { FZFangSong-Z02 }
+ \setCJKfamilyfont { zhsong } { FZShuSong-Z01 }
+ [ BoldFont = FZXiaoBiaoSong-B05 ]
+ \setCJKfamilyfont { zhhei } { FZHei-B01 }
+ [AutoFakeBold=2.17]
+ \setCJKfamilyfont { zhkai } { FZKai-Z03 }
+ [AutoFakeBold=2.17]
+ \setCJKfamilyfont { zhfs } { FZFangSong-Z02 }
\defaultCJKfontfeatures{}
}
% \end{macrocode}
% \end{macro}
%
-%
% \begin{macro}{\@@_load_cjk_font_noto:}
-% 思源字体。
+% Noto 思源字体。
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_font_noto:
{
- % 思源宋体
- \setCJKmainfont[
- UprightFont=NotoSerifSC-Regular,
- BoldFont=NotoSerifSC-Bold,
- ItalicFont=NotoSerifSC-Regular,
- BoldItalicFont=NotoSerifSC-Bold,
- ItalicFeatures=FakeSlant,
- BoldItalicFeatures=FakeSlant]{Noto~Serif~SC}
-
- % 思源黑体
- \setCJKsansfont[
- UprightFont=NotoSansSC-Regular,
- BoldFont=NotoSansSC-Bold,
- ItalicFont=NotoSansSC-Regular,
- BoldItalicFont=NotoSansSC-Bold,
- ItalicFeatures=FakeSlant,
- BoldItalicFeatures=FakeSlant]{Noto~Sans~SC}
-
- \setCJKmonofont{FZFSK}[Extension=.ttf]% 方正仿宋
-
- \setCJKfamilyfont{zhsong}{Noto~Serif~SC}
- \setCJKfamilyfont{zhhei}{Noto~Sans~SC}
- \setCJKfamilyfont{zhfs}{FZFSK}[Extension=.ttf]
- \setCJKfamilyfont{zhkai}{FZKTK}[Extension=.ttf]
+ \setCJKmainfont
+ [
+ UprightFont = NotoSerifCJKsc-Regular,
+ BoldFont = NotoSerifCJKsc-Bold,
+ ItalicFont = NotoSerifCJKsc-Regular,
+ BoldItalicFont = NotoSerifCJKsc-Bold,
+ ItalicFeatures = FakeSlant,
+ BoldItalicFeatures = FakeSlant
+ ] { Noto~Serif~CJK~SC }
+ \setCJKsansfont
+ [
+ UprightFont = NotoSansCJKsc-Regular,
+ BoldFont = NotoSansCJKsc-Bold,
+ ItalicFont = NotoSansCJKsc-Regular,
+ BoldItalicFont = NotoSansCJKsc-Bold,
+ ItalicFeatures = FakeSlant,
+ BoldItalicFeatures = FakeSlant
+ ] { Noto~Sans~CJK~SC }
+ \setCJKmonofont { Noto~Sans~Mono~CJK~SC }
+ \setCJKfamilyfont { zhsong } { Noto~Serif~CJK~SC }
+ \setCJKfamilyfont { zhhei } { Noto~Sans~CJK~SC }
+ \setCJKfamilyfont { zhfs } { FZFangSong-Z02 }
+ \setCJKfamilyfont { zhkai } { FZKai-Z03 }
+ [AutoFakeBold=2.17]
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_source:}
+% \changes{v0.14}{2021/12/20}{增加 Adobe Source Han 作为思源字体。}
+% Source Han 思源字体。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_source:
+ {
+ \setCJKmainfont
+ [
+ UprightFont = SourceHanSerifSC-Regular,
+ BoldFont = SourceHanSerifSC-Bold,
+ ItalicFont = SourceHanSerifSC-Regular,
+ BoldItalicFont = SourceHanSerifSC-Bold,
+ ItalicFeatures = FakeSlant,
+ BoldItalicFeatures = FakeSlant
+ ] { Source~Han~Serif~SC }
+ \setCJKsansfont
+ [
+ UprightFont = SourceHanSansSC-Regular,
+ BoldFont = SourceHanSansSC-Bold,
+ ItalicFont = SourceHanSansSC-Regular,
+ BoldItalicFont = SourceHanSansSC-Bold,
+ ItalicFeatures = FakeSlant,
+ BoldItalicFeatures = FakeSlant
+ ] { Source~Han~Sans~SC }
+ \setCJKmonofont { FZFangSong-Z02 }
+ \setCJKfamilyfont { zhsong } { Source~Han~Serif~SC }
+ \setCJKfamilyfont { zhhei } { Source~Han~Sans~SC }
+ \setCJKfamilyfont { zhfs } { FZFangSong-Z02 }
+ \setCJKfamilyfont { zhkai } { FZKai-Z03 }
+ [AutoFakeBold=2.17]
}
% \end{macrocode}
% \end{macro}
%
+%
+% \subsubsection{定义数学字库}
+%
+% \begin{macro}{\@@_load_math_font:}
+% 设置数学字体 (XITS, 或者 \href{https://www.stixfonts.org}{STIX}, 与 Times New Roman 最为相近)
+% 通用数学字体。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_math_font:
+ {
+ % \setmathfont{STIXTwoMath-Regular}[Extension = .otf]
+ \setmathfont{XITSMath-Regular}[
+ BoldFont = XITSMath-Bold,
+ Extension = .otf]
+ \setmathfont{NewCMMath-Regular.otf}[range={cal,bb,frak}]
+ \setmathfont{NewCMMath-Regular.otf}[version=bold,range={bfcal}]
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsubsection{载入指定字库}
%
% 载入字体命令。
@@ -2386,31 +3078,27 @@ through XeTeX.
\use:c { @@_load_latin_font_ \g_@@_latin_font_tl : }
\use:c { @@_load_cjk_font_ \g_@@_cjk_font_tl : }
% \end{macrocode}
+% \changes{v0.10}{2021/09/28}{修正了数学字体。}
+% \begin{macrocode}
+ \@@_load_math_font:
+% \end{macrocode}
% 自行定义 C\hologo{TeX} 中的四类字体命令。
% \begin{macrocode}
- \NewDocumentCommand \songti { } { \CJKfamily{zhsong} }
- \NewDocumentCommand \heiti { } { \CJKfamily{zhhei} }
- \NewDocumentCommand \fangsong { } { \CJKfamily{zhfs} }
- \NewDocumentCommand \kaishu { } { \CJKfamily{zhkai} }
- \RenewDocumentCommand \large { } { \zihao{4} }
- }
+ \NewDocumentCommand \songti { } { \CJKfamily { zhsong } }
+ \NewDocumentCommand \heiti { } { \CJKfamily { zhhei } }
+ \NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } }
+ \NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } }
% \end{macrocode}
-%
-% 载入设置的字体。
+% 重定义字号命令。
% \begin{macrocode}
-\@@_load_font:
+ \RenewDocumentCommand \large { } { \zihao { 4 } }
+ }
% \end{macrocode}
%
-% \changes{v0.10}{2021/09/28}{修正了数学字体。}
-%
-% 设置数学字体 (XITS, 或者 \href{https://www.stixfonts.org}{STIX}, 与 Times New Roman 最为相近)
+% 载入设置的字体。此处设置与文档类一同载入,否则在导言区后载入字体可能导致一部分覆盖字体的命令失效。
% \begin{macrocode}
-% \setmathfont{STIXTwoMath-Regular}[Extension = .otf]
-\setmathfont{XITSMath-Regular}[
- BoldFont = XITSMath-Bold,
- Extension = .otf]
-\setmathfont{NewCMMath-Regular.otf}[range={cal,bb,frak}]
-\setmathfont{NewCMMath-Regular.otf}[version=bold,range={bfcal}]
+% \BeforeBeginEnvironment { document } { \@@_load_font: }
+\@@_load_font:
% \end{macrocode}
%
%
@@ -2423,25 +3111,31 @@ through XeTeX.
\geometry
{
vmargin = 2.5 cm,
- hmargin = 3.2 cm,
+ hmargin = 3.2 cm,
headheight = 15 pt
}
% \end{macrocode}
%
+% 草稿模式下显示页面文字范围边界以及页眉、页脚线。
+% \begin{macrocode}
+\bool_if:NT \g_@@_draft_bool { \geometry { showframe } }
+% \end{macrocode}
+%
+%
% \subsubsection{页眉页脚}
%
% 本科生页眉页脚。要求无页眉,页脚居中,页码使用五号新罗马体数字。
% \begin{macrocode}
\fancypagestyle { plain }
{
- \fancyhf { }
+ \fancyhf { }
\fancyfoot [ C ] { \zihao{5} \thepage }
\RenewDocumentCommand \headrulewidth { } { 0 pt }
\RenewDocumentCommand \footrulewidth { } { 0 pt }
}
% \end{macrocode}
%
-% 研究生页眉页脚。页眉为横线,奇数页显示章名,偶数页显示节名;页脚为页码。
+% 研究生页眉页脚。页眉为横线,奇数页显示章名,偶数页显示节名;页脚为页码。
% \begin{macrocode}
\fancypagestyle{headings}
{
@@ -2451,7 +3145,7 @@ through XeTeX.
\fancyfoot [ C ] { \zihao{5} \thepage }
\RenewDocumentCommand \headrulewidth { } { 0.4 pt }
\RenewDocumentCommand \footrulewidth { } { 0 pt }
- \setlength { \headheight } { 20 pt }
+ \setlength { \headheight } { 20 pt }
}
% \end{macrocode}
%
@@ -2460,7 +3154,7 @@ through XeTeX.
% 此命令仅为解决原 \cls{book} 类中使用小写罗马字母序号的冲突,并不建议使用。
% \begin{macrocode}
\RenewDocumentCommand \frontmatter { }
- {
+ {
\cleardoublepage
\pagestyle{empty}
\pagenumbering{Roman}
@@ -2471,21 +3165,22 @@ through XeTeX.
% \begin{macro}{\mainmatter}
% \changes{v0.12}{2021/12/03}{修复了摘要页字体格式泄漏到正文的问题。}
% \changes{v0.12}{2021/12/03}{修复了页眉上长标题重叠的问题。}
-% 重定义 \cs{mainmatter},在论文主体部分载入页眉页脚设置,并重新进行数字编号。
+% 重定义 \cs{mainmatter},在论文主体部分载入页眉页脚设置,使用阿拉伯数字重新进行页码编号。
% \begin{macrocode}
\RenewDocumentCommand \mainmatter { }
{
\cleardoublepage
- \int_compare:nTF { \l_@@_info_degree_int == 1 }
- { \pagestyle{plain} } { \pagestyle{headings} }
- \pagenumbering{arabic}
- \normalfont\normalsize
+ \int_compare:nTF { \l_@@_info_degree_int == 1 }
+ { \pagestyle { plain } } { \pagestyle { headings } }
+ \pagenumbering { arabic }
+ \normalfont \normalsize
}
% \end{macrocode}
% \end{macro}
%
+%
% \subsection{章节标题格式}
-%
+%
% \begin{macro}{\c_@@_sec_format_tl}
% 各部分章节以及目录中章标题的格式。设置为四号、不加粗、黑体。
% \begin{macrocode}
@@ -2493,6 +3188,18 @@ through XeTeX.
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\njuchapter}
+% 含有目录和 PDF 标签的无编号章。
+% \begin{macrocode}
+\NewDocumentCommand \njuchapter { m }
+ {
+ \chapter* { #1 }
+ \addcontentsline { toc } { chapter } { \c_@@_sec_format_tl #1 }
+ \@mkboth { #1 } { #1 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
\ctexset
{
@@ -2509,35 +3216,15 @@ through XeTeX.
% \subsection{目录格式}
% \changes{v0.13}{2021/12/09}{删除 \pkg{tocloft},改用 \pkg{ctex} 内置的目录设置。}
%
-% \begin{macro}{\@@_chapter_in_toc:n}
-% 将无编号章插入目录。
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_chapter_in_toc:n #1
- { \addcontentsline { toc } { chapter } { \c_@@_sec_format_tl #1 } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\njuchapter}
-% 含有目录和 PDF 标签的无编号章。
-% \begin{macrocode}
-\NewDocumentCommand \njuchapter { m }
- {
- \chapter*{#1}
- \addcontentsline { toc } { chapter } { \c_@@_sec_format_tl #1}
- \@mkboth{#1}{#1}
- }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
\ctexset
{
% \end{macrocode}
-% 设置目录标题名称。
+% 设置目录标题默认名称。
% \begin{macrocode}
- contentsname = {目\hspace{2em}录},
- listfigurename = {插图清单},
- listtablename = {表格清单},
+ contentsname = { 目\hspace{2em}录 },
+ listfigurename = { 插图目录 },
+ listtablename = { 表格目录 },
% \end{macrocode}
% 设置目录中章标题的样式。
% \begin{macrocode}
@@ -2545,23 +3232,16 @@ through XeTeX.
}
% \end{macrocode}
%
-% \begin{macro}{\c_@@_toc_title_tl}
-% 目录页标题格式,单独设置为三号粗宋体。
-% \begin{macrocode}
-\tl_const:Nn \c_@@_toc_title_tl { \centering \zihao{3} \bf }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_modify_toc_title:nn}
-% 通过 group 内修改标题设置,改变标题页字体。
+% 通过 group 内修改标题设置,将目录页标题格式单独设置为三号粗宋体。
% \begin{macrocode}
\cs_new_protected:Npn \@@_modify_toc_title:nn #1#2
{
\group_begin:
- \ctexset { chapter/format = \c_@@_toc_title_tl }
+ \ctexset { chapter/format = \centering \zihao{3} \bf }
\njuchapter { #1 }
\group_end:
- \@starttoc{#2}
+ \@starttoc { #2 }
}
% \end{macrocode}
% \end{macro}
@@ -2581,70 +3261,111 @@ through XeTeX.
%
% \subsection{参考文献}
%
-% biblatex设置
-% \begin{macrocode}
-\RequirePackage[
- style=gb7714-2015,
- %style=numeric-comp,
- %citestyle=authortitle-icomp,
- % citestyle=numeric-comp,
- %bibstyle=authoryear,
- % bibstyle=numeric,
- sorting=none,
- %sorting=nyt,
- %sortcites=true,
- %autocite=footnote,
- backend=biber, % Compile the bibliography with biber
- hyperref=true,
- backref=false,
- citecounter=true,
- pagetracker=true,
- citetracker=true,
- ibidtracker=context,
- autopunct=true,
- autocite=plain,
- % gbpub=false, % Uncomment if you do NOT want '[S.l. : s.n.]'
- % in reference entries, GitHub Issue (#47)
- % gbnamefmt=lowercase, % Uncomment if you do NOT want uppercase author
- % names in reference entries, GitHub Issue (#23)
-]{biblatex}
+% \begin{macrocode}
+\keys_define:nn { nju / bib }
+ {
+% \end{macrocode}
+% \begin{macro}{bib/style}
+% \changes{v0.14}{2021/12/19}{提供选择参考文献样式的接口。}
+% 参考文献样式。分为顺序编码制 \opt{numeric}(\opt{gb7714-2015} 样式)和著者-出版年制 \opt{author-year}(\opt{gb7714-2015ay} 样式)。用户选取的样式会被加入选项列表中,以待传进 \pkg{biblatex} 宏包。
+% \begin{macrocode}
+ style .choice:,
+ style / numeric .code:n =
+ { \clist_set:Nn \l_@@_tmp_clist { style = gb7714-2015 } },
+ style / author-year .code:n =
+ { \clist_set:Nn \l_@@_tmp_clist { style = gb7714-2015ay } },
+ style .initial:n = numeric,
% \end{macrocode}
+% \end{macro}
+% \begin{macro}{bib/resource}
+% \changes{v0.14}{2021/12/19}{提供批量导入参考文献数据源的接口。}
+% 参考文献数据源。
+% \begin{macrocode}
+ resource .clist_set:N = \l_@@_bib_resource_clist
+ }
+% \end{macrocode}
+% \end{macro}
%
-% \changes{v0.12}{2021/12/06}{设置输出参考文献的默认选项。}
-% 设置参考文献名称
+% \begin{macro}{\addbibresource}
+% 为了吸收用户在导言区设置的选项,\pkg{biblatex} 宏包被设置在导言区末尾才会载入。此处单独定义了可以在导言区使用的 \cs{addbibresource} 命令,用于兼容传统的添加参考文献数据源的方法。
% \begin{macrocode}
-\ctexset{ bibname = {参考文献} }
+\NewDocumentCommand \addbibresource { m }
+ { \clist_gput_right:Nn \l_@@_bib_resource_clist { #1 } }
% \end{macrocode}
-% 修改参考文献的头部样式并插入目录。
+% \end{macro}
+%
+% \begin{macro}{\@@_biblatex_pre_setup:}
+% 载入 \pkg{biblatex} 宏包前,必须禁用自行定义的 \cs{addbibresource} 命令,并传入用户设置的选项。
% \begin{macrocode}
-\defbibheading { njubib } [ \bibname ] { \njuchapter { #1 } }
-\DeclarePrintbibliographyDefaults { heading = njubib }
+\cs_new_protected:Npn \@@_biblatex_pre_setup:
+ {
+ \cs_undefine:N \addbibresource
+ \clist_put_right:Nn \l_@@_tmp_clist { backend = biber }
+ \exp_args:NV \PassOptionsToPackage \l_@@_tmp_clist { biblatex }
+ \clist_clear:N \l_@@_tmp_clist
+ }
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\@@_biblatex_post_setup:}
+% \pkg{biblatex} 宏包载入后的设置。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_biblatex_post_setup:
+ {
+% \end{macrocode}
+% \changes{v0.12}{2021/12/06}{设置输出参考文献的默认选项。}
+% 修改参考文献的头部样式,自动添加目录条目。
+% \begin{macrocode}
+ \defbibheading { njubib } [ \bibname ] { \njuchapter { ##1 } }
+ \DeclarePrintbibliographyDefaults { heading = njubib }
+% \end{macrocode}
+% 传入参考文献源文件,此时可正常使用 \cs{addbibresource} 命令。
+% \begin{macrocode}
+ \clist_map_inline:Nn \l_@@_bib_resource_clist
+ { \addbibresource { ##1 } }
+% \end{macrocode}
% 忽略不需要的文献信息。
% \begin{macrocode}
-\AtEveryBibitem
+ \AtEveryBibitem
+ {
+ \clist_map_inline:nn
+ { abstract, issn, isbn, archivePrefix, arxivId, pmid, eprint }
+ { \clearfield { ##1 } }
+ % \ifentrytype{online} { }
+ % {
+ % \ifentrytype{misc} { }
+ % \clearfield{urldate} { \clearfield{url} }
+ % }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 使用 \pkg{etoolbox} 提供的 \tn{BeforeBeginEnvironment},在 \env{document} 环境开始的钩子前载入 \pkg{biblatex} 并进行相关设置。
+% \begin{macrocode}
+%\hook_gset_rule:nnnn { begindocument/before } { . } { < } { xeCJK }
+%\hook_gput_code:nnn { env/document/begin } { . }
+\BeforeBeginEnvironment { document }
{
- \clist_map_inline:nn
- { abstract, issn, isbn, archivePrefix, arxivId, pmid, eprint }
- { \clearfield { #1 } }
- \ifentrytype{online}{}{\ifentrytype{misc}{}{\clearfield{url}}}
+ \@@_biblatex_pre_setup:
+ \RequirePackage { biblatex }
+ \@@_biblatex_post_setup:
}
% \end{macrocode}
%
%
% \subsection{引用}
%
-% \pkg{hyperref} 设置。
+% 在导言区末尾进行 \pkg{hyperref} 设置。
% \changes{v0.11}{2021/10/01}{写入PDF元数据。}
% \begin{macrocode}
\ctex_at_end_preamble:n
{
% \end{macrocode}
-% 清除标题中用于手动换行的 |!| 控制符。
+% 忽略 PDF 字符串中的换行符,从而抑制 \pkg{hyperref} 警告。
% \begin{macrocode}
- \tl_set_eq:NN \l_@@_tmp_tl \l_@@_info_title_tl
- \tl_remove_all:Nn \l_@@_tmp_tl { ! }
+ \pdfstringdefDisableCommands
+ { \cs_set_eq:NN \\ \prg_do_nothing: }
\hypersetup
{
bookmarksnumbered = true,
@@ -2654,7 +3375,7 @@ through XeTeX.
% \end{macrocode}
% 填写 PDF 元信息。
% \begin{macrocode}
- pdftitle = \l_@@_tmp_tl,
+ pdftitle = \l_@@_info_title_tl,
pdfauthor = \l_@@_info_author_tl,
pdfkeywords = \l_@@_info_keywords_clist,
pdfcreator = \c_@@_name_pdf_creator_tl
@@ -2662,26 +3383,23 @@ through XeTeX.
}
% \end{macrocode}
%
-% \begin{macro}{\@@_cref_name:n,\@@_cref_name:N }
+% \begin{macro}{\@@_cref_name:n,}
% 用于修改 \pkg{cleverref} 的标签名称的辅助函数。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cref_name:n #1
{
\clist_map_inline:nn { #1 }
- { \crefname { ##1 } { \@@_name:n { ##1 } } { \@@_name:n { ##1 _en } } }
- }
-\cs_new_protected:Npn \@@_cref_name:N #1
- {
- \clist_map_inline:Nn #1
- { \crefname { ##1 } { \@@_name:n { ##1 } } { \@@_name:n { ##1 _en } } }
+ {
+ \crefname { ##1 }
+ { \@@_name:n { ##1 } } { \@@_name:n { ##1 _en } }
+ }
}
% \end{macrocode}
% \end{macro}
%
-% 修改 \pkg{cleverref} 的标签格式。
-% 默认在名称后面添加空格,删除公式编号的括号。
+% 修改 \pkg{cleverref} 的标签格式。默认在名称后面添加空格,删除公式编号的括号。
% \begin{macrocode}
-\crefdefaultlabelformat{#2#1#3\,}
+\crefdefaultlabelformat { #2#1#3\, }
\crefformat { equation } { 公式~#2#1#3~ }
\crefformat { chapter } { 第#2#1#3章 }
\crefformat { section } { 第~#2#1#3~节 }
@@ -2692,19 +3410,17 @@ through XeTeX.
% 修改 \pkg{cleverref} 的标签名称。
% \begin{macrocode}
\@@_cref_name:n { figure, table, appendix, proof }
-\@@_cref_name:N \c_@@_theorem_type_clist
+\exp_args:NV \@@_cref_name:n \c_@@_theorem_type_clist
% \end{macrocode}
%
%
-% \subsection{图表浮动体}
-%
-% \subsubsection{图片表格}
+% \subsection{图片表格}
%
% 设置默认图片扩展名,允许在不键入扩展名时自动进行补全。
% \begin{macrocode}
-\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png}
+\DeclareGraphicsExtensions { .pdf, .eps, .jpg, .png }
% \end{macrocode}
-%
+%
% \changes{v0.12}{2021/12/06}{删除了可能导致冲突的 \pkg{floatrow}。}
% 图表标题样式。文字设置为五号宋体,标签设置为粗体,间隔一个全角空格。
% \begin{macrocode}
@@ -2719,63 +3435,15 @@ through XeTeX.
\captionsetup [ table ] { style = njucap }
% \end{macrocode}
%
-%
-% \subsubsection{代码环境}
-%
-% 使用 \pkg{listings} 设置代码环境基本样式。
-% \begin{macrocode}
-\lstdefinestyle { njulisting }
- {
- basewidth = 0.5 em,
- lineskip = 3 pt,
- basicstyle = \tiny\tt,
- keywordstyle = \bf,
- commentstyle = \it\color{gray},
- numbers = left,
- captionpos = t,
- breaklines = true,
- xleftmargin = 2 em,
- xrightmargin = 2 em
- }
-% \end{macrocode}
-%
-% 设置代码环境通用样式。
-% \begin{macrocode}
-\lstset
- {
- style = njulisting,
- flexiblecolumns
- }
-% \end{macrocode}
-%
-% \changes{v0.13}{2021/12/13}{提供简化的行内代码环境。}
-% 上述调整会污染 \tn{lstinline} 的字体大小,因此单独设置用于生成行内代码的简略抄录环境。
-% 此处由于使用到了单独的字符,需要暂时关闭 \hologo{LaTeX3} 语法。
-% \begin{macrocode}
-\ExplSyntaxOff
-\lstMakeShortInline[
- style=njulisting,
- basicstyle=\normalsize\tt,
- columns=fixed]|
-\ExplSyntaxOn
-% \end{macrocode}
%
-%
-% \subsubsection{列表环境}
+% \subsection{列表环境}
% \changes{v0.12}{2021/12/07}{删除了 \pkg{enumitem} 的部分列表环境设置。}
% \begin{macrocode}
\setlist { noitemsep }
% \end{macrocode}
%
-%
-% \subsection{定理环境}
%
-% \begin{macro}{\mathbi}
-% Math bold italic letters
-% \begin{macrocode}
-\NewDocumentCommand\mathbi{m}{\textbf{\em #1}}
-% \end{macrocode}
-% \end{macro}
+% \subsection{定理环境}
%
% \begin{macro}{\@@_new_theorem:N}
% 用于定义普通定理环境的辅助函数。
@@ -2785,7 +3453,7 @@ through XeTeX.
% 除证明以外的环境都不需要证毕符号,在此清空其设置。
% \begin{macrocode}
\cs_new_protected:Npn \@@_new_theorem:N #1
- {
+ {
\theoremsymbol { }
\clist_map_inline:Nn #1
{ \newtheorem { ##1 } { \@@_name:n { ##1 } } }
@@ -2793,7 +3461,7 @@ through XeTeX.
% \end{macrocode}
% \end{macro}
%
-% 定义证明环境。证毕符号使用 \tn{mdlgwhtsquare}绘制,对应于 |U+25A1| 字符\footnote{\url{https://tex.stackexchange.com/questions/567135/how-get-box-like-symbol-with-xelatex}}。
+% 定义证明环境。证毕符号使用 \tn{mdlgwhtsquare} 绘制,对应于 |U+25A1| 字符\footnote{\url{https://tex.stackexchange.com/questions/567135/how-get-box-like-symbol-with-xelatex}}。
% \begin{macrocode}
\theoremsymbol { \ensuremath { \mdwhtsquare } }
\newtheorem* { proof } { \c_@@_name_proof_tl }
@@ -2814,17 +3482,17 @@ through XeTeX.
% \begin{macrocode}
\cs_new_protected:Npn \@@_split_title:n #1
{
- \tl_if_in:VnTF { #1 } { ! }
+ \tl_if_in:VnTF { #1 } { \\ }
{
% \end{macrocode}
-% 从英文感叹号进行分割,存入 |clist|。
+% 从 |\\| 进行分割,存入 |clist|。
% \begin{macrocode}
- \seq_set_split:NnV \l_@@_tmp_seq { ! } { #1 }
+ \seq_set_split:NnV \l_@@_tmp_seq { \\ } { #1 }
\clist_set_from_seq:NN \l_@@_tmp_clist \l_@@_tmp_seq
}
- {
+ {
% \end{macrocode}
-% 如果没找到感叹号,则手动进行分割固定宽度的字符。
+% 如果没找到换行符,则手动从固定宽度的位置进行分割。
% \begin{macrocode}
\@@_put_inempty_seg:nnn { #1 } { 1 } { 15 }
\@@_put_inempty_seg:nnn { #1 } { 16 } { 15 }
@@ -2856,7 +3524,7 @@ through XeTeX.
% \begin{macro}{\@@_cover_entry:nnn}
% 生成单项信息条目。
% \begin{arguments}
-% \item 条目
+% \item 条目名称
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \end{arguments}
@@ -2865,7 +3533,7 @@ through XeTeX.
{
\@@_spread_box:nnn { #2 } { \kaishu } { \@@_name:n { #1 } }
\@@_hskip:
- \@@_ulined_center_box:nn { #3 } { \@@_info:n { #1 } }
+ \@@_ulined_center_box:nn { #3 } { \@@_info:n { #1 } }
\@@_vskip:
}
% \end{macrocode}
@@ -2874,8 +3542,8 @@ through XeTeX.
% \begin{macro}{\@@_cover_bientry:nnnn}
% 生成两项信息条目,仅用于本科生封面。
% \begin{arguments}
-% \item 左侧条目
-% \item 右侧条目
+% \item 左侧条目名称
+% \item 右侧条目名称
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \end{arguments}
@@ -2884,11 +3552,35 @@ through XeTeX.
{
\@@_spread_box:nnn { #3 } { \kaishu } { \@@_name:n { #1 } }
\@@_hskip:
- \@@_ulined_center_box:nn { #4 } { \@@_info:n { #1 } }
+ \@@_ulined_center_box:nn { #4 } { \@@_info:n { #1 } }
\skip_horizontal:n { 0.5 em }
\@@_spread_box:nnn { #3 } { \kaishu } { \@@_name:n { #2 } }
\@@_hskip:
- \@@_ulined_center_box:nn { #4 } { \@@_info:n { #2 } }
+ \@@_ulined_center_box:nn { #4 } { \@@_info:n { #2 } }
+ \@@_vskip:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_cover_supv_entry:nnn}
+% 生成两项导师信息条目,仅用于本科生封面。
+% \begin{arguments}
+% \item 条目名称
+% \item 长内容盒子宽度,|dim| 型变量
+% \item 短内容盒子宽度,|dim| 型变量
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_supv_entry:nnn #1#2#3
+ {
+ \@@_spread_box:nnn { #2 } { \kaishu } { \@@_name:n { #1 } }
+ \@@_hskip:
+ \@@_ulined_center_box:nn { #3 }
+ { \clist_item:cn { l_@@_info_ #1 _clist } { 1 } }
+ \skip_horizontal:n { 0.5 em }
+ \@@_spread_box:nnn { #2 } { \kaishu } { \c_@@_name_supv_ttl_tl }
+ \@@_hskip:
+ \@@_ulined_center_box:nn { #3 }
+ { \clist_item:cn { l_@@_info_ #1 _clist } { 2 } }
\@@_vskip:
}
% \end{macrocode}
@@ -2897,11 +3589,79 @@ through XeTeX.
%
% \subsubsection{绘制部件}
%
+% \begin{macrocode}
+\keys_define:nn { nju / style }
+ {
+% \end{macrocode}
+% \begin{macro}{style/emblem-img}
+% \changes{v0.14}{2021/12/23}{提供选择外置校徽图片的接口。}
+% 校徽图片路径。
+% \begin{macrocode}
+ emblem-img .tl_set:N = \l_@@_emblem_img_tl,
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{style/name-img}
+% \changes{v0.14}{2021/12/23}{提供选择外置校名图片的接口。}
+% 校名图片路径。
+% \begin{macrocode}
+ name-img .tl_set:N = \l_@@_name_img_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 根据导言区载入的用户设置进行一些处理。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+% \end{macrocode}
+% \begin{macro}{\njuemblem,\njuname}
+% 如果用户在定义了图片的路径,则覆盖 \pkg{njuvisual} 提供的绘制命令。
+% \begin{macrocode}
+ \tl_if_empty:NF \l_@@_emblem_img_tl
+ {
+ \RenewDocumentCommand \njuemblem { o m m }
+ { \includegraphics [ width = #2, height = #3 ]
+ { \l_@@_emblem_img_tl } }
+ }
+ \tl_if_empty:NF \l_@@_name_img_tl
+ {
+ \RenewDocumentCommand \njuname { o m m }
+ { \includegraphics [ width = #2, height = #3 ]
+ { \l_@@_name_img_tl } }
+ }
+% \end{macrocode}
+% \end{macro}
+% 将 ISO 格式的原始日期字符串格式化为中文日期表示,该字符串需要进行展开。
+% \begin{macrocode}
+ \tl_set:Nn \l_@@_info_sm_date_tl
+ {
+ \exp_last_unbraced:NV
+ \@@_date:www \l_@@_info_sm_date_raw_tl \q_stop
+ }
+% \end{macrocode}
+% 英文提交日期以及答辩日期仅用于研究生封面。
+% \begin{macrocode}
+ \int_compare:nF { \l_@@_info_degree_int == 1 }
+ {
+ \tl_set:Nn \l_@@_info_sm_date_en_tl
+ {
+ \exp_last_unbraced:NV
+ \@@_date_en:www \l_@@_info_sm_date_raw_tl \q_stop
+ }
+ \tl_set:Nn \l_@@_info_df_date_tl
+ {
+ \exp_last_unbraced:NV
+ \@@_date:www \l_@@_info_df_date_raw_tl \q_stop
+ }
+ }
+ }
+% \end{macrocode}
+%
% \begin{macro}{\@@_cover_title_ug:}
% 本科生封面标题。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_title_ug:
- { \@@_spread_box:nnn { 9em } { \bf } { \l_@@_info_type_tl } }
+ { \@@_spread_box:nnn { 9 em } { \bf } { \l_@@_info_type_tl } }
% \end{macrocode}
% \end{macro}
%
@@ -2917,16 +3677,16 @@ through XeTeX.
{
\begin{minipage} [ c ] { #1 + #2 + 0.3 em }
\raggedleft
- \@@_cover_entry:nnn { dept } { #1 } { #2 }
- \@@_cover_entry:nnn { major } { #1 } { #2 }
- \@@_multiline_title:nnn { \bf } { #1 } { #2 }
+ \@@_cover_entry:nnn { dept } { #1 } { #2 }
+ \@@_cover_entry:nnn { major } { #1 } { #2 }
+ \@@_multiline_title:nnn { \bf } { #1 } { #2 }
\@@_cover_bientry:nnnn { grade } { id } { #1 } { #3 }
- \@@_cover_entry:nnn { author } { #1 } { #2 }
- \@@_cover_bientry:nnnn { supv } { supv_ttl } { #1 } { #3 }
- \tl_if_blank:VF { \l_@@_info_supv_ii_tl }
- { \@@_cover_bientry:nnnn { supv_ii } { supv_ttl } { #1 } { #3 } }
- \@@_cover_entry:nnn { sm_date } { #1 } { #2 }
- \end{minipage}
+ \@@_cover_entry:nnn { author } { #1 } { #2 }
+ \@@_cover_supv_entry:nnn { supv } { #1 } { #3 }
+ \bool_if:NT \l_@@_second_supv_bool
+ { \@@_cover_supv_entry:nnn { supv_ii } { #1 } { #3 } }
+ \@@_cover_entry:nnn { sm_date } { #1 } { #2 }
+ \end{minipage}
}
% \end{macrocode}
% \end{macro}
@@ -2962,7 +3722,7 @@ through XeTeX.
% \end{macro}
%
% \begin{macro}{\@@_cover_back_g:}
-% 研究生封面背面信息。
+% 研究生封面背面信息。格式存在变化,没有使用循环来简化。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_back_g:
{
@@ -2993,7 +3753,7 @@ through XeTeX.
% 作者。
% \begin{macrocode}
\group_begin: \zihao { 4 } { by } \group_end: \@@_vskip:
- \group_begin:
+ \group_begin:
\bf \sffamily \zihao { 4 } \l_@@_info_author_en_tl
\group_end: \skip_vertical:n { 1 cm }
% \end{macrocode}
@@ -3009,7 +3769,7 @@ through XeTeX.
\c_@@_cover_en_text_tl \@@_vskip:
\textsc { \clist_item:Nn \c_@@_name_degree_en_clist
{ \l_@@_info_degree_int } }
- \@@_vskip: { in } \@@_vskip:
+ \@@_vskip: { in } \@@_vskip:
\l_@@_info_major_en_tl \skip_vertical:n { 1 cm }
% \end{macrocode}
% 校徽。
@@ -3051,7 +3811,7 @@ through XeTeX.
\@@_split_title:n { \l_@@_info_title_tl }
\@@_multiline_box:nnnn { \l_@@_tmp_int } \l_@@_tmp_clist { 3 } { 15 em }
\@@_vskip: \zihao{4} \c_@@_name_title_nl_tl
- \@@_vskip: \zihao{1}
+ \@@_vskip: \zihao{1}
\@@_ulined_center_box:nn { 4.5 em } { \l__nju_info_author_tl }
\@@_vskip: \zihao{4} { ( } \c_@@_name_author_tl { ) }
}
@@ -3063,11 +3823,15 @@ through XeTeX.
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_info_nl:
{
+ \tl_set:Nn \l_@@_info_supv_tl
+ { \clist_item:Nn \l_@@_info_supv_clist { 1 } }
+ \tl_set:Nn \l_@@_info_supv_ttl_tl
+ { \clist_item:Nn \l_@@_info_supv_clist { 2 } }
\@@_uline_entry:nnnn \l_@@_tmp_dim { supv_info } { supv } { } \\
\@@_ulined_center_box:nn { \textwidth } { \@@_info:n { supv_ttl }
\@@_quad: \@@_info:n { supv_cont } } \\
\@@_uline_bientry:nnnn \l_@@_tmp_dim { degree } { degree } { }
- \@@_uline_bientry:nnnn \l_@@_tmp_dim { major_nl } { major } { } \\
+ \@@_uline_bientry:nnnn \l_@@_tmp_dim { major_nl } { major } { } \\
\@@_uline_bientry:nnnn \l_@@_tmp_dim { sm_date } { sm_date } { }
\@@_uline_bientry:nnnn \l_@@_tmp_dim { df_date } { df_date } { } \\
\@@_full_uline:Nn \l_@@_tmp_dim { \c_@@_name_confer_tl }
@@ -3104,9 +3868,9 @@ through XeTeX.
% 校徽、校名。
% \begin{macrocode}
\null \skip_horizontal:n { -1 cm }
- \njuemblem [ black] { ! } { 3.35 cm }
- \begin{center}
- \njuname[black]{!}{3cm} \@@_vskip:
+ \njuemblem [ black ] { ! } { 3.35 cm }
+ \begin{center}
+ \njuname [ black ] { ! } { 3 cm } \@@_vskip:
% \end{macrocode}
% 学位信息。
% \begin{macrocode}
@@ -3115,7 +3879,7 @@ through XeTeX.
% \end{macrocode}
% 信息栏。
% \begin{macrocode}
- \zihao{3} \@@_cover_info_ug:nnn { 4.2 em } { 16 em } { 5.5 em } \vfil
+ \zihao{3} \@@_cover_info_ug:nnn { 4.2 em } { 16 em } { 5.5 em } \vfil
\end{center}
}
% \end{macrocode}
@@ -3126,7 +3890,7 @@ through XeTeX.
% 生成研究生封面。
% \begin{macrocode}
\cs_new_protected:Npn \@@_make_cover_g:
- {
+ {
\newpage
\begin{center}
% \end{macrocode}
@@ -3141,7 +3905,7 @@ through XeTeX.
\group_begin:
\zihao { -1 } \bf \kaishu \@@_cover_title_g:
\group_end:
- \skip_vertical:n { 3 cm } \vfil
+ \skip_vertical:n { 3 cm } \vfil
% \end{macrocode}
% 信息栏。
% \begin{macrocode}
@@ -3152,7 +3916,7 @@ through XeTeX.
\group_end:
\end{center}
% \end{macrocode}
-% 背面。格式存在变化,没有使用循环来简化。
+% 背面。
% \begin{macrocode}
\newpage
\noindent \null \skip_vertical:n { 18 cm }
@@ -3196,7 +3960,7 @@ through XeTeX.
% \end{macrocode}
% 中部信息栏。
% \begin{macrocode}
- \group_begin:
+ \group_begin:
\kaishu \zihao { 4 } \noindent \@@_cover_info_nl:
\group_end:
% \end{macrocode}
@@ -3214,18 +3978,21 @@ through XeTeX.
% \end{macro}
%
% \begin{macro}{\@@_make_orig_decl: }
-% 生成学位论文原创性声明。
+% \changes{v0.13}{2021/12/15}{加入本科生的诚信承诺书。}
+% 生成生成本科生的诚信承诺书或研究生的学位论文原创性声明。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_make_orig_decl:
+\cs_new_protected:Npn \@@_make_orig_decl:
{
- \normalfont \normalsize
\chapter* { \c_@@_name_nju_tl \c_@@_name_orig_decl_tl }
\thispagestyle { empty }
\c_@@_orig_decl_text_tl
\vfil
\begin{flushright}
- \@@_name:n { orig_sign } \@@_uline:n { 7 em } \@@_vskip:
- \@@_name:n { orig_date } \@@_uline:n { 7 em }
+ \clist_set:Nn \l_@@_tmp_clist { orig_sign, id, orig_date }
+ \int_compare:nF { \l_@@_info_degree_int == 1 }
+ { \clist_remove_all:Nn \l_@@_tmp_clist { id } }
+ \clist_map_inline:Nn \l_@@_tmp_clist
+ { \@@_vskip: \@@_name:n { ##1 } : \@@_uline:n { 7 em } }
\end{flushright}
\vfil
}
@@ -3238,26 +4005,37 @@ through XeTeX.
% \begin{macro}{\maketitle}
% \changes{v0.12}{2021/12/01}{仅会生成国家图书馆封面或者普通封面之一。}
% \changes{v0.13}{2021/12/12}{重新绘制封面。}
+% \changes{v0.13}{2021/12/15}{草稿模式下不绘制封面。}
% 重定义 \cs{maketitle} 以生成封面。
-% 如果选择了 |nlcover|,就生成用于申请学位的国家图书馆封面和原创性声明,反之生成普通封面。
+% 在草稿模式下,封面绘制将被禁用,有助于提升编译速度。
% \begin{macrocode}
\RenewDocumentCommand \maketitle { }
{
- \pagestyle{empty}
- \bool_if:NTF \g_@@_nlcover_bool
- { \@@_make_cover_nl: \@@_make_orig_decl: }
- { \use:c { @@_make_cover_ \l_@@_info_diploma_tl : } }
+ \bool_if:NF \g_@@_draft_bool
+ {
+ \pagestyle { empty }
+% \end{macrocode}
+% 如果在研究生模板中选择了 \opt{nlcover},就生成用于申请学位的国家图书馆封面和原创性声明,反之生成普通封面。
+% \begin{macrocode}
+ \bool_if:NTF \g_@@_nlcover_bool
+ { \@@_make_cover_nl: }
+ { \use:c { @@_make_cover_ \l_@@_info_diploma_tl : } }
+% \end{macrocode}
+% 如果在选择了 \opt{decl-page},就生成本科生的诚信承诺书或研究生的原创性声明。
+% \begin{macrocode}
+ \bool_if:NT \g_@@_orig_decl_bool { \@@_make_orig_decl: }
+ }
% \end{macrocode}
-% 生成封面后清除标题中的换行控制符。
+% 生成封面后清除标题中的换行控制符,便于在摘要中输出。
% \begin{macrocode}
- \tl_remove_all:Nn \l_@@_info_title_tl { ! }
+ \tl_remove_all:Nn \l_@@_info_title_tl { \\ }
% \end{macrocode}
% 在标题页后使用大写罗马字母页码,恢复正常字体设置。
% \begin{macrocode}
\cleardoublepage
- \pagestyle{plain}
- \pagenumbering{Roman}
- \normalfont \normalsize
+ \pagestyle { plain }
+ \pagenumbering { Roman }
+ \normalfont \normalsize
}
% \end{macrocode}
% \end{macro}
@@ -3273,7 +4051,7 @@ through XeTeX.
% \item 宽度,|dim| 型变量
% \end{arguments}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_abs_title_uuline:n #1
+\cs_new_protected:Npn \@@_abs_title_uuline:n #1
{ \bf \kaishu \zihao { -2 } \@@_uuline:n { #1 } }
% \end{macrocode}
% \end{macro}
@@ -3284,23 +4062,28 @@ through XeTeX.
% \item 字号
% \end{arguments}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_abs_info_style:n #1
+\cs_new_protected:Npn \@@_abs_info_style:n #1
{ \noindent \zihao{ #1 } \kaishu }
-\cs_new_protected:Npn \@@_abs_info_style_en: #1 { \zihao{ #1 } }
+\cs_new_protected:Npn \@@_abs_info_style_en: #1
+ { \zihao{ #1 } }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_abs_bookmark:n}
-% 生成摘要的 PDF 书签。
-% \begin{arguments}
-% \item 语言,空置为中文,|_en| 为英文
-% \item 关键词分隔符
-% \end{arguments}
+% \begin{macro}{\@@_abs_bookmark:,\@@_abs_bookmark_en:}
+% \changes{v0.14}{2021/12/21}{将摘要插入目录。}
+% 生成摘要的目录条目。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_abs_bookmark:n #1
+\cs_new_protected:Npn \@@_abs_bookmark:
{
- \pdfbookmark [ 0 ]
- { \@@_name:n { abstract #1 } } { abstract #1 }
+ \phantomsection
+ \addcontentsline { toc } { chapter }
+ { \c_@@_sec_format_tl \c_@@_name_lang_tl \c_@@_name_abstract_tl }
+ }
+\cs_new_protected:Npn \@@_abs_bookmark_en:
+ {
+ \phantomsection
+ \addcontentsline { toc } { chapter }
+ { \c_@@_sec_format_tl \c_@@_name_abstract_en_tl }
}
% \end{macrocode}
% \end{macro}
@@ -3316,7 +4099,7 @@ through XeTeX.
% \begin{macrocode}
\cs_generate_variant:Nn \clist_map_inline:nn { Vn }
\cs_new_protected:Npn \@@_abs_title_ug:n #1
- {
+ {
\@@_name:n { nju } \@@_name:n { type }
\@@_name:n { lang #1 } \@@_name:n { abstract }
}
@@ -3361,7 +4144,7 @@ through XeTeX.
% \end{arguments}
% \begin{macrocode}
\cs_new_protected:Npn \@@_abs_title_g:n #1
- {
+ {
\@@_name:n { nju } \@@_info:n { type }
\@@_name:n { lang #1 } \@@_name:n { abstract_r }
}
@@ -3402,7 +4185,7 @@ through XeTeX.
\@@_ulined_center_box:nn { 4 em } { \l_@@_info_grade_tl }
\c_@@_name_grade_tl
\tl_item:nn { \l_@@_info_degree_tl } { 1 }
- \c_@@_name_author_r_tl #2
+ \c_@@_name_author_r_tl #2
}
\@@_ulined_center_box:nn { \l_@@_tmp_dim }
{ \l_@@_info_author_tl } \\
@@ -3417,7 +4200,7 @@ through XeTeX.
% \end{macrocode}
% 英文摘要环境。前两行为标题。
% \begin{macrocode}
- {
+ {
\@@_full_uline:NV \l_@@_tmp_dim
{ \clist_item:cn { c_@@_name_type #1 _clist }
{ \l_@@_info_type_int } # 2 }
@@ -3429,7 +4212,7 @@ through XeTeX.
% 使用循环输出专业、姓名、导师。注意这里将 |\\| 放置在前部,以避免末尾生成多余的换行符产生 |Underfull \vbox| 信息。
% \begin{macrocode}
\clist_map_inline:nn { major, author, supv_full }
- { \\
+ { \\
\@@_uline_entry:nnnn \l_@@_tmp_dim { ##1 _en } { ##1 _en } { #2 }
}
}
@@ -3453,8 +4236,8 @@ through XeTeX.
% \begin{macrocode}
\noindent \bf \heiti
\use:c { c_@@_name_keywords #1 _tl }
- \group_end:
- \clist_use:cn { l_@@_info_keywords #1 _clist } { #2 }
+ \group_end:
+ \clist_use:cn { l_@@_info_keywords #1 _clist } { #2 }
}
% \end{macrocode}
% \end{macro}
@@ -3496,80 +4279,95 @@ through XeTeX.
{
\begin{center}
\@@_abs_title_uuline:n { 19 em }
- \@@_abs_title_g:n { #1 }
+ \@@_abs_title_g:n { #1 }
\end{center}
\group_begin:
\@@_abs_info_style:n { 4 }
\@@_abs_info_g:nn { #1 } { #2 }
- \group_end: \@@_vskip:
+ \group_end: \@@_vskip:
}
% \end{macrocode}
% \end{macro}
%
%
% \subsubsection{用户接口}
-%
+%
% \begin{environment}{abstract}
% \changes{v0.13}{2021/12/12}{重新绘制摘要。}
% 中文摘要环境。
% \begin{macrocode}
\NewDocumentEnvironment{abstract} { +b }
- {
- \newpage
- \@@_abs_bookmark:n { }
+ {
+ \cleardoublepage
+ \@@_abs_bookmark:
\use:c { @@_make_abs_ \l_@@_info_diploma_tl :nn } { } { : }
- \group_begin: \normalfont \zihao { -4 } #1
+ \group_begin: \kaishu \zihao { -4 } #1
}
{ \@@_print_keywords:nn { } { ; } \group_end: }
% \end{macrocode}
% \end{environment}
-%
+%
% \begin{environment}{abstract*}
% 英文摘要环境。\pkg{xparse} 目前不支持合并带有星号的环境,因此需要单独定义。
% \begin{macrocode}
\NewDocumentEnvironment{abstract*} { +b }
- {
- \newpage
- \@@_abs_bookmark:n { _en }
+ {
+ \cleardoublepage
+ \@@_abs_bookmark_en:
\use:c { @@_make_abs_ \l_@@_info_diploma_tl :nn } { _en } { :~ }
- \group_begin: \normalfont \zihao{ -4 } #1
- }
+ \group_begin: \kaishu \zihao{ -4 } #1
+ }
{ \@@_print_keywords:nn { _en } { ;~ } \group_end: }
% \end{macrocode}
% \end{environment}
%
%
% \subsection{前言致谢}
-%
+%
% \begin{environment}{preface}
% \begin{environment}{acknowledgement}
% 单独制作的前言致谢页。
% \begin{macrocode}
-\NewDocumentEnvironment{preface} { +b }
- { \njuchapter { 前\hspace{2em}言 } #1 } { }
-\NewDocumentEnvironment{acknowledgement} { +b }
- { \njuchapter { 致\hspace{2em}谢 } #1 } { }
+\NewDocumentEnvironment { preface } { +b }
+ { \njuchapter { \c_@@_name_preface_tl } #1 } { }
+\NewDocumentEnvironment { acknowledgement } { +b }
+ { \njuchapter { \c_@@_name_acknowledgement_tl } #1 } { }
% \end{macrocode}
% \end{environment}
% \end{environment}
%
% \begin{macro}{\njupaperlist}
% \changes{v0.10}{2021/09/29}{新增了成果列表页面。}
-% 发表文章目录与合作文章目录。
-% \begin{macrocode}
-\NewDocumentCommand\njupaperlist { t* m }
- {
- \begin{refsection}
- \nocite{#2}
- \bool_if:NTF { #1 }
- { \printbibliography[heading=subbibliography,title=合作文章目录] }
- { \printbibliography[heading=subbibliography,title=发表文章目录] }
+% \changes{v0.14}{2021/12/20}{成果列表中可突出指定作者姓名及年份。}
+% 成果列表。
+% \begin{macrocode}
+\NewDocumentCommand \njupaperlist
+ { O { \c_@@_name_paperlist_tl } m }
+ {
+ \group_begin:
+% \end{macrocode}
+% 修改姓名的显示方式,使被注解的姓名可被加粗下划线表示。
+% \begin{macrocode}
+ \RenewDocumentCommand \mkbibnamegiven { m }
+ { \ifitemannotation { thesisauthor }
+ { \njuline { \bf ##1 } } { ##1 } }
+ \RenewDocumentCommand \mkbibnamefamily { m }
+ { \ifitemannotation { thesisauthor }
+ { \njuline { \bf ##1 } } { ##1 } }
+% \end{macrocode}
+% 修改年份的显示方式,默认进行加粗。
+% \begin{macrocode}
+ \RenewDocumentCommand \mkbibdateshort { m m m }
+ { \textbf { \thefield { ##1 } } }
+ \begin{refsection}
+ \nocite { #2 }
+ \printbibliography [ heading = subbibliography, title = #1 ]
\end{refsection}
+ \group_end:
}
%</class>
% \end{macrocode}
% \end{macro}
%
-%
% \end{implementation}
%
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.ins b/macros/unicodetex/latex/njuthesis/njuthesis.ins
new file mode 100644
index 0000000000..f64208f6f9
--- /dev/null
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.ins
@@ -0,0 +1,77 @@
+%%
+%% This is file `njuthesis.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% njuthesis.dtx (with options: `install')
+%%
+%% Copyright (C) 2021 - 2022
+%% by Nanjing University Linux User Group
+%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+%% To produce the documentation run the original source files ending with
+%% `.dtx' through XeTeX.
+%%
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+Copyright (C) 2021 - 2022
+by Nanjing University Linux User Group
+<git+nju-lug-email-3104-issue-@yaoge123.cn>
+
+This file may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3c of this license
+or (at your option) any later version. The latest version of this
+license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX version
+2005/12/01 or later.
+
+To produce the documentation run the original source files ending with
+`.dtx' through XeTeX.
+
+\endpreamble
+
+\generate{
+ \usedir{tex/latex/njuthesis}
+ \file{\jobname.cls} {\from{\jobname.dtx}{class}}
+}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* files into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* The recommended directory is TDS:tex/latex/njuthesis *}
+\Msg{* *}
+\Msg{* njuthesis.cls *}
+\Msg{* njuthesis.ins *}
+\Msg{* *}
+\Msg{* To produce the documentation, run the file njuthesis.dtx *}
+\Msg{* through XeLaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
+\endinput
+%%
+%% End of file `njuthesis.ins'.
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.pdf b/macros/unicodetex/latex/njuthesis/njuthesis.pdf
index f679febe8b..5aa0cc75c0 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.pdf
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.pdf
Binary files differ