summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-05-24 03:01:29 +0000
committerNorbert Preining <norbert@preining.info>2022-05-24 03:01:29 +0000
commit0c7d079315627312627c83bc9ce6f5e4f1b436f6 (patch)
tree72e360334a6044a049939ba5fa437402e4f83ad6 /macros
parent989493fc0cf04ec736a261d39eee40e1d7bdf4be (diff)
CTAN sync 202205240301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/create-theorem/DEPENDS.txt1
-rw-r--r--macros/latex/contrib/create-theorem/create-theorem-doc.pdfbin120072 -> 119454 bytes
-rw-r--r--macros/latex/contrib/create-theorem/create-theorem-doc.tex3
-rw-r--r--macros/latex/contrib/create-theorem/create-theorem.sty71
-rw-r--r--macros/latex/contrib/hvextern/Changes2
-rw-r--r--macros/latex/contrib/hvextern/doc/hvextern.pdfbin1203306 -> 1204768 bytes
-rw-r--r--macros/latex/contrib/hvextern/doc/hvextern.tex37
-rw-r--r--macros/latex/contrib/hvextern/latex/hvextern.sty101
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.dtx324
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.ins12
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.pdfbin1261937 -> 1275071 bytes
11 files changed, 400 insertions, 151 deletions
diff --git a/macros/latex/contrib/create-theorem/DEPENDS.txt b/macros/latex/contrib/create-theorem/DEPENDS.txt
new file mode 100644
index 0000000000..c226a5857f
--- /dev/null
+++ b/macros/latex/contrib/create-theorem/DEPENDS.txt
@@ -0,0 +1 @@
+hard crefthe \ No newline at end of file
diff --git a/macros/latex/contrib/create-theorem/create-theorem-doc.pdf b/macros/latex/contrib/create-theorem/create-theorem-doc.pdf
index e3472c1750..f6f8fb84d5 100644
--- a/macros/latex/contrib/create-theorem/create-theorem-doc.pdf
+++ b/macros/latex/contrib/create-theorem/create-theorem-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/create-theorem/create-theorem-doc.tex b/macros/latex/contrib/create-theorem/create-theorem-doc.tex
index e6d06817e6..37c4c56edf 100644
--- a/macros/latex/contrib/create-theorem/create-theorem-doc.tex
+++ b/macros/latex/contrib/create-theorem/create-theorem-doc.tex
@@ -97,7 +97,7 @@
\begin{document}
-\def\PackageVersion{2022/04/23}
+\def\PackageVersion{2022/05/22}
\title{\createtheorempackage{}\\\smallskip\itshape Initializing theorem-like environments with multilingual support}
\author{Jinwen XU}
@@ -450,6 +450,7 @@ In each case, the two environments \texttt{idea} and \texttt{idea*} share the sa
\begin{itemize}
\item The current mechanism does not work well for German, a problem originated in the package \textsf{crefthe}. The author plans to adopt a more refined approach in a later version so as to support the various grammatical situations in German.
+ \item \createtheorempackage{} modifies some undocumented internal macros of \textsf{cleveref}, so the behaviour might not be stable if \textsf{cleveref} gets updated.
\item There may be inaccuracies in the translation of those preset names.
\end{itemize}
diff --git a/macros/latex/contrib/create-theorem/create-theorem.sty b/macros/latex/contrib/create-theorem/create-theorem.sty
index fefe7a6119..8e9ab307ce 100644
--- a/macros/latex/contrib/create-theorem/create-theorem.sty
+++ b/macros/latex/contrib/create-theorem/create-theorem.sty
@@ -13,7 +13,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{create-theorem}
- {2022/04/23} {}
+ {2022/05/22} {}
{Initializing theorem-like environments with multilingual support}
\keys_define:nn { create-theorem }
@@ -401,6 +401,69 @@
{ ##3 } { ##4 } { ##5 } { ##6 }
\group_end:
}
+
+ % Redefine the labelcref formats to match the numbering format
+ \cs_set:cpn { labelcref@ #1 @format } ##1##2##3
+ {
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set_eq:cc { labelcref@ #1 @format@first } { labelcref@ #1 @format }
+ \cs_set:cpn { labelcref@ #1 @format@second } ##1##2##3
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcref@ #1 @format@middle } ##1##2##3
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcref@ #1 @format@last } ##1##2##3
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+
+ \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format } {} {}
+ \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format@first } {} {}
+ \cs_set:cpn { labelcrefrange@ #1 @format@second } ##1##2##3##4##5##6
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcrefrange@ #1 @format@middle } ##1##2##3##4##5##6
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcrefrange@ #1 @format@last } ##1##2##3##4##5##6
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
}
\cs_new:Nn \crthm_define_format_short_version:nnnn
@@ -412,7 +475,9 @@
{
\cs_new:cn { crthm_format_ #2 :nnn }
{
- { #3 } ##2 { #4 } \nobreakspace { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } } ##3
+ { #3 } ##2 { #4 }
+ \tl_if_blank:nF { #4 } { \nobreakspace }
+ { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } } ##3
}
\cs_set_eq:cc { #2 } { crthm_format_ #2 :nnn }
}
@@ -427,7 +492,7 @@
\cs_new:cn { crthm_format_ #2 :nnnnnn }
{
{ #3 } ##3 { #4 }
- \nobreakspace \crefrangepreconjunction
+ \tl_if_blank:nF { #4 } { \nobreakspace } \crefrangepreconjunction
{ \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } }
##4 \crefrangeconjunction
##5 { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##2 } } ##6
diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes
index c83eea6c1f..b300396106 100644
--- a/macros/latex/contrib/hvextern/Changes
+++ b/macros/latex/contrib/hvextern/Changes
@@ -1,5 +1,7 @@
hvextern.sty ----------------
+v 0.26 2022-05-23 - set filenames for twocolumn mode outer/inner
+ - added keywords outerFN and shiftFN
v 0.25 2022-05-19 - added framesep keyword
- added keywords for vertical space
- added keyword textOptions for reading text output
diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf
index b472862835..473cd8972b 100644
--- a/macros/latex/contrib/hvextern/doc/hvextern.pdf
+++ b/macros/latex/contrib/hvextern/doc/hvextern.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex
index a170457a7d..d691aa3bed 100644
--- a/macros/latex/contrib/hvextern/doc/hvextern.tex
+++ b/macros/latex/contrib/hvextern/doc/hvextern.tex
@@ -30,7 +30,7 @@ from within a main\newline \LaTeX\ document~--v. \hvexternFileversion}
%\newpage
-\setkeys{hv}{moveToExampleDir,ExampleDir=Examples,showFilename,verbose}
+\setkeys{hv}{moveToExampleDir,ExampleDir=Exa,showFilename,verbose}
\section{Syntax}
\begin{verbatim}
@@ -268,6 +268,18 @@ image.save(imageName+".png", "PNG")
\end{externalDocument}
+The external filename, extended by a consequtive number, kan be printed in the
+margin by setting the keyword \Lkeyword{showFilename}. In general it is printed
+in the outer margin or in twocolumn mode in the outer column. If the example is
+set in twocolumn mode but inside a starred floating environment over both
+column, then use the keyword \Lkeyword{outerFN}. Then \Lpack{hvextern} doesn't
+test for twocolumn mode.
+
+A vertical shift of the filename is possible by setting a length to the keyword \Lkeyword{shiftFN},
+e.g. \texttt{shiftFN=5ex}.
+
+
+\clearpage%%%%%%%%%%%%
\begin{externalDocument}[grfOptions={width=0.95\linewidth},
compiler=xelatex,code,mpwidth=0.6\linewidth,
@@ -412,9 +424,6 @@ Sort with xindex \verb|-l DE --config AU|
\end{externalDocument}
-
-
-
The following \Java-program creates the Mandelbrot set as png image. The valid setting for
the environment \Lenv{externalDocument} is:
@@ -681,6 +690,7 @@ The following example uses:
\begin{externalDocument}[
pages={1,2,3},
pagesep=2pt,
+ shiftFN=5ex,
grfOptions={width=0.3\linewidth},
% lstOptions={fontsize=\small,fontfamily=tt},
compiler=lualatex, runs=2,
@@ -690,7 +700,7 @@ The following example uses:
% mpwidth=0.6\linewidth,
% crop,
cleanup,
- force=true,
+ force=false,
frame,
% usefancyvrb,
% float,
@@ -743,7 +753,7 @@ which is the default. Using a caption and a label are optional.
% mpwidth=0.6\linewidth,
crop,
cleanup,
- force=true,
+ force=false,
usefancyvrb,
float,
floatsetting=!ht,
@@ -1016,7 +1026,7 @@ not part of your current font.
\hv@extern@showFilenamefalse}
\end{verbatim}
-With the setting \LKeyset{inline=true} the optional keyword \Lkeyword{code}
+With the setting \LKeyset{inline=true} the optional keyword \Lkeyword{code} and \Lkeyword{showFilename}
is automatically set to false. The
next Chinese characters
\begin{externalDocument}[
@@ -1078,7 +1088,7 @@ sorted digits of the number $A$: $495=954-459$.
\begin{externalDocument}[
compiler=perl, force=false, docType=pl, ext=pl, includegraphic=false,
- code, mpwidth=0.6\linewidth, showFilename=false]{voss}
+ code, mpwidth=0.6\linewidth]{voss}
#!/usr/bin/perl
#
# Herbert Voss 2005-05-31
@@ -1133,7 +1143,8 @@ outFile = io.open(shortFN..".txt","w+") -- open external file
\begin{externalDocument}[
compiler=lua, force=false, docType=lua, ext=lua, includegraphic=false,
- code, usefancyvrb=false,textOptions={basicstyle=\ttfamily\footnotesize}]{voss}
+ code, usefancyvrb=false,textOptions={basicstyle=\ttfamily\footnotesize},
+ shiftFN=6ex]{voss}
#!/usr/bin/env lua
local filename = arg[0]
local shortFN = filename:match("(.+)%..+")
@@ -1211,7 +1222,6 @@ The following examples uses
xindexOptions={-l DE --config AU},
mpwidth=0.6\linewidth,
usefancyvrb=false,
- showFilename=false,
docType=latex]{voss}
\documentclass[paper=a6,DIV=18,parskip=half-]{screxa}
\pagestyle{empty}
@@ -1262,7 +1272,6 @@ runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex}
pagesep=2pt,
frame,
runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex},
- showFilename,
verbose,
force=false,
cleanup={log,aux,toc,bbl,blg},
@@ -1304,7 +1313,6 @@ The default is using \Lcs{lstinputlisting} for the printed code sequences.
grfOptions={width=0.45\linewidth},
pages={1,3},
frame,compiler=pdflatex,
- showFilename,
% crop,
force=false,runs=2,code,docType=latex,
frame,
@@ -1641,6 +1649,11 @@ to get the directory listed:
\section{Other options}
\begin{description}
+%\item[\Lkeyword{showFilename}] Prints the filename in the outer margin (right for oneside) or in twocolumn mode for
+% the first column in the left and the second column in the right margin.
+%\item[\Lkeyword{outerFN}] Only valid for the twocolumn mode with onecolumn floats (environment \texttt{figure*}),
+% to get the filename on the right or left of the whole page.
+%\item[\Lkeyword{shiftFN}] A length to move the printed filename up or down.
\item[\Lkeyset{force=false}] can speed up the comiling time for the document. If a created image/output
already exists, there is no need to create it with the next run again and again.
\item[\Lkeyword{cleanup}] the auxiliary files of a \LaTeX-run are deleted, preset to \texttt{aux}, \texttt{log}.
diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty
index 0b6eafa6c6..8b0fa75f1f 100644
--- a/macros/latex/contrib/hvextern/latex/hvextern.sty
+++ b/macros/latex/contrib/hvextern/latex/hvextern.sty
@@ -11,11 +11,12 @@
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-\def\hvexternFileversion{0.25}
-\ProvidesFile{hvextern}[2022/05/19 v\hvexternFileversion: package for running external documents (HV)]
+\def\hvexternFileversion{0.26}
+\ProvidesFile{hvextern}[2022/05/23 v\hvexternFileversion: package for running external documents (HV)]
\RequirePackage{shellesc,xkeyval,graphicx}
\RequirePackage{fancyvrb,tikz,listings,ifplatform}
+\RequirePackage{ifoddpage}
\RequirePackage{tcolorbox,xparse}
\tcbuselibrary{skins,breakable}
@@ -39,6 +40,7 @@
\newlength\hv@extern@belowpreambleskip
\newlength\hv@extern@belowbodyskip
\newlength\hv@extern@belowskip
+\newlength\hv@extern@shiftFN
\AtBeginDocument{\setlength\hv@LineWidth{\dimexpr\linewidth-2\fboxsep-2\fboxrule}}
\newlength\hv@extern@mpwidth \setlength\hv@extern@mpwidth{\z@}
@@ -72,6 +74,8 @@
\define@boolkey{hv}[hv@extern@]{redirect}[true]{}
\define@boolkey{hv}[hv@extern@]{usefancyvrb}[true]{}
\define@boolkey{hv}[hv@extern@]{showFilename}[true]{}
+\define@boolkey{hv}[hv@extern@]{outerFN}[true]{}
+\define@key{hv}{shiftFN}[0pt]{\setlength\hv@extern@shiftFN{#1}}
\define@boolkey{hv}[hv@extern@]{code}[true]{}
\define@boolkey{hv}[hv@extern@]{force}[true]{}
\define@boolkey{hv}[hv@extern@]{crop}[true]{}
@@ -98,7 +102,6 @@
\define@boolkey{hv}[hv@extern@]{eps}[true]{}
\define@boolkey{hv}[hv@extern@]{verbose}[true]{}
\def\hv@typeout#1{\ifhv@extern@verbose\typeout{#1}\fi}
-%\define@key{hv}{compiler}[pdflatex]{\def\hv@extern@compiler{#1}}
\define@choicekey*+{hv}{compiler}[\val\nr]{mpost,tex,latex,luatex,python3,perl,lua,java,%
xetex,pdflatex,lualatex,xelatex,context,sh,texlua}[pdflatex]{%
\hv@typeout{>>>> Compiler type \nr}%
@@ -113,9 +116,13 @@
\define@key{hv}{belowbodyskip}[\smallskipamount]{\setlength\hv@extern@belowbodyskip{#1}}
\define@key{hv}{belowskip}[\medskipamount]{\setlength\hv@extern@belowskip{#1}}
+\def\hvExternSetKeys#1{\setkeys{hv}{#1}}
+
\def\ResetKeys{%
\setkeys{hv}{%
showFilename=false,% Dateinamen im Rand angeben
+ outerFN=false,% use fullwidth in twocolumn mode (starred floats)
+ shiftFN=\z@,% raise printed filename
ext=tex,% file extension
code=false,% show Code
crop=false,% erzeugte PDF "croppen"
@@ -164,6 +171,7 @@
}%
}
+
\ResetKeys
{\catcode`\%=12
@@ -195,7 +203,39 @@
\tcbset{breakable,left=2pt,right=2pt,top=2pt,bottom=2pt,boxsep=0pt}
\def\hv@marginpar#1{%
- \makebox[\dimexpr\hv@TextWidth+\marginparsep-1ex][r]{\makebox(0,0){\rotatebox[origin=lb]{90}{#1}}}%
+ \leavevmode\checkoddpage
+ \sbox\hv@extern@box{\rotatebox[origin=C]{90}{\rule{2\hv@extern@shiftFN}{0pt}#1}}%
+ \ht\hv@extern@box=\z@ \wd\hv@extern@box=\z@ \dp\hv@extern@box=\z@
+ \noindent
+ \ifoddpage% we have a right page
+ \if@twocolumn
+ \ifhv@extern@outerFN
+ \makebox[\dimexpr\hv@TextWidth+\marginparsep-1.5ex][r]{\usebox\hv@extern@box}%
+ \else
+ \if@firstcolumn
+ \llap{\usebox\hv@extern@box\rule{2.5ex}{0pt}}%
+ \else
+ \makebox[\dimexpr\hv@TextWidth+\marginparsep-1.5ex][r]{\usebox\hv@extern@box}%
+ \fi
+ \fi
+ \else
+ \makebox[\dimexpr\hv@TextWidth+\marginparsep-1.5ex][r]{\usebox\hv@extern@box}%
+ \fi
+ \else% we have an even page (left page)
+ \if@twocolumn
+ \ifhv@extern@outerFN
+ \llap{\usebox\hv@extern@box\rule{2.5ex}{0pt}}% left page left side
+ \else
+ \if@firstcolumn
+ \llap{\usebox\hv@extern@box\rule{2.5ex}{0pt}}% left page left side
+ \else
+ \makebox[\dimexpr\hv@TextWidth+\marginparsep-1.5ex][r]{\usebox\hv@extern@box}% left page right side
+ \fi
+ \fi
+ \else
+ \llap{\usebox\hv@extern@box\rule{2.5ex}{0pt}}% onecolumn left page left side
+ \fi
+ \fi
}
\newcommand\PreambleVerbatim[2][]{%
@@ -353,8 +393,10 @@
%%
%% [#1]: Optionen #2: Dateiname
%%
-\newenvironment{externalDocument}[2][]{%
+\newenvironment{externalDocument}[2][]
+ {%
\xdef\hvExternDateiname{#2-\arabic{hv@example@counter}}%
+ \gdef\hv@extern@savePara{#1}%
\setkeys{hv}{#1}% \begin
\hv@typeout{External filename: \hvExternDateiname}%
\expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.pdf}{}{%
@@ -369,6 +411,8 @@
\hv@typeout{>>> ... done}%
\global\stepcounter{hv@example@counter}%
\endgroup
+ \expandafter\hvExternSetKeys\expandafter{\hv@extern@savePara}%
+ \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}%
\ifhv@extern@force
\ifx\hv@extern@runsequence\@empty
\hv@typeout{>>>> force=true: running \hv@extern@progpath\hv@extern@compiler~ \hvExternDateiname\hv@extern@ext ...}%
@@ -417,7 +461,15 @@
\ifhv@extern@code%-------------- Code Part
\hv@typeout{>>>>Starting Code part with preamble ...}%
\begingroup
- \hv@TextWidth=\textwidth
+ \if@twocolumn
+ \ifhv@extern@outerFN
+ \hv@TextWidth=\textwidth
+ \else
+ \hv@TextWidth=\columnwidth
+ \fi
+ \else
+ \hv@TextWidth=\textwidth
+ \fi
\ifdim\hv@extern@mpwidth>\z@
\noindent
\minipage[\hv@extern@mpvalign]{\hv@extern@mpwidth}
@@ -477,12 +529,12 @@
\ifhv@extern@moveToExampleDir
% \ShellEscape{mkdir\space\hv@extern@ExamplesDir/}%
\hv@typeout{>>>> Move file into example dir}%
- \hv@typeout{>>>>>>\hvExternDateiname ---- \hv@extern@ExamplesDir}%
+ \hv@typeout{>>>>>>\hvExternDateiname ----> \hv@extern@ExamplesDir}%
\ShellEscape{\hv@move \hvExternDateiname.*\space \hv@extern@ExamplesDir}%
\fi
\ifhv@extern@includegraphic
\ifhv@extern@inline
- \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@ExamplesDir\hvExternDateiname}%
+ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@fullPath}%
\else
\ifhv@extern@float
\hv@typeout{>>>> Floating environment}%
@@ -498,19 +550,21 @@
\fi
\fi
\hv@extern@align
- \hv@typeout{>>>> Input image \hv@extern@ExamplesDir\hvExternDateiname}%
+ \hv@typeout{>>>> Input image \hv@extern@fullPath}%
\ifhv@extern@frame
\begingroup
\fboxsep=\hv@extern@framesep
\expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
+ \hv@typeout{>>>> Image loop: next=\next\space \hv@extern@fullPath}%
\fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]%
- {\hv@extern@ExamplesDir\hvExternDateiname}}\hspace{\hv@extern@pagesep}}%
+ {\hv@extern@fullPath}}\hspace{\hv@extern@pagesep}}%
\hspace*{-\hv@extern@pagesep}%
\endgroup
\else
\expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
+ \hv@typeout{>>>> Image loop: next=\next\space \hv@extern@fullPath}%
\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]%
- {\hv@extern@ExamplesDir\hvExternDateiname}\hspace{\hv@extern@pagesep}}%
+ {\hv@extern@fullPath}\hspace{\hv@extern@pagesep}}%
\hspace*{-\hv@extern@pagesep}%
\fi
\ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi
@@ -518,25 +572,25 @@
\ifhv@extern@float
\endfigure
\else
- \ifdim\hv@extern@mpwidth>\z@ \endminipage\else\par\endgroup\fi
+ \ifdim\hv@extern@mpwidth>\z@ \endminipage\else\unskip\strut\par\endgroup\fi
\fi
\fi
\else% no graphic, only text
\ifdim\hv@extern@mpwidth>\z@
\hfill\minipage[t]{\dimexpr\linewidth-\hv@extern@mpwidth-\hv@extern@mpsep\relax}\vspace{0pt}
\ifhv@extern@usefancyvrb
- \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}%
+ \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
\else
- \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}%
+ \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
\fi
\endminipage
\else
\vspace{\hv@extern@belowbodyskip}
\noindent
\ifhv@extern@usefancyvrb
- \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}%
+ \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
\else
- \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}%
+ \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
\fi
\fi
\fi
@@ -548,6 +602,7 @@
\begingroup
\setkeys{hv}{code=false,includegraphic=false,#1}%
\xdef\hvExternDateiname{#3-\arabic{hv@example@counter}}%
+ \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}%
\hv@typeout{>>>> running #2}%
\ifhv@extern@redirect
\ShellEscape{\hv@extern@progpath#2 > \hv@extern@ExamplesDir\hvExternDateiname.txt}%
@@ -573,13 +628,12 @@
\begingroup
\fboxsep=\hv@extern@framesep
\expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
- \fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@ExamplesDir\hvExternDateiname}}%
+ \fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@fullPath}}%
\hspace{5pt}}\hspace*{-5pt}%
\endgroup
\else
\expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
- \expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]%
- {\hv@extern@ExamplesDir\hvExternDateiname}%
+ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@fullPath}%
\hspace{5pt}}\hspace*{-5pt}%
\fi
\ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi
@@ -595,9 +649,9 @@
\hv@typeout{>>>> Floating environment}%
\expandafter\figure\expandafter[!htb]
\ifhv@extern@usefancyvrb
- \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}
+ \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
\else
- \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}
+ \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
\fi
\ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi
\ifx\hv@extern@label\@empty\else\label{\hv@extern@label}\fi
@@ -605,9 +659,9 @@
\else
\noindent
\ifhv@extern@usefancyvrb
- \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}
+ \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
\else
- \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@ExamplesDir\hvExternDateiname.txt}
+ \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
\fi
\fi
\fi
@@ -616,7 +670,6 @@
}
\stepcounter{hv@example@counter}%
-
%
%%
\endinput
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.dtx b/macros/unicodetex/latex/njuthesis/njuthesis.dtx
index faeaa2defc..193ef959f8 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.dtx
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.dtx
@@ -109,9 +109,16 @@ To produce the documentation run the original source files ending with
\fi
%</internal>
%
+% ^^A 故意留白
+% ^^A 故意留白
+% ^^A 故意留白
+% ^^A 故意留白
+%
%<class>\NeedsTeXFormat{LaTeX2e}
%<*!(driver|install)>
-%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+% ^^A 诚耀百廿,雄创一流
+% ^^A 南京大学一百二十周年华诞邀您共襄盛举!
+%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{njuthesis}
%<definition-ug> {Undergraduate definition file for njuthesis}
@@ -203,7 +210,7 @@ To produce the documentation run the original source files ending with
% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}
% {git+nju-lug-email-3104-issue-@yaoge123.cn}}}
%
-% \date{v0.18.0 \quad 2022-05-01}
+% \date{v0.19.0 \quad 2022-05-23}
%
% \changes{v0.1}{2021/09/04}{开始开发。}
% \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
@@ -227,6 +234,8 @@ To produce the documentation run the original source files ending with
% \changes{v0.13}{2021/12/15}{适配2022届本科生毕业毕业论文(设计)规范。}
% \changes{v0.14}{2022/01/13}{将本模板内嵌入南大 \hologo{TeX} 网站。}
% \changes{v0.16}{2022/03/01}{分离本科生和研究生模板配置。}
+% \changes{v0.19}{2022/05/23}{对研究生普通封面进行若干细节修改。}
+% \changes{v0.19}{2022/05/23}{对国家图书馆封面进行若干细节修改。}
%
%
% \maketitle
@@ -284,7 +293,8 @@ To produce the documentation run the original source files ending with
% \subsection{开始之前}
% \label{subsec:first-things-first}
%
-% 在本文正式介绍 \cls{njuthesis} 论文模板前,您也许并不熟悉 \hologo{TeX} 排版系统。话不多说,请先完整体验一遍下述的工作流程:
+% 在本文正式介绍 \cls{njuthesis} 论文模板前,您也许并不熟悉 \hologo{TeX}
+% 排版系统。话不多说,请先按部就班体验一遍下述的工作流程:
%
% \bigskip
% \fcolorbox{olgreen}{gray!5}{\parbox{\textwidth-5em}{%
@@ -302,7 +312,7 @@ To produce the documentation run the original source files ending with
%
% \bigskip
% 稍等片刻,您会在浏览器右侧发现一份新生成的空白论文。
-% 如果它的效果令您满意,不妨以此为基础开始写作。
+% 如果它的效果令您满意,不妨以本模板为基础开始写作。
%
% \subparagraph{我一定要体验上述流程吗?}
% 是,但也不一定。有人坚持认为应该做一些\emph{直观、清晰、有手就行、一
@@ -318,13 +328,13 @@ To produce the documentation run the original source files ending with
% 本校\href{https://itsc.nju.edu.cn}{信息化管理建设服务中心}和该网站
% 的维护者\href{mailto:my@yaoge123.cn}{姚舸老师};如果\emph{报错},请
% 点击左上角的菜单按钮,查看编译器是否显示为 |XeLaTeX|;
-% 再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个相当
+% 再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个极其
% 有益的结论:\emph{也许 Word 模板更加适合您}。这可以节省下熟悉
% \hologo{TeX} 排版软件使用方法所需的可观时间。
%
% \subparagraph{但我依然对 \hologo{LaTeX} 一无所知!}
-% 这意味着您也许得花些时间在\emph{长篇累牍的精细介绍}上。
-% 请接着向后阅读,有需要时善用搜索。
+% 这意味着您真的得花些时间在\emph{长篇累牍的精细介绍}上。
+% 如果您已经下定决心,请接着向后阅读,有需要时善用搜索引擎。
%
%
% \subsection{历史沿革}
@@ -405,7 +415,8 @@ To produce the documentation run the original source files ending with
%
% \subsection{许可说明}
%
-% \file{njuthesis.dtx} 文件以及由其直接产生的所有文件被称为 \cls{njuthesis} 文档类,或者在本文中简称为本模板。
+% \file{njuthesis.dtx} 文件以及由其直接产生的所有文件被称为
+% \cls{njuthesis} 文档类,或者在本文中简称为本模板。
%
% \subparagraph{版权信息}
% 本模板之版权隶属于 © 2021 - 2022 南京大学 Linux 用户组。
@@ -684,13 +695,17 @@ To produce the documentation run the original source files ending with
% \subsection{在线编译}
% \label{subsec:onlinecompile}
%
-% 相信您在接触了本地编译以后,很快就会意识到一些十分显然的事实,譬如 \hologo{TeX} 编译器安装过程较为漫长\footnote{因此对于 Windows 推荐 \hologo{MiKTeX}。},占用空间过大\footnote{事实上,可以通过 |scheme-infraonly| 模式安装 \hologo{TeX}\,Live,随后利用 \pkg{tlmgr} 安装依赖宏包,这份宏包列表可以在 Git 仓库的 \file{.github/workflows/build.yml} 找到。},而且在一部分处理器性能不佳的电脑上需要较长编译时间\footnote{出于文件 IO 速度的差异,同一个模板在 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 节省约一半耗时。}。拒绝接受这些麻烦的同学可以尝试本节介绍的在线编译方法。
+%
+% {\color{red}|[!]|} 请注意,在线编辑器不一定提供良好的文件恢复和版本管理机制。
+% 请谨慎备份您的心血结晶。
%
% \subsubsection{南大\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}} 基于开源的 Overleaf 社区版平台构建\footnote{理论上在\href{https://doc.nju.edu.cn/books/latex}{这个网站}能找到一段平台简介,实际上大家都有意无意地鸽了,下次一定补上。},于2021年3月4日正式上线,是 \href{https://sci.nju.edu.cn/}{eScience 中心}为南大在校师生提供的 \hologo{LaTeX} 在线编辑器,首次使用需凭学校邮箱自助注册账号。
%
+% {\color{red}|[!]|} 在 2022 年 5 月的运行中,该网站出现了多次崩溃事件,初步判断原因是由社区版并没有为高并发数做优化引发的。高峰时期,仍然建议在本地部署 \hologo{TeX} 发行版。
%
% \subsubsection{操作步骤}
%
@@ -807,7 +822,7 @@ To produce the documentation run the original source files ending with
% 对于研究生模板可在封面后添加原创性声明,并且在最后一页添加学位论文出版授权书。
%
% 对于需要手动插入承诺书扫描页的情况,可以在导言区载入 \pkg{pdfpages} 宏包,
-% 并在所需位置使用该红包提供的 \cs{includepdf} 命令。
+% 并在所需位置使用该宏包提供的 \cs{includepdf} 命令。
% 例如,可以用如下所示的命令插入扫描件的第一页,并插入紧随的一个空白页。
% \begin{latexexample}[moretexcs={\includepdf},emph={[2]pages}]
% \includepdf[pages={1,{}}]{scanned.pdf}
@@ -1095,13 +1110,27 @@ To produce the documentation run the original source files ending with
% 提交日期。中英文日期现在可以由 ISO 日期格式\cite{gb-t-7408-2005}的字符串统一生成。如果留空,则自动使用编译当天日期。
% \end{function}
%
-% \begin{function}[updated=2021-01-14]{info/defend-date}
+% \begin{function}[updated=2022-01-14]{info/defend-date}
% \begin{syntax}
% defend-date = \Arg{yyyy-mm-dd}
% \end{syntax}
% 答辩日期,只对研究生有效,要求同提交日期。
% \end{function}
%
+% \begin{function}[updated=2022-05-23]{info/confer-date}
+% \begin{syntax}
+% confer-date = \Arg{yyyy-mm-dd}
+% \end{syntax}
+% 学位授予日期,只用于国家图书馆封面,要求同提交日期。
+% \end{function}
+%
+% \begin{function}[updated=2021-05-23]{info/bottom-date}
+% \begin{syntax}
+% bottom-date = \Arg{yyyy-mm-dd}
+% \end{syntax}
+% 底部日期,只用于国家图书馆封面,要求同提交日期。
+% \end{function}
+%
% \begin{function}[updated=2021-10-01]{info/chairman,info/reviewer}
% \begin{syntax}
% chairman = \Arg{答辩主席}
@@ -1181,7 +1210,18 @@ To produce the documentation run the original source files ending with
% supervisor* = {Professor Li Chengdian},
% submit-date = {2021-09-12},
% defend-date = {2022-01-15},
-% email = {git+nju-lug-email-3104-issue-@yaoge123.cn},
+% email = {git+nju-lug-email-3104-issue-@yaoge123.cn}
+% }
+% }
+% \end{latexexample}
+%
+% 如果需要国家图书馆封面,还需要加入如下信息
+%
+% \begin{latexexample}[moretexcs={\njusetup},emph={[2]info}]
+% \njusetup {
+% info = {
+% confer-date = {2022-05-20},
+% bottom-date = {2022-05-21},
% chairman = {张晓山~教授},
% reviewer = {王瑞希~教授,郭德纲~副教授,华芈库~教授,戴菲菲~教授},
% clc = {0175.2},
@@ -1463,8 +1503,8 @@ To produce the documentation run the original source files ending with
% \item 数学常数和特殊函数名用正体,如
% \begin{itemize}
% \item $\uppi$ 使用 |$\uppi$|
-% \item $\symup{i}$ 使用 |$\symup{e}$|
-% \item $\symup{e}$ 使用 |$\symup{i}$|
+% \item $\symup{i}$ 使用 |$\symup{i}$|
+% \item $\symup{e}$ 使用 |$\symup{e}$|
% \end{itemize}
% \item 微分号使用正体,如
% \begin{itemize}
@@ -2025,10 +2065,10 @@ To produce the documentation run the original source files ending with
%
% \begin{function}{\njusetname,\njusetname*,\njusettext,\njusettext*}
% \begin{syntax}
-% \tn{njusetname} = \marg{名称}\oarg{变体}\marg{内容}
-% \tn{njusetname*} = \marg{名称}\oarg{变体}\marg{内容}
-% \tn{njusettext} = \marg{名称}\oarg{变体}\marg{内容}
-% \tn{njusettext*} = \marg{名称}\oarg{变体}\marg{内容}
+% \tn{njusetname}\marg{名称}\oarg{变体}\marg{内容}
+% \tn{njusetname*}\marg{名称}\oarg{变体}\marg{内容}
+% \tn{njusettext}\marg{名称}\oarg{变体}\marg{内容}
+% \tn{njusettext*}\marg{名称}\oarg{变体}\marg{内容}
% \end{syntax}
% 修改固定文本内容,带星号的命令表示修改对应的英文字段。
% 名称对应的默认内容可以参见 \ref{subsubsec:constant-name} 与
@@ -2046,8 +2086,8 @@ To produce the documentation run the original source files ending with
%
% \begin{function}{\njusetlength,\njusetlength*}
% \begin{syntax}
-% \tn{njusetlength} = \marg{名称}\marg{长度}
-% \tn{njusetlength*} = \marg{名称}\marg{长度}
+% \tn{njusetlength}\marg{名称}\marg{长度}
+% \tn{njusetlength*}\marg{名称}\marg{长度}
% \end{syntax}
% 修改长度值,默认为修改固定长度(|dim| 类型),
% 带星号的命令表示修改弹性长度(|skip| 类型,目前未涉及)。
@@ -2065,7 +2105,7 @@ To produce the documentation run the original source files ending with
%
% \begin{function}{\njusetformat}
% \begin{syntax}
-% \tn{njusetformat} = \marg{名称}\marg{样式}
+% \tn{njusetformat}\marg{名称}\marg{样式}
% \end{syntax}
% 修改样式。默认样式可以参见 \ref{subsubsec:constant-format} 节。
% \end{function}
@@ -2073,7 +2113,7 @@ To produce the documentation run the original source files ending with
% 譬如,将章标题字号加大到小二号,示例如下:
%
% \begin{latexexample}[moretexcs={\njusetformat,\zihao}]
-% \njusetformat{chapter}{\zihao{-2}\normalfont\sffamily\centering}
+% \njusetformat{chapter}{\zihao{-2}\sffamily\centering}
% \end{latexexample}
%
%
@@ -2527,16 +2567,6 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\g_@@_info_submitdate_tl,\g_@@_info_submitdate_en_tl,
-% \g_@@_info_defenddate_tl}
-% 用于存储格式化后的论文提交日期和答辩日期的变量。
-% \begin{macrocode}
-\tl_new:N \g_@@_info_submitdate_tl
-\tl_new:N \g_@@_info_submitdate_en_tl
-\tl_new:N \g_@@_info_defenddate_tl
-% \end{macrocode}
-% \end{variable}
-%
% \begin{variable}{\c_@@_today_tl}
% 编译当天日期,格式为 |yyyy-mm-dd|。
% \begin{macrocode}
@@ -2692,7 +2722,10 @@ To produce the documentation run the original source files ending with
% \end{macro}
%
% \begin{macro}{\@@_spread_box:nnn,\@@_spread_box:nnV,\@@_spread_box:nnx}
-% 分散对齐的水平盒子。
+% \changes{v0.19}{2022/05/16}{对超出盒子宽度的文字进行水平压缩。}
+% 分散对齐的水平盒子,拉伸算法来自 \cls{fduthesis}。
+% 在文字宽度小于给定宽度时,在字符中间填补 \tn{hfil} 以增大字距。
+% 在文字宽度超出限制时,进行整体水平压缩。
% \begin{arguments}
% \item 宽度,|dim| 型变量
% \item 格式
@@ -2702,15 +2735,29 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_spread_box:nnn #1#2#3
{
\mode_leave_vertical:
+ \@@_get_text_width:Nn \l_@@_tmpa_dim { #2 #3 }
\hbox_to_wd:nn { #1 }
- { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
+ {
+ \dim_compare:nTF { \l_@@_tmpa_dim > #1 }
+ {
+ \hfil
+ \scalebox
+ { \dim_to_decimal_in_unit:nn { #1 } { \l_@@_tmpa_dim } }
+ [ 1.0 ] { #2 #3 }
+ \hfil
+ }
+ {
+ \hbox_to_wd:nn { #1 }
+ { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
+ }
+ }
}
\cs_generate_variant:Nn \@@_spread_box:nnn { nnV }
\cs_generate_variant:Nn \@@_spread_box:nnn { nnx }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_multiline_box:nnnn}
+% \begin{macro}{\@@_multiline_box:NNnn}
% 多行固定长度的下划线内容,用于国家图书馆封面。
% \begin{arguments}
% \item 用于循环的 |int| 型变量
@@ -2719,7 +2766,7 @@ To produce the documentation run the original source files ending with
% \item 宽度,|dim| 型变量
% \end{arguments}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_multiline_box:nnnn #1#2#3#4
+\cs_new_protected:Npn \@@_multiline_box:NNnn #1#2#3#4
{
\int_set:Nn #1 { 1 }
\int_do_until:nn { #1 > #3 }
@@ -2849,6 +2896,30 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_date:n,\@@_date_en:n}
+% 封装 ISO 日期格式字符串的转化命令,该字符串需要进行展开。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_date:n #1
+ {
+ \tl_new:c { g_@@_info_ #1 date_tl }
+ \tl_set:cn { g_@@_info_ #1 date_tl }
+ {
+ \exp_last_unbraced:Nv
+ \@@_date:www { g_@@_info_ #1 date_raw_tl } \q_stop
+ }
+ }
+\cs_new_protected:Npn \@@_date_en:n #1
+ {
+ \tl_new:c { g_@@_info_ #1 date_en_tl }
+ \tl_set:cn { g_@@_info_ #1 date_en_tl }
+ {
+ \exp_last_unbraced:Nv
+ \@@_date:www { g_@@_info_ #1 date_raw_tl } \q_stop
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{封面相关}
% \changes{v0.16}{2022/03/10}{将封面和摘要内部函数定义移动到前部。}
%
@@ -3743,6 +3814,24 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{info/defend-date}
+% \changes{v0.19}{2022/05/23}{新增国家图书馆封面的学位授予日期设置项。}
+% 学位授予日期。
+% \begin{macrocode}
+ confer-date .tl_set:N = \g_@@_info_conferdate_raw_tl,
+ confer-date .initial:V = \c_@@_today_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/bottom-date}
+% \changes{v0.19}{2022/05/23}{新增国家图书馆封面的底部日期设置项。}
+% 底部日期。
+% \begin{macrocode}
+ bottom-date .tl_set:N = \g_@@_info_bottomdate_raw_tl,
+ bottom-date .initial:V = \c_@@_today_tl,
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{info/defend-date,info/chairman,info/reviewer}
% 答辩委员会信息。
% \begin{macrocode}
@@ -3839,31 +3928,42 @@ To produce the documentation run the original source files ending with
{ \@@_quad: \g_@@_info_supv_ii_en_tl }
}
% \end{macrocode}
-% 将 ISO 格式的原始日期字符串格式化为中文日期表示,该字符串需要进行展开。
+% \begin{variable}{\g_@@_info_submitdate_tl}
+% 将 ISO 格式的原始日期字符串格式化为中文日期表示。
% \begin{macrocode}
- \tl_set:Nn \g_@@_info_submitdate_tl
- {
- \exp_last_unbraced:NV
- \@@_date:www \g_@@_info_submitdate_raw_tl \q_stop
- }
+ \@@_date:n { submit }
% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_info_submitdate_en_tl,\g_@@_info_defenddate_tl}
% 英文提交日期以及答辩日期仅用于研究生封面。
% \begin{macrocode}
\int_compare:nF { \g_@@_info_degree_int == 1 }
{
- \tl_set:Nn \g_@@_info_submitdate_en_tl
- {
- \exp_last_unbraced:NV
- \@@_date_en:www \g_@@_info_submitdate_raw_tl \q_stop
- }
- \tl_set:Nn \g_@@_info_defenddate_tl
+ \@@_date_en:n { submit }
+ \@@_date:n { defend }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_info_bottomdate_tl,
+% \g_@@_info_conferdate_tl,\g_@@_info_confer_tl}
+% 底部日期以及学位授予日期仅用于国家图书馆封面。
+% \begin{macrocode}
+ \bool_if:NT \g_@@_nlcover_bool
{
- \exp_last_unbraced:NV
- \@@_date:www \g_@@_info_defenddate_raw_tl \q_stop
+ \@@_date:n { bottom }
+ \@@_date:n { confer }
+ \tl_new:N \g_@@_info_confer_tl
+ \tl_set:Nn \g_@@_info_confer_tl
+ {
+ \textbf { \c_@@_name_nju_tl } \hfil
+ \g_@@_info_conferdate_tl
+ }
}
}
}
% \end{macrocode}
+% \end{variable}
%
%
% \subsection{字体设置}
@@ -4227,27 +4327,17 @@ To produce the documentation run the original source files ending with
% 草稿模式下显示页面文字范围边界以及页眉、页脚线。
% \begin{macrocode}
\bool_if:NT \g_@@_draft_bool { \geometry { showframe } }
-%</class>
% \end{macrocode}
%
%
% \subsubsection{页眉页脚}
-%
-% \begin{variable}{\c_@@_pagestyle_tl}
-% 针对不同学位类型的默认页面样式设置。
-% \begin{macrocode}
-%<definition-ug>\tl_const:Nn \c_@@_pagestyle_tl { plain }
-%<definition-g>\tl_const:Nn \c_@@_pagestyle_tl { headings }
-% \end{macrocode}
-% \end{variable}
-%
+% ^^A TODO: 将页眉页脚样式改为使用 \njusetformat 修改
% 提供设置页眉页脚的用户接口。在 \cs{fancyhead} 的可选参数中,
% \opt{E} 和 \opt{O} 分别表示在偶数页(even)和奇数页(odd),
% 而 \opt{L}、\opt{R} 和 \opt{C} 则分别表示左(left)、右
% (right)和中间(center)。按照通常的排版规则,在双面模式下,
% 偶数页的中间页眉文字在左,奇数页则在右。单面模式下,左右页眉都要显示。
% \begin{macrocode}
-%<*class>
\keys_define:nn { nju / style }
{
% \end{macrocode}
@@ -4374,7 +4464,7 @@ To produce the documentation run the original source files ending with
\RenewDocumentCommand \frontmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c_@@_pagestyle_tl
+ \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
\pagenumbering { Roman }
}
% \end{macrocode}
@@ -4389,7 +4479,7 @@ To produce the documentation run the original source files ending with
\RenewDocumentCommand \mainmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c_@@_pagestyle_tl
+ \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
\pagenumbering { arabic }
\normalfont \normalsize
}
@@ -4401,7 +4491,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\AtBeginEnvironment { document }
{
- \exp_args:NV \pagestyle \c_@@_pagestyle_tl
+ \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
\pagenumbering { Roman }
}
% \end{macrocode}
@@ -4846,12 +4936,13 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
%
% \changes{v0.12}{2021/12/06}{删除了可能导致冲突的 \pkg{floatrow}。}
+% \changes{v0.18}{2022/05/08}{图表标题使用粗体。}
% 图表标题样式。文字设置为五号宋体,标签设置为粗体,间隔一个全角空格。
% \begin{macrocode}
\DeclareCaptionStyle{njucap}
{
font = small,
- labelfont = bf,
+ font += bf,
labelsep = quad,
justification = centering
}
@@ -5255,7 +5346,7 @@ To produce the documentation run the original source files ending with
\@@_declare_element:nn { cover / nl / name }
{
content =
- \@@_spread_box:nnV { 6 em } { } \c_@@_name_title_tl,
+ \@@_spread_box:nnV { 6 em } { } \c_@@_name_title_b_tl,
format = \zihao { -0 },
bottom-skip = 0 pt plus 1 fil
}
@@ -5291,7 +5382,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { cover / nl / bottom }
{
- content = \@@_cover_bottom_nl:,
+ content = \@@_cover_bottom_nl:n { 4 },
bottom-skip = 1 cm,
align = r
}
@@ -5303,7 +5394,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { cover / nl / date }
{
- content = \@@_qquad: 年 \@@_quad: 月 \@@_quad: 日,
+ content = \g_@@_info_bottomdate_tl,
format = \kaishu \zihao { 3 }
}
% \end{macrocode}
@@ -5331,7 +5422,7 @@ To produce the documentation run the original source files ending with
{
\parbox [ b ] { 15 em } { \@@_uline_title: } \par
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } \c_@@_name_title_b_tl }
+ { \zihao { 4 } \c_@@_name_subtitle_tl }
\skip_vertical:N \c_zero_skip
\@@_ulined_center_box:nn { 4.5 em } { \g_@@_info_author_tl }
\skip_vertical:n { - 0.5 cm }
@@ -5342,6 +5433,7 @@ To produce the documentation run the original source files ending with
%
% \begin{macro}{\@@_cover_info_nl:}
% \changes{v0.17}{2022/04/09}{优化国家图书馆封面导师联系方式的输出格式。}
+% \changes{v0.19}{2022/05/23}{补充国家图书馆封面的学位授予单位和日期。}
% 国家图书馆封面信息栏。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_info_nl:
@@ -5357,22 +5449,22 @@ To produce the documentation run the original source files ending with
\@@_uline_bientry:Nnnn \l_@@_tmpa_dim { major_b } { major } { } \\
\@@_uline_bientry:Nnnn \l_@@_tmpa_dim { submitdate } { submitdate } { }
\@@_uline_bientry:Nnnn \l_@@_tmpa_dim { defenddate } { defenddate } { } \\
- \@@_full_uline:Nn \l_@@_tmpa_dim { \c_@@_name_confer_tl }
- \@@_uline:n { \l_@@_tmpa_dim }
+ \@@_uline_entry:Nnnn \l_@@_tmpa_dim { confer } { confer } { }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_cover_bottom_nl:}
+% \begin{macro}{\@@_cover_bottom_nl:n}
+% \changes{v0.19}{2022/05/20}{将国家图书馆封面的评审委员会人数分离为单独参数。}
% 国家图书馆封面底部信息。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_cover_bottom_nl:
+\cs_new_protected:Npn \@@_cover_bottom_nl:n #1
{
- \@@_name:n { chairman } \@@_hskip:
- \@@_ulined_center_box:nn { 9 em } { \@@_info:n { chairman } } \\
- \@@_name:n { reviewer } \@@_hskip:
- \@@_multiline_box:nnnn { \l_@@_tmp_int }
- { \g_@@_info_reviewer_clist } { 4 } { 9 em }
+ \c_@@_name_chairman_tl \@@_hskip:
+ \@@_ulined_center_box:nn { 9 em } { \g_@@_info_chairman_tl } \\
+ \c_@@_name_reviewer_tl \@@_hskip:
+ \@@_multiline_box:NNnn \l_@@_tmp_int
+ \g_@@_info_reviewer_clist { #1 } { 9 em }
}
% \end{macrocode}
% \end{macro}
@@ -5627,12 +5719,22 @@ To produce the documentation run the original source files ending with
%
% \begin{macro}{\@@_make_origdecl: }
% \changes{v0.13}{2021/12/15}{加入本科生的诚信承诺书。}
+% \changes{v0.19}{2022/05/22}{跟进新版本科生诚信承诺书样式。}
% 生成本科生的诚信承诺书或研究生的学位论文原创性声明。
% \begin{macrocode}
\cs_new_protected:Npn \@@_make_origdecl:
{
- \chapter* { \c_@@_name_origdecl_tl }
+%<definition-ug> \cleardoublepage
+%<definition-g> \chapter* { \c_@@_name_origdecl_tl }
\thispagestyle { empty }
+%<*definition-ug>
+ \begin{center}
+ \njuemblem{2cm}{!}\\
+ {\zihao{-1}\sffamily \c__nju_name_origdecl_tl }
+ \end{center}
+ \zihao{-3}
+ \hspace{2em}
+%</definition-ug>
\c_@@_text_origdecl_tl
\vfil
\begin{flushright}
@@ -5776,7 +5878,7 @@ To produce the documentation run the original source files ending with
% 在标题页后使用大写罗马字母页码,恢复正常字体设置。
% \begin{macrocode}
\cleardoublepage
- \exp_args:NV \pagestyle \c_@@_pagestyle_tl
+ \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
\pagenumbering { Roman }
}
%</class>
@@ -5890,6 +5992,7 @@ To produce the documentation run the original source files ending with
% \begin{macro}{abstract/mark}
% 英文摘要标题实例。
% \begin{macrocode}
+%<*definition-g>
\@@_declare_element:nn { abstract / mark }
{
content = \c_@@_name_abstract_b_tl,
@@ -5918,7 +6021,6 @@ To produce the documentation run the original source files ending with
% \end{arguments}
% 研究生中文摘要页包括下划线以及若干特殊的对齐方式,实现方式较为繁琐。使用 \cs{@@_full_uline:NV} 确定内容宽度后,调用 \cs{@@_uline:n} 或 \cs{@@_ulined_center_box:nn} 命令以绘制横穿页面的下划线。前两行为标题。
% \begin{macrocode}
-%<*definition-g>
\cs_new_protected:Npn \@@_abs_info_g:n #1
{
\@@_uline_list:xnn
@@ -6139,6 +6241,7 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\njupaperlist}
% \changes{v0.10}{2021/09/29}{新增了成果列表页面。}
% \changes{v0.14}{2021/12/20}{成果列表中可突出指定作者姓名及年份。}
+% \changes{v0.19}{2022/05/22}{修复成果列表与章末参考文献表的冲突。}
% 成果列表。
% \begin{macrocode}
\NewDocumentCommand \njupaperlist
@@ -6159,10 +6262,21 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\RenewDocumentCommand \mkbibdateshort { m m m }
{ \textbf { \thefield { ##1 } } }
- \begin{refsection}
- \nocite { #2 }
- \printbibliography [ heading = subbibliography, title = #1 ]
- \end{refsection}
+% \end{macrocode}
+% 在使用章末参考文献表时,\env{refsection} 的单独一章范围内生效,
+% 无需额外添加环境。 ^^A TODO: 待修改为更简洁的形式
+% \begin{macrocode}
+ \tl_if_eq:NnTF \blx@refsecreset@level { 2 }
+ {
+ \nocite { #2 }
+ \printbibliography [ heading = subbibliography, title = #1 ]
+ }
+ {
+ \begin{refsection}
+ \nocite { #2 }
+ \printbibliography [ heading = subbibliography, title = #1 ]
+ \end{refsection}
+ }
\group_end:
}
% \end{macrocode}
@@ -6301,16 +6415,16 @@ To produce the documentation run the original source files ending with
\clist_map_inline:nn
{
% 用于摘要的作者名称字样
- { author_a } { 本科生姓名 },
- { grade } { 年级 },
- { origdecl }
- { \c_@@_name_nju_tl 本科毕业论文(设计)诚信承诺书 },
- { origsign } { 作者签名 },
- { submitdate } { 提交日期 },
- { supv } { 导师 },
- { title } { 题目 },
- { type } { 本科生毕业论文(设计、作品) },
- { ug } { 本科生 }
+ { author_a } { 本科生姓名 },
+ { grade } { 年级 },
+ { origdecl } { \c_@@_name_nju_tl
+ 本科毕业论文(设计) \\ 诚信承诺书 },
+ { origsign } { 作者签名 },
+ { submitdate } { 提交日期 },
+ { supv } { 导师 },
+ { title } { 题目 },
+ { type } { 本科生毕业论文(设计、作品) },
+ { ug } { 本科生 }
}
{ \@@_define_name:nn #1 }
\clist_map_inline:nn
@@ -6332,6 +6446,8 @@ To produce the documentation run the original source files ending with
%</definition-ug>
% \end{macrocode}
%
+% \changes{v0.19}{2022/05/22}{更正研究生普通封面专业字样。}
+% \changes{v0.19}{2022/05/22}{更正国家图书馆封面学位论文字样。}
% 研究生模板默认名称。
% \begin{macrocode}
%<*definition-g>
@@ -6376,6 +6492,7 @@ To produce the documentation run the original source files ending with
\c_@@_name_blankdate_tl ) },
{ sign } { (签字) },
{ submitdate } { 论文提交日期 },
+ { subtitle } { (题名和副题名) },
{ supv } { 导师 },
% 用于摘要的导师名称字样
{ supv_a } { 指导教师(姓名、职称) },
@@ -6388,7 +6505,7 @@ To produce the documentation run the original source files ending with
% 用于摘要的标题名称字样
{ title_a } { 题目 },
% 用于国家图书馆封面的标题名称字样
- { title_b } { (题名和副题名) },
+ { title_b } { 学位论文 },
% 用于出版授权书的标题名称字样
{ title_c } { 论文题名 },
{ udc } { U D C },
@@ -6401,10 +6518,16 @@ To produce the documentation run the original source files ending with
{ \c_@@_name_nju_tl \g_@@_info_type_tl 中文摘要首页用纸 }
{ \c_@@_name_nju_tl \g_@@_info_type_tl 英文摘要首页用纸 },
{ author } { 作者姓名 } { POSTGRADUATE },
- { major } { 专业方向 } { SPECIALIZATION },
+ { major } { 专业名称 } { SPECIALIZATION },
{ supvfull } { 指导教师 } { MENTOR }
}
{ \@@_define_name:nnn #1 }
+% \end{macrocode}
+%
+% 对专业硕士的封面条目进行临时修改。
+% \begin{macrocode}
+\int_compare:nT { \g_@@_info_degree_int == 3 }
+ { \njusetname{major}{专业学位类别(领域)} }
%</definition-g>
% \end{macrocode}
%
@@ -6510,11 +6633,14 @@ To produce the documentation run the original source files ending with
% \label{subsubsec:constant-format}
%
% \changes{v0.17}{2022/04/09}{将样式定义分离到 \file{.def} 文件。}
+% \changes{v0.19}{2022/05/11}{简化默认页面样式的修改方式。}
% 默认样式。
% \begin{macrocode}
\clist_map_inline:nn
{
- { section } { \large \normalfont \sffamily },
+%<definition-ug> { pagestyle } { plain },
+%<definition-g> { pagestyle } { headings },
+ { section } { \large \sffamily },
{ chapter } { \c_@@_fmt_section_tl \centering },
{ chapterintoc } { \c_@@_fmt_section_tl },
{ subsection } { \c_@@_fmt_section_tl },
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.ins b/macros/unicodetex/latex/njuthesis/njuthesis.ins
index 5efc57a52f..1d947d360e 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.ins
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.ins
@@ -76,18 +76,6 @@ To produce the documentation run the original source files ending with
\Msg{*************************************************************}
\endbatchfile
-\__nju_declare_element:nn { abstract / mark }
- {
- content = \c__nju_name_abstract_b_tl,
- format = \sffamily \zihao { -3 },
- bottom-skip = 1 cm
- }
-\__nju_declare_element:nn { abstract / en / mark }
- {
- content = \c__nju_name_abstract_b_en_tl,
- format = \sffamily \zihao { -3 },
- bottom-skip = 1 cm
- }
\endinput
%%
%% End of file `njuthesis.ins'.
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.pdf b/macros/unicodetex/latex/njuthesis/njuthesis.pdf
index 97e9015106..3ed1bf2a66 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.pdf
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.pdf
Binary files differ