Skip to content
Snippets Groups Projects
Commit 6398deb3 authored by atxy's avatar atxy
Browse files

docs: 更新测试文件和修订记录

- 修复与 mathtools 的兼容问题
parent f453e680
No related branches found
No related tags found
No related merge requests found
...@@ -8,12 +8,41 @@ ...@@ -8,12 +8,41 @@
# 新增 # 新增
- 新增博士后出站报告模板
- 新增数学字体选项 `math-font`
- 新增默认字号选项 `zihao`
- 新增行距选项 `linespread`
- 新增最小化模式选项 `minimal`
- 新增禁用若干内置宏包的选项
- `\njusetup` 提供更多选项输入模式
- 新增一系列数学符号选项 `math`
- 新增编号连接符设置 `label-sep` - [#134]
- 可使用 `\njusetlength` 修改下划线的宽度和偏移 - [#155] - 可使用 `\njusetlength` 修改下划线的宽度和偏移 - [#155]
- 可使用 `\njusetformat` 修改本科摘要标签格式 - [#155] - 可使用 `\njusetformat` 修改本科摘要标签格式 - [#155]
- 为页面对象添加书签属性
## 修复
- 修正元素对象的底部间距设置
## 变动 ## 变动
- 调整 `type``degree` 文档类选项的定义 - [#117]
- 移除毕业设计封面
- `nlcover` 选项更名为 `nl-cover`
- `blind` 选项更名为 `anonymous`
- 删除定理类环境选项 `theorem`
- 使用 `create-theorem` 进行默认的定理类环境配置
- 摘要、目录、页眉页脚设置项更名
- 调整研究生模板的封面布局 - [#144] - 调整研究生模板的封面布局 - [#144]
- 移除研究生英文摘要的下划线
- 移除内置的 `mathtools`
- 内部变量与函数重新命名
### 杂项
- 删除手册中的基础教学内容
- 在手册中以不同颜色指示不同模块
## [0.20.0] - 2022-06-10 ## [0.20.0] - 2022-06-10
...@@ -401,12 +430,15 @@ ...@@ -401,12 +430,15 @@
[#107]: https://github.com/nju-lug/NJUThesis/issues/107 [#107]: https://github.com/nju-lug/NJUThesis/issues/107
[#111]: https://github.com/nju-lug/NJUThesis/issues/111 [#111]: https://github.com/nju-lug/NJUThesis/issues/111
[#116]: https://github.com/nju-lug/NJUThesis/issues/116 [#116]: https://github.com/nju-lug/NJUThesis/issues/116
[#117]: https://github.com/nju-lug/NJUThesis/issues/117
[#119]: https://github.com/nju-lug/NJUThesis/issues/119 [#119]: https://github.com/nju-lug/NJUThesis/issues/119
[#121]: https://github.com/nju-lug/NJUThesis/issues/121 [#121]: https://github.com/nju-lug/NJUThesis/issues/121
[#130]: https://github.com/nju-lug/NJUThesis/issues/130 [#130]: https://github.com/nju-lug/NJUThesis/issues/130
[#131]: https://github.com/nju-lug/NJUThesis/issues/131 [#131]: https://github.com/nju-lug/NJUThesis/issues/131
[#134]: https://github.com/nju-lug/NJUThesis/discussions/134
[#137]: https://github.com/nju-lug/NJUThesis/issues/137 [#137]: https://github.com/nju-lug/NJUThesis/issues/137
[#139]: https://github.com/nju-lug/NJUThesis/discussions/139 [#139]: https://github.com/nju-lug/NJUThesis/discussions/139
[#144]: https://github.com/nju-lug/NJUThesis/issues/144
[#147]: https://github.com/nju-lug/NJUThesis/discussions/147 [#147]: https://github.com/nju-lug/NJUThesis/discussions/147
[#148]: https://github.com/nju-lug/NJUThesis/issues/148 [#148]: https://github.com/nju-lug/NJUThesis/issues/148
[#150]: https://github.com/nju-lug/NJUThesis/discussions/150 [#150]: https://github.com/nju-lug/NJUThesis/discussions/150
......
...@@ -4074,7 +4074,13 @@ To produce the documentation run the original source files ending with ...@@ -4074,7 +4074,13 @@ To produce the documentation run the original source files ending with
% \begin{macrocode} % \begin{macrocode}
\@@_loadpkg_enit: \@@_loadpkg_enit:
\@@_loadpkg_fm: \@@_loadpkg_fm:
\@@_loadpkg_um: % \end{macrocode}
% 为保证 \pkg{cleveref} 在 \pkg{unicode-math}
% 缺失的情况下也能正常工作,载入了 \pkg{amsmath}。
% \begin{macrocode}
\bool_if:NTF \g_@@_opt_load_um_bool
{ \RequirePackage { unicode-math } }
{ \RequirePackage { amsmath } }
% \end{macrocode} % \end{macrocode}
% %
% 载入各种宏包。 % 载入各种宏包。
...@@ -4085,11 +4091,6 @@ To produce the documentation run the original source files ending with ...@@ -4085,11 +4091,6 @@ To produce the documentation run the original source files ending with
fancyhdr, fancyhdr,
setspace, setspace,
% \end{macrocode} % \end{macrocode}
% 为保证 \pkg{cleveref} 在 \pkg{unicode-math}
% 缺失的情况下也能正常工作,这里重复载入了 \pkg{amsmath}。
% \begin{macrocode}
amsmath,
% \end{macrocode}
% \changes{v0.14}{2021/12/21}{移除内置的 \pkg{multirow}、\pkg{subcaption} % \changes{v0.14}{2021/12/21}{移除内置的 \pkg{multirow}、\pkg{subcaption}
% 和 \pkg{wrapfig}。} % 和 \pkg{wrapfig}。}
% 图片与表格。 % 图片与表格。
...@@ -5677,7 +5678,7 @@ To produce the documentation run the original source files ending with ...@@ -5677,7 +5678,7 @@ To produce the documentation run the original source files ending with
% \end{macro} % \end{macro}
% %
% \begin{macro}{label-sep/figure,label-sep/table,label-sep/equation} % \begin{macro}{label-sep/figure,label-sep/table,label-sep/equation}
% \changes{v0.18}{2022/07/31}{添加编号连接符设置项。} % \changes{1.0}{2022/07/31}{添加编号连接符设置项。}
% 修改图片、表格、公式编号中的连接符。 % 修改图片、表格、公式编号中的连接符。
% \footnote{\url{https://tex.stackexchange.com/q/61756/}} % \footnote{\url{https://tex.stackexchange.com/q/61756/}}
% \begin{macrocode} % \begin{macrocode}
...@@ -5774,14 +5775,6 @@ To produce the documentation run the original source files ending with ...@@ -5774,14 +5775,6 @@ To produce the documentation run the original source files ending with
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
% \begin{macro}{\@@_loadfont_math:}
% 加载选定数学字体。
% \begin{macrocode}
\cs_new_eq:Nc \@@_loadfont_math:
{ @@_loadfont_math_ \g_@@_font_math_tl : }
% \end{macrocode}
% \end{macro}
%
% ^^A 选项名称来自 thuthesis % ^^A 选项名称来自 thuthesis
% \begin{macrocode} % \begin{macrocode}
\keys_define:nn { nju / math } \keys_define:nn { nju / math }
...@@ -5897,7 +5890,6 @@ To produce the documentation run the original source files ending with ...@@ -5897,7 +5890,6 @@ To produce the documentation run the original source files ending with
uppercase-greek = upright uppercase-greek = upright
} }
\@@_um_setup:n { bold-style = TeX } \@@_um_setup:n { bold-style = TeX }
\@@_loadfont_math:
}, },
style / ISO .code:n = style / ISO .code:n =
{ {
...@@ -5929,17 +5921,18 @@ To produce the documentation run the original source files ending with ...@@ -5929,17 +5921,18 @@ To produce the documentation run the original source files ending with
uppercase-greek = italic uppercase-greek = italic
} }
\@@_um_setup:n { bold-style = ISO } \@@_um_setup:n { bold-style = ISO }
\@@_loadfont_math:
}, },
style .initial:n = GB style .initial:n = GB
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
% 在 |\begin{document}| 处设置小于等于号和实部符号等的样式。 % 在 |\begin{document}| 处载入字体以兼容 \pkg{mathtools},
% 并设置小于等于号和实部符号等的样式。
% \begin{macrocode} % \begin{macrocode}
\@@_at_begin_document:n \@@_at_begin_document:n
{ {
\use:c { @@_loadfont_math_ \g_@@_font_math_tl : }
\bool_if:NT \g_@@_opt_math_leq_bool \bool_if:NT \g_@@_opt_math_leq_bool
{ {
\cs_set_eq:NN \le \leslant \cs_set_eq:NN \le \leslant
...@@ -7246,7 +7239,7 @@ To produce the documentation run the original source files ending with ...@@ -7246,7 +7239,7 @@ To produce the documentation run the original source files ending with
% %
% \paragraph{本科生} % \paragraph{本科生}
% \changes{v0.13}{2021/12/12}{使用 \LaTeX3 语法重构本科生摘要。} % \changes{v0.13}{2021/12/12}{使用 \LaTeX3 语法重构本科生摘要。}
% \changes{v0.21}{2022/06/16}{统一本科生摘要页的标签格式。} % \changes{v1.0}{2022/06/16}{统一本科生摘要页的标签格式。}
% %
% \begin{macro}{\@@_abs_info_u:,\@@_abs_info_en_u:} % \begin{macro}{\@@_abs_info_u:,\@@_abs_info_en_u:}
% 封装好的本科生摘要信息栏。 % 封装好的本科生摘要信息栏。
...@@ -7912,7 +7905,7 @@ To produce the documentation run the original source files ending with ...@@ -7912,7 +7905,7 @@ To produce the documentation run the original source files ending with
% \label{subsubsec:constant-length} % \label{subsubsec:constant-length}
% %
% \changes{v0.17}{2022/04/09}{将长度值分离到 \file{.def} 文件。} % \changes{v0.17}{2022/04/09}{将长度值分离到 \file{.def} 文件。}
% \changes{v0.21}{2022/06/11}{可以单独指定下划线的宽度和偏移。} % \changes{v1.0}{2022/06/11}{可以单独指定下划线的宽度和偏移。}
% 默认固定长度值。 % 默认固定长度值。
% \begin{macrocode} % \begin{macrocode}
\clist_map_inline:nn \clist_map_inline:nn
......
\def\TEST{} \def\TEST{}
\documentclass[degree=phd,nlcover]{njuthesis} \documentclass[type=doctor,nl-cover,minimal]{njuthesis}
\input{test.tex} \input{test.tex}
\def\TEST{} \def\TEST{}
\documentclass[degree=mg,decl-page]{njuthesis} \documentclass[type=master,decl-page,minimal]{njuthesis}
\input{test.tex} \input{test.tex}
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
\ifdefined\TEST\else \ifdefined\TEST\else
% 自行编译前需反注释以下任意命令 % 自行编译前需反注释以下任意命令
% \documentclass{njuthesis} % \documentclass{njuthesis}
\documentclass[create-theorem=true]{njuthesis}
% \documentclass[type=master]{njuthesis} % \documentclass[type=master]{njuthesis}
% \documentclass[type=doctor]{njuthesis} % \documentclass[type=doctor]{njuthesis}
\documentclass[type=postdoc]{njuthesis} % \documentclass[type=postdoc]{njuthesis}
% \documentclass[oneside]{njuthesis} % \documentclass[oneside]{njuthesis}
% \documentclass[cjk-font=noto,latin-font=gyre]{njuthesis} % \documentclass[cjk-font=noto,latin-font=gyre]{njuthesis}
% \documentclass[cjk-font=source,latin-font=gyre]{njuthesis} % \documentclass[cjk-font=source,latin-font=gyre]{njuthesis}
...@@ -17,55 +18,51 @@ ...@@ -17,55 +18,51 @@
% \documentclass[draft]{njuthesis} % \documentclass[draft]{njuthesis}
\fi \fi
\njusetup { \njusetup[info]{
info = { title = {一种使用南京大学 \hologo{LaTeX} 模板\\编写毕业论文的经验性方法},
title = {一种使用南京大学 \hologo{LaTeX} 模板\\编写毕业论文的经验性方法}, title* = {An Empirical Way of Composing Thesis with NJU \hologo{LaTeX} Template},
title* = {An Empirical Way of Composing Thesis with NJU \hologo{LaTeX} Template}, keywords = {我,就是,充数的,关键词},
keywords = {我,就是,充数的,关键词}, keywords* = {Dummy,Keywords,Here,{it is}},
keywords* = {Dummy,Keywords,Here,{it is}}, grade = {2018},
grade = {2018}, % student-id = {DZ18114514},
% student-id = {DZ18114514}, student-id = {189114514},
student-id = {189114514}, author = {周煜华},
author = {周煜华}, author* = {Zhou~Yuhua},
author* = {Zhou~Yuhua}, department = {拉太赫科学与技术学院},
department = {拉太赫科学与技术学院}, department* = {School~of~\hologo{LaTeX}},
department* = {School~of~\hologo{LaTeX}}, major = {拉太赫语言学},
major = {拉太赫语言学}, major* = {\hologo{LaTeX}~Linguistics},
major* = {\hologo{LaTeX}~Linguistics}, field = {拉太赫语言在现当代的使用},
field = {拉太赫语言在现当代的使用}, field* = {Contemporary~Usage~of~the~\hologo{LaTeX}~Language},
field* = {Contemporary~Usage~of~the~\hologo{LaTeX}~Language}, supervisor = {李成殿,教授},
supervisor = {李成殿,教授}, supervisor* = {Professor Li Chengdian},
supervisor* = {Professor Li Chengdian}, % supervisor-ii = {孙赫弥,副教授},
% supervisor-ii = {孙赫弥,副教授}, % supervisor-ii* = {Associate~professor~Sun~Hemi},
% supervisor-ii* = {Associate~professor~Sun~Hemi}, % submit-date = {2021-08-10},
% submit-date = {2021-08-10}, % defend-date = {2021-09-19},
% defend-date = {2021-09-19}, chairman = {张晓山~教授},
chairman = {张晓山~教授}, reviewer = {王瑞希~教授,郭德纲~副教授,华芈库~教授,戴菲菲~教授},
reviewer = {王瑞希~教授,郭德纲~副教授,华芈库~教授,戴菲菲~教授}, clc = {0175.2},
clc = {0175.2}, secret-level = {限制},
secret-level = {限制}, udc = {004.72},
udc = {004.72}, supervisor-contact = {拉太赫科学与技术学院~枝江市结丘路~19~号~114514},
supervisor-contact = {拉太赫科学与技术学院~枝江市结丘路~19~号~114514}, email={git+nju-lug-email-3104-issue-@yaoge123.cn}
email={git+nju-lug-email-3104-issue-@yaoge123.cn} }
}, \njusetup[bib]{
bib = { % style = author-year,
% style = author-year, resource = {test.bib},
resource = {test.bib}, option = {doi=false, isbn=false, url=false, eprint=false}
option = {doi=false, isbn=false, url=false, eprint=false} }
}, \njusetup[ext-image]{
style = { emblem = {wug},
emblem-img = {wug}, name = {name}
name-img = {name}, }
abstract-in-toc = false, \njusetup[abstract/title-style]{natural}
toc-in-toc = false, \njusetup{
header = { abstract/toc-entry = false,
{OR}{\thepage},{EL}{\thepage}, tableofcontents/toc-entry = false,
{ER}{\leftmark},{OL}{\rightmark}}, math/style = ISO
% header = {}, }
footer = {},
footnote-style=pifont
}
}
% \addbibresource{test.bib} % \addbibresource{test.bib}
...@@ -79,6 +76,7 @@ ...@@ -79,6 +76,7 @@
\njusetname{tableofcontents}{\qquad{}} \njusetname{tableofcontents}{\qquad{}}
\njusetname{listoffigures}{插图清单} \njusetname{listoffigures}{插图清单}
\njusetname{listoftables}{表格清单} \njusetname{listoftables}{表格清单}
\njusetname{abstract}[b]{我是摘要}
\njusetname*{abstract}[b]{Abstract} \njusetname*{abstract}[b]{Abstract}
% \njusetlength{coveruline}{330pt} % \njusetlength{coveruline}{330pt}
\njusetformat{chapter}{\raggedleft\kaishu\zihao{-1}} \njusetformat{chapter}{\raggedleft\kaishu\zihao{-1}}
...@@ -131,12 +129,8 @@ ...@@ -131,12 +129,8 @@
% https://tex.stackexchange.com/questions/33264/span-as-a-math-operator % https://tex.stackexchange.com/questions/33264/span-as-a-math-operator
\DeclareMathOperator{\spn}{span} \DeclareMathOperator{\spn}{span}
\renewcommand{\vec}[1]{\mathbf{#1}}
% \RenewDocumentCommand\vec{m}{\mathbf{#1}}
\NewDocumentCommand\mathbi{m}{\textbf{\em #1}} \NewDocumentCommand\mathbi{m}{\textbf{\em #1}}
\njusetname{abstract}[b]{谁的姓名}
\begin{document} \begin{document}
% \frontmatter % \frontmatter
...@@ -163,7 +157,6 @@ ...@@ -163,7 +157,6 @@
\end{abstract*} \end{abstract*}
\raggedbottom \raggedbottom
% \flushbottom
\tableofcontents \tableofcontents
\listoffigures \listoffigures
...@@ -254,10 +247,7 @@ ...@@ -254,10 +247,7 @@
\input{chapters/Mathematics} \input{chapters/Mathematics}
\input{chapters/Bibliography} \input{chapters/Bibliography}
% \bgroup \printbibliography
% \sloppy
\printbibliography
% \egroup
\begin{acknowledgement} \begin{acknowledgement}
感谢\href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU Linux User Group} 感谢\href{https://git.nju.edu.cn/nju-lug/lug-introduction}{NJU Linux User Group}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment