diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 0000000..62b8331 --- /dev/null +++ b/.latexmkrc @@ -0,0 +1,8 @@ +################ +# nomenclature # +################ +push @generated_exts, 'nlo', 'nls'; +add_cus_dep("nlo", "nls", 0, "nlo2nls"); +sub nlo2nls { + system("makeindex $_[0].nlo -s nomencl.ist -o $_[0].nls -t $_[0].nlg"); +} diff --git a/yanputhesis.cls b/yanputhesis.cls index a288c7f..8936e0e 100644 --- a/yanputhesis.cls +++ b/yanputhesis.cls @@ -338,7 +338,7 @@ %%-----------------------------------------------------------------------------% \RequirePackage{appendix} % 添加附录功能 %%-----------------------------------------------------------------------------% -\RequirePackage{nomencl} % 添加符号表功能 +\RequirePackage[intoc]{nomencl} % 添加符号表功能 \RequirePackage{multicol} % 页面具体尺寸信息 \makenomenclature % 单栏符号表 \@ifundefined{chapter}{\def\npu@nomsec{section}}{\def\npu@nomsec{chapter}} @@ -348,6 +348,7 @@ % \setlength{\columnsep}{20pt} % \begin{multicols}{2}[% \csname\npu@nomsec\endcsname*{\nomname} + \@mkboth{\nomname}{\nomname}% \if@intoc\addcontentsline{toc}{\npu@nomsec}{\nomname}\fi \nompreamble % \raggedcolumns % ] diff --git a/yanputhesis.dtx b/yanputhesis.dtx index 045f5c3..3b8a311 100644 --- a/yanputhesis.dtx +++ b/yanputhesis.dtx @@ -1130,7 +1130,7 @@ int main() % \end{macrocode} % \markdtxchanges{v1.7.0}{2022/10/31}{使用单栏符号表} % \begin{macrocode} -\RequirePackage{nomencl} % 添加符号表功能 +\RequirePackage[intoc]{nomencl} % 添加符号表功能 \RequirePackage{multicol} % 页面具体尺寸信息 \makenomenclature % 单栏符号表 % https://tex.stackexchange.com/questions/78764/two-column-nomenclature @@ -1141,6 +1141,7 @@ int main() % \setlength{\columnsep}{20pt} % \begin{multicols}{2}[% \csname\npu@nomsec\endcsname*{\nomname} + \@mkboth{\nomname}{\nomname}% \if@intoc\addcontentsline{toc}{\npu@nomsec}{\nomname}\fi \nompreamble % \raggedcolumns % ]