summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/njurepo/README.md192
-rw-r--r--Master/texmf-dist/doc/latex/njurepo/dtx-style.sty1
-rw-r--r--Master/texmf-dist/doc/latex/njurepo/example.pdfbin901629 -> 653207 bytes
-rw-r--r--Master/texmf-dist/doc/latex/njurepo/njurepo.pdfbin343870 -> 432752 bytes
-rw-r--r--Master/texmf-dist/source/latex/njurepo/njurepo.dtx170
-rw-r--r--Master/texmf-dist/tex/latex/njurepo/njurepo.cls77
6 files changed, 308 insertions, 132 deletions
diff --git a/Master/texmf-dist/doc/latex/njurepo/README.md b/Master/texmf-dist/doc/latex/njurepo/README.md
index 9b3a2ee2af1..3f9d325527a 100644
--- a/Master/texmf-dist/doc/latex/njurepo/README.md
+++ b/Master/texmf-dist/doc/latex/njurepo/README.md
@@ -1,25 +1,181 @@
-![Version](https://img.shields.io/badge/version-1.1.0-blue.svg)
+![Version](https://img.shields.io/badge/version-1.1.2-blue.svg)
-# What's NJUrepo?
-NJUrepo stands for <b>N</b>an<b>j</b>ing <b>U</b>niversity versatile <b>Repo</b>rt.
+# What's NJUrepo
-NJUrepo是为南京大学本科生设计的一个免于配置的作业、实验报告模板。希望它可以使你
-的作业/实验报告不会因形式上的缺陷导致评分的下降。
+NJUrepo stands for **N**an**j**ing **U**niversity versatile **Repo**rt.
-# 使用方法
-下载后参考njurepo.pdf文档和example.pdf示例文档,以及main.tex和parts/examples/的示例代码进行使用。生成文件方法见Makefile的用法
+NJUrepo是为南京大学本科生设计的一个免于配置的作业、实验报告模板。希望它可以使你的作业/实验报告不会因形式上的缺陷导致评分的下降。
-# Makefile的用法
+该文档格式基于 ctexbook, 主要完成了除了主体内容以外的几乎**全部**工作。同时,通过使用 Github 版本宏包,你还可以更好的管理自己的 $\LaTeX$ 文档。
-```shell
-make [{all|thesis|shuji|doc|clean|cleanall|distclean}] \
- [METHOD={latexmk|xelatex|pdflatex}]
+## 安装方法
+
+本宏包已被收纳于 CTAN 中,凡安装完整版 Texlive 用户可直接使用 `\usepackage{njurepo}`进行使用。若想获得最新版本的 NJUrepo 请前往github主页下载:https://github.com/zhengzangw/njurepo
+
+## 演示文档与帮助文档
+
+* 问题求解作业 : ps
+* ML/ICS/OS/数据通信 作业 : dc
+* 数字电路/PA/OS Lab 实验报告 : ml
+* 数学/物理 课程论文 : math
+* 软件文档 : digital
+* 帮助文档 : `make texdoc` 或 `texdoc njurepo` 以获得
+
+## 使用方法
+
+从 Github 上下载后使用命令 `make cls` 获得 .cls 宏包。可以仿照现成的文件 (`python util.py -g essay -n examples` 生成)直接使用该宏包,或者可以使用以下推荐方法。
+
+Github 版本中同时包含了一个 Makefile 文件和 util.py 文件。这两个文件可以让你在一个文件夹内管理所有课程的作用和报告。具体方法为:
+
+### 生成学科项目
+
+parts 下每个文件夹代表着一个项目,每个项目由 cover.tex 配置文件和若干源文件组成。可以手动添加文件夹和配置文件,也可以使用命令 `python util.py -c project_name` 生成
+
+生成完成后按提示配置 cover.tex。对于小作业而言,只需填需要的几个,其它全部留空即可
+
+### 选择格式
+
+Makefile 中内置了两个格式,可以通过 `python util.py -g single -n project-name -s one-single-file` 或 `make PROJECT=project-name NAME=one-single-file generate` 自动生成 single 格式,通过 `python util.py -g essay -n project-name` 或 `make PROJECT=project-name TYPE=essay generate` 自动生成 essay 格式
+
+single: 默认格式
+
+```tex
+\documentclass[language=english]{njurepo}
+\begin{document}
+\frontmatter
+\input{parts/math/cover}
+\mainmatter
+ \input{parts/math/one-single-file}
+\backmatter
+\end{document}
+```
+
+essay: 报告/论文格式
+
+```tex
+\documentclass[language=english]{njurepo}
+\begin{document}
+\frontmatter
+\input{parts/examples/cover}
+ \input{parts/examples/abstract}
+ \maketitlepage % 封面
+ \makeabstract % 摘要
+ \tableofcontents % 目录
+ \input{parts/examples/denotation} % 中英对照表
+\mainmatter
+ \input{parts/examples/chap01} % 主体内容
+\backmatter
+ \listoffigures % 图索引
+ \listoftables % 表格索引
+ \listofequations % 公式索引
+ \bibliographystyle{ref/numeric} % 参考文献样式 ref/numeric,ref/author-year,plainnat,IEEEtran
+ \bibliography{ref/refs} % 参考文献
+ \include{parts/examples/ack} % 致谢
+ \begin{appendix} % 附录
+ \input{parts/examples/appendix01}
+ \end{appendix}
+\end{document}
```
-## 目标
-* `make cls` 生成模板文件;
-* `make example` 生成实例 main.pdf;
-* `make doc` 生成使用说明书 njurepo.pdf;
-* `make clean` 删除示例文件的中间文件(不含 example.pdf);
-* `make cleanall` 删除示例文件的中间文件和 example.pdf;
-* `make distclean` 删除示例文件和模板的所有中间文件和 PDF。 \ No newline at end of file
+### 生成文档
+
+模板生成后,使用 `make PROJECT=project-name TYPE=essay` 及 `make PROJECT=project-name NAME=one-single-file` 来更新输出文档。
+
+### 清理文件
+
+`make all PROJECT=project-name NAME=one-single-file` 将在完成后自动清理过程文件,只留下 `.tex` 和 `.pdf` 文件
+`make distclean` 帮助删除主目录下所有 `.tex` 和 `.pdf` 文件
+
+## 选项
+
+* language: 目录(content)/章节(chapter)语言。无论选择哪个选择,中英均可输入。
+ * chinese
+ * english
+* open: 正规出版物的章节出现在奇数页,也就是右手边的页面。选择 `open=any` 时,如果前一章的最后一页也是奇数,那么模板会自动生成一个纯粹的空白页。
+ * any
+ * right
+* wide: 生成宽页面(可在作业时使用)
+* draft: 生成 Draft 水印
+
+## 默认加载的宏包
+
+模板自动引入以下宏包,对于宏包功能,可使用 `texdoc` 或 STFW 获得帮助。
+
+| 宏包名 | 用途 | 举例 |
+| -- | -- | -- |
+| etoolbox | 开发使用 ||
+| ifxetex | 开发使用 ||
+| xparse | 开发使用 ||
+| kvoptions | 开发使用 ||
+| ctexbook | 文档 ||
+| unicode-math | 数学字体 ||
+| xcolor | 颜色 ||
+| fancyhdr | 页眉页脚 ||
+| geometry | 页面设置 ||
+| enumitem | 调整列表 ||
+| environ | 定义环境 ||
+| natbib | 参考文献 ||
+| notoccite | 引用 ||
+| watermark | 水印 ||
+| hyperref | 超链接 ||
+| tcolorbox | 边框 ||
+| CJKfntef | 字体样式 | `\CJKunderdot{},\CJKunderline{}`|
+| amsmath | 数学支持 ||
+| ntheorem | 数学定理 ||
+| physics | 物理符号 | `\grad{}` |
+| stmaryrd | 更多数学符号 | `\trianglelefteqslant` |
+| bbding | 符号 | `\FiveFlowerPetal` |
+| graphicx | 插入图片 ||
+| subcaption | 图片排版 | `subfigure` 环境 |
+| pdfpages | pdf 插入 | `\includepdf{}`|
+| tikz | tikz 绘图 ||
+| dirtree | 绘制文件树 | `\dirtree{}`|
+| array | 数学模式表格支持 | `array` 环境 |
+| longtable | 表格支持 | `longtable` 环境 |
+| booktabs | 表格支持 | `\toprule,\middlerule,\bottomrule` |
+| multirow | 跨行 |`\multirow{2}{*}{content}`|
+| tabularx | 表格支持 | X 选项 |
+| diagbox | 斜线表格 | `\diagbox{}{}`|
+| makecell | 单元格布局 | `\thead{},\rothead{},\diagbox{}{}` |
+| float | 表格位置 | H 选项 |
+| listings | 代码 | `lstinputlisting{}` |
+| algorithm | 伪代码 | `algorithm` 环境 |
+| algpseudocode | 伪代码 | `algorithmic` 环境 |
+| verbatim | 无格式文本 | `verbatim` 环境 |
+
+### 默认加载的 tikz library
+
+* decorations
+* pathmorphing
+* graphs
+* calc
+
+## 自定义宏
+
+* `\nchapter{}` 不带任何装饰的居中 chapter
+* `nproblem` 无标号问题环境(适用于作业不抄题目)
+* `nsolution` 无标号解答环境
+* `cproblem` 好看的问题环境
+* `csolution` 好看的解答环境
+* `\sihao,\xiaosi` 字体大小调整
+* `\songti,\heiti` 中文字体
+* `\magenta{}, \red{}` 字体颜色
+* 代码环境 `\begin{cplus} \end{cplus}`, 现支持:
+ * code, cpseudo, cplus, shell, commandshell, verilog, python, latex
+* `\blankpage` 空页
+* `\figoptadd{option}{address}` 原地插入(H)图片
+* `\figoptaddcap{option}{address}{caption}` 原地插入(H)图片
+* `\tabncc{number-of-columns}{content}{caption}` 制作简易 n 列居中表格
+* `\tabnc{number-of-columns}{content}` 制作简易 n 列居中表格
+* `\inlinecite{}` 行内引用
+* `\cite` 普通引用
+* `\rom{2}` 罗马数字
+
+## Contact
+
+如果你使用时发现任何 bug 或得不到的格式,可以联系我或开 issue
+如果你有更好的作业/报告格式,欢迎添加或联系我帮忙添加
+
+## License
+
+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.3c or later is part of all distributions of LaTeX version 2005/12/01 or later. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/njurepo/dtx-style.sty b/Master/texmf-dist/doc/latex/njurepo/dtx-style.sty
index 4cc261d71ec..09826e1ce4c 100644
--- a/Master/texmf-dist/doc/latex/njurepo/dtx-style.sty
+++ b/Master/texmf-dist/doc/latex/njurepo/dtx-style.sty
@@ -19,6 +19,7 @@
%% version 2005/12/01 or later.
%%
+ % \input{parts/examples/appendix01}
\ProvidesPackage{dtx-style}
\RequirePackage{hypdoc}
\RequirePackage{ifthen}
diff --git a/Master/texmf-dist/doc/latex/njurepo/example.pdf b/Master/texmf-dist/doc/latex/njurepo/example.pdf
index 754cb200325..b9962028261 100644
--- a/Master/texmf-dist/doc/latex/njurepo/example.pdf
+++ b/Master/texmf-dist/doc/latex/njurepo/example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/njurepo/njurepo.pdf b/Master/texmf-dist/doc/latex/njurepo/njurepo.pdf
index 4d2ba123230..cab76b73893 100644
--- a/Master/texmf-dist/doc/latex/njurepo/njurepo.pdf
+++ b/Master/texmf-dist/doc/latex/njurepo/njurepo.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/njurepo/njurepo.dtx b/Master/texmf-dist/source/latex/njurepo/njurepo.dtx
index e9824383e40..a5256d3bab7 100644
--- a/Master/texmf-dist/source/latex/njurepo/njurepo.dtx
+++ b/Master/texmf-dist/source/latex/njurepo/njurepo.dtx
@@ -16,7 +16,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{njurepo.dtx}[2019/01/29 1.0.1 Nanjing University Report Template]
+\ProvidesFile{njurepo.dtx}[2019/01/29 1.1.2 Nanjing University Report Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
\EnableCrossrefs
@@ -72,6 +72,8 @@
% \changes{v1.0.0}{2019/01/22}{Initial version}
% \changes{v1.0.1}{2019/01/29}{Add more ability}
% \changes{v1.1.0}{2019/01/29}{Stable version}
+% \changes{v1.1.1}{2019/02/20}{Fix little bugs}
+% \changes{v1.1.2}{2019/03/20}{Fix some typo and add more predined macro. Polish manual}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -80,7 +82,7 @@
% \IndexPrologue{\section{\indexname}}
% \GlossaryPrologue{\section{\glossaryname}}
-% \title{\bfseries\color{violet}\njurepo: 南京大学本科生范用报告}
+% \title{\bfseries\color{violet}\njurepo: 南京大学本科生泛用报告}
% \author{郑奘巍 \\[5pt]\texttt{zhengzangw@gmail.com}}
% \date{\fileversion\ (\filedate)}
% \maketitle\thispagestyle{empty}
@@ -98,7 +100,7 @@
% \item 本模板的发布遵守 \LaTeX\ Project Public License,使用前请认真阅读协议内
% 容。
% \item \textbf{本模板为作者自己通常使用的报告模板,与南京大学官方没有任何关系}。任何使用该宏包进行实验报告制作时,请\textbf{务必根据课程要求进行写作}。由于使用本模板而引起的作业验收问题,均与本模板作者无关。
-% \item 本模板借鉴\thuthesis{}宏包的大量内容,需要稳定模板的同学也可以选择使用清华大学的\thuthesis{}宏包并自己进行配置。
+% \item 本模板借鉴\thuthesis{}宏包的许多内容,需要稳定模板的同学也可以选择使用清华大学的\thuthesis{}宏包并自己进行配置。
% \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
% 守 \LaTeX\ Project Public License 协议。由于违犯协议而引起的任何纠纷争端均与
% 本模板作者无关。
@@ -115,16 +117,24 @@
% \clearpage
%
% \section{模板介绍}
-% \njurepo\ (\textbf{N}an\textbf{jing} \textbf{U}niversity \LaTeX\ Versatile \textbf{Repo}rt Template)是根据作者用\LaTeX{}制作南京大学课程实验报告的模板文件,可帮助本科生快速的制作实验报告和作业。
+% \njurepo\ (\textbf{N}an\textbf{jing} \textbf{U}niversity \LaTeX\ Versatile \textbf{Repo}rt Template)是为南京大学本科生设计的一个免于配置的作业、实验报告模板。希望它可以使你的作业/实验报告不会因形式上的缺陷导致评分的下降。
+%
+% 该文档格式基于 ctexbook, 主要完成了除了主体内容以外的几乎\textbf{全部}工作。同时,通过使用 Github 版本宏包,你还可以更好的管理自己的 $\LaTeX$ 文档。
+%
% 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据第 3.1 节说明提问,有兴趣者都可以参与完善此手册,也非常欢迎对代码的贡献。
%
% \section{安装}
% \label{sec:installation}
-% \njurepo 开发版需要自行前往github主页:\\
-% https://github.com/zhengzangw/njurepo下载。
+% \subsection{CTAN}
+% 本宏包已被收纳于 CTAN 中,凡安装完整版 Texlive 用户可直接使用:
+% \begin{latex}
+% \usepackage{njurepo}
+% \end{latex}
%
-% \subsection{字体安装}
-% 字体存放在font文件夹中,使用模板前先自行安装。
+% \subsection{Github}
+% 想获得最新版本的 \njurepo 请前往 Github 主页下载:https://github.com/zhengzangw/njurepo
+%
+% 同时,面向 Github 版本的说明主要在 README.md 中,如果使用的是 Github 版本,请阅读 README.md
%
% \subsection{模板的组成}
% 下表列出了\njurepo 的主要文件及其功能介绍:
@@ -140,15 +150,15 @@
% \endlastfoot
% njurepo.ins & \textsc{DocStrip} 驱动文件(开发用) \\
% njurepo.dtx & \textsc{DocStrip} 源文件(开发用)\\\midrule
-% example.pdf & 实例文档\\
-% main.tex & 主文件\\
-% figs/ & 图片路径\\
-% figs/logos/ & 示例文档图片路径\\
-% fonts/ & 字体\\
+% resources/ & 资源路径\\
+% resources/logos/ & 示例文档资源路径\\
% parts/ & 具体内容\\
-% parts/examples & 示例文档具体内容\\
+% parts/examples/ & 示例文档具体内容\\
% ref/ & 参考文献和参考文献样式文件\\
% njurepo.cls & 模板类文件\\
+% Makefile & 自动运行脚本 \\
+% util.py & 实用管理工具 \\
+% README.md & 说明文件 \\
% \textbf{njurepo.pdf} & 用户手册(本文档)\\ \bottomrule
% \end{longtable}
%
@@ -156,27 +166,21 @@
% 使用Makefile或\XeLaTeX 生成模板文件
% \begin{shell}
% make cls
-% xelatex njurepo.dtx # 两句选一句即可
% \end{shell}
+%
% \subsection{生成论文}
% \subsubsection{latexmk}
% latexmk 命令支持全自动生成\LaTeX{}编写的文档,并且支持使用不同的工具链来进行生成,它会自动运行多次工具直到交叉引用都被解决。下面给出了一个用 latexmk 调用 xelatex 生成最终文档的示例:
% \begin{shell}
% latexmk -xelatex main
% \end{shell}
-% \subsubsection{make}
-% \njurepo{}提供了一个Makefile:
-% \begin{shell}
-% make clean
-% make cls # 生成 njurepo.cls
-% make doc # 生成说明文档 njurepo.pdf
-% make main # 生成示例文档main.pdf
-% \end{shell}
+%
% \subsection{升级}
% 在github上下载最新版,运行:
% \begin{shell}
% make cls
% \end{shell}
+%
% 生成新的类文件和配置文件即可。也可以直接拷贝 njurepo.cls,免去上面命令的执行。
%
%
@@ -209,8 +213,9 @@
% \bibliographystyle{ref/numeric} % ref/numeric,ref/author-year,plainnat,IEEEtran
% \bibliography{ref/refs}
% \include{parts/examples/ack}
+% %% 附录
% \begin{appendix}
-% \input{parts/examples/appendix01}
+ % \input{parts/examples/appendix01}
% \end{appendix}
% \end{document}
% \end{latex}
@@ -224,8 +229,8 @@
% 提交的作业如果是电子稿的话,可以使用连续页,即使用\option{any}
% \DescribeOption{wide}
% 是否使用宽页面。如果生成作业的话,宽页面或许好看。
-% \DescribeOption{awesomefont}
-% 是否使用awesomefont图标。
+% \DescribeOption{draft}
+% 是否生成水印。生成的水印为 Draft 表示此文档尚为草稿
%
% \subsection{字体配置}
% \label{sec:font-config}
@@ -256,28 +261,31 @@
% 使用方法为:\cs{command}\oarg{num},其中 command 为字号命令,num 为行距。比
% 如 \cs{xiaosi}[1.5] 表示选择小四字体,行距 1.5 倍。写作指南要求表格中的字体
% 是 \cs{dawu},模板已经设置好了。
-% 对于英文,开发版中smallcaps默认使用了spinweradC字体。可以使用\cs{setmainfont}进行重新定义。
%
% \subsection{封面信息}
% 仿照parts/examples/cover.tex 进行设置
-% \subsection{问求}
-% 为问求特制了一些宏,具体可见parts/examples/problemsolving.tex
% \subsection{表格}
+% \DescribeMacro{\figoptadd}
+% \DescribeMacro{\figoptaddcap}
+% 定义了两个简单的表格命令
% \begin{latex}
-% \figpf{parameter}{filename}
-% \figpfc{parameter}{filename}{caption}
+% \figoptadd{option}{address}
+% \figoptaddcap{option}{address}{caption}
% \end{latex}
% \subsection{图片}
+% \DescribeMacro{\tabncc}
+% \DescribeMacro{\tabnc}
+% 定义了两个简单的图片命令
% \begin{latex}
-% \tabncc{number per row}{content}{caption}
-% \tabnc{number per row}{content}
+% \tabncc{number-of-columns}{content}{caption}
+% \tabnc{number-of-columns}{content}
% \end{latex}
% \subsection{代码}
-%预设了如下的lstlisting环境
+% \njurepo 预设了如下的代码环境
% \begin{longtable}{ccccc}
% \toprule
-% code & codedisplay & cplus & shell & commandshell \\
-% verilog & python & & &\\
+% code & cpseudo & cplus & shell & commandshell \\
+% verilog & python & latex & &\\
% \bottomrule
% \end{longtable}
% \subsection{文字}
@@ -286,14 +294,13 @@
% \magenta{品红色字}
% \CJKunderline{下划线字}
% \end{latex}
-% 更多的预置宏包,可见\ref{sec:loadpkg}
+% 更多关于预置宏包的内容,可见 README.md 以及 \ref{sec:loadpkg}
%
%
% \section{致谢}
-% 感谢以下宏包的作者为本宏包提供了借鉴:
+% 感谢以下宏包的作者,本宏包从中使用了部分代码和借鉴:
% \begin{itemize}
% \item 清华大学\thuthesis https://github.com/xueruini/thuthesis
-% \item 南京大学 NJUBachelor https://github.com/ZLCao/NJUBachelor
% \end{itemize}
%
% \StopEventually{}
@@ -313,7 +320,7 @@
\hyphenation{NJU-repo}
\def\njurepo{\textsc{NJU}\-\textsc{repo}}
\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}}
-\def\version{1.0.1}
+\def\version{1.1.2}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=nju,
@@ -325,7 +332,6 @@
\DeclareBoolOption{wide}
\DeclareBoolOption{color}
\DeclareBoolOption{draft}
-\DeclareBoolOption{awesomefont}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
\ProcessKeyvalOptions*
@@ -364,12 +370,12 @@
% 用于图片的宏包
% \begin{macrocode}
\RequirePackage{graphicx}
-\graphicspath{{figs/}}
-\graphicspath{{figs/logo/}}
+\graphicspath{{resources/}}
+\graphicspath{{resources/logo/}}
\RequirePackage[labelformat=simple]{subcaption}
\RequirePackage{pdfpages}
\includepdfset{fitpaper=true}
-\RequirePackage{tikz,tikzducks}
+\RequirePackage{tikz}
\usetikzlibrary{decorations.pathmorphing,graphs,calc}
\RequirePackage{dirtree}
% \end{macrocode}
@@ -379,18 +385,19 @@
\RequirePackage{longtable}
\RequirePackage{booktabs}
\RequirePackage{multirow}
-\RequirePackage{bbding,stmaryrd}
\RequirePackage{tabularx}
\RequirePackage{diagbox}
\RequirePackage{makecell}
\RequirePackage{float}
% \end{macrocode}
-% 用于数学的宏包
+% 用于符号或数学的宏包
% \begin{macrocode}
\RequirePackage{CJKfntef}
\RequirePackage{amsmath}
\RequirePackage[amsmath, thmmarks, hyperref]{ntheorem}
\RequirePackage{physics}
+\RequirePackage{bbding,stmaryrd}
+%\RequirePackage{fontawesome}
% \end{macrocode}
% 其它宏包
% \begin{macrocode}
@@ -917,10 +924,10 @@
\theoremheaderfont{\normalfont\heiti}
\theoremsymbol{\ensuremath{\square}}
\newtheorem*{proof}{证明}
-\theoremstyle{plain}
\theoremsymbol{}
\theoremseparator{:}
\ifnju@chinese
+ \theoremstyle{plain}
\newcommand\nju@assumption@name{假设}
\newcommand\nju@definition@name{定义}
\newcommand\nju@proposition@name{命题}
@@ -931,10 +938,12 @@
\newcommand\nju@exercise@name{练习}
\newcommand\nju@example@name{例}
\newcommand\nju@remark@name{注释}
- \newcommand\nju@problem@name{问题}
\newcommand\nju@conjecture@name{猜想}
+ \theoremstyle{break}
+ \newcommand\nju@problem@name{问题}
\newcommand\nju@solution@name{解}
\else
+ \theoremstyle{plain}
\newcommand\nju@assumption@name{Assumption}
\newcommand\nju@definition@name{Definition}
\newcommand\nju@proposition@name{Proposition}
@@ -945,24 +954,25 @@
\newcommand\nju@exercise@name{Exercise}
\newcommand\nju@example@name{Example}
\newcommand\nju@remark@name{Remark}
- \newcommand\nju@problem@name{Problem}
\newcommand\nju@conjecture@name{Conjecture}
+ \theoremstyle{break}
+ \newcommand\nju@problem@name{Problem}
\newcommand\nju@solution@name{Solution}
\fi
\theoremheaderfont{\bfseries}
-\newtheorem{assumption}{\nju@assumption@name}[chapter]
-\newtheorem{definition}{\nju@definition@name}[chapter]
-\newtheorem{proposition}{\nju@proposition@name}[chapter]
-\newtheorem{lemma}{\nju@lemma@name}[chapter]
-\newtheorem{theorem}{\nju@theorem@name}[chapter]
-\newtheorem{axiom}{\nju@axiom@name}[chapter]
-\newtheorem{corollary}{\nju@corollary@name}[chapter]
-\newtheorem{exercise}{\nju@exercise@name}[chapter]
-\newtheorem{example}{\nju@example@name}[chapter]
-\newtheorem{remark}{\nju@remark@name}[chapter]
-\newtheorem{problem}{\nju@problem@name}[chapter]
-\newtheorem{conjecture}{\nju@conjecture@name}[chapter]
-\newtheorem{solution}{\nju@solution@name}[chapter]
+\newtheorem{assumption}{\nju@assumption@name}[section]
+\newtheorem{definition}{\nju@definition@name}[section]
+\newtheorem{proposition}{\nju@proposition@name}[section]
+\newtheorem{lemma}{\nju@lemma@name}[section]
+\newtheorem{theorem}{\nju@theorem@name}[section]
+\newtheorem{axiom}{\nju@axiom@name}[section]
+\newtheorem{corollary}{\nju@corollary@name}[section]
+\newtheorem{exercise}{\nju@exercise@name}[section]
+\newtheorem{example}{\nju@example@name}[section]
+\newtheorem{remark}{\nju@remark@name}[section]
+\newtheorem{problem}{\nju@problem@name}[section]
+\newtheorem{conjecture}{\nju@conjecture@name}[section]
+\newtheorem{solution}{\nju@solution@name}[section]
%\RequirePackage{microtype}
\ifnju@chinese
@@ -970,25 +980,20 @@
\else
\newcommand{\promisewords}{I promise this work is done on my own with no plagiarism.}
\fi
-\newcommand{\pshw}{\section*{\scshape Part I\ \ \ Homework}}
-\newcommand{\pscr}{\section*{\scshape Part II\ \ \ Correction}}
-\newcommand{\psfb}{\section*{\scshape Part III\ \ \ Feedback}}
\newcommand{\Hrule}{\noindent\rule{\linewidth}{0.5mm}}
-\ifnju@awesomefont
-\RequirePackage{awesomefont}
-\fi
-
\theorempostwork{\vspace{-0.5cm}\Hrule}
-\newtheorem*{pssolution}{\ifnju@awesomefont\faPencilSquareO\ \fi\nju@solution@name}
+\newtheorem*{csolution}{\PencilRightDown\nju@solution@name}
+\newtheorem*{nsolution}{\PencilRightDown\nju@solution@name}
\RequirePackage[listings]{tcolorbox}
\newtcolorbox{ps@problem}[1]{fonttitle=\bfseries,title=#1,before skip=0.5cm, after skip=-0.5cm}
-\newenvironment{psproblem}[1][]{
- \begin{ps@problem}{\ifnju@awesomefont\faQuestionCircle\ \fi\nju@problem@name\ #1}
+\newenvironment{cproblem}[1][]{
+ \begin{ps@problem}{\Checkmark\ \nju@problem@name\ #1}
}{
\end{ps@problem}
}
-%
+\theoremstyle{plain}
+\newtheorem*{nproblem}{\Checkmark\nju@problem@name}[section]
% \subsubsection{浮动对象}
% \label{sec:float}
% 设置浮动对象和文字之间的距离
@@ -1116,7 +1121,7 @@
%
% 各级标题格式设置。
% \begin{description}
-% \item[chapter] 章序号与章名之间空一个汉字符 黑体三号字,居中书写,单倍行距,段
+% \item[section] 章序号与章名之间空一个汉字符 黑体三号字,居中书写,单倍行距,段
% 前空 24 磅,段后空 18 磅。本科要求:段前段后间距 30/20 pt,行距 20pt。但正文
% 章节 30pt 的话和样例效果不一致。
% \item[section] 一级节标题,例如:\fbox{2.1 实验装置与实验方法}。节标题序号与标
@@ -1468,7 +1473,8 @@
\parbox[b][2.4cm][t]{\textwidth}{%
\rule{1cm}{0cm}}
\vskip0.65cm
- \par\vskip2cm
+ {\includegraphics[width=0.3\textwidth]{njuname0.pdf}}
+ \par\vskip1.5cm
{\xiaochu\heiti\ziju{0.5}\textbf\nju@csubtitle}
\vskip2.2cm\hskip0.8cm
\noindent\heiti\xiaoer\nju@title@pre
@@ -2072,7 +2078,7 @@ every listing line={\textcolor{red}{\small\ttfamily\bfseries \$>}}}
%
% \subsection{快速插入图片或图表}
% \begin{macrocode}
-\newcommand{\figpf}[2]{
+\newcommand{\figoptadd}[2]{
\begin{figure}[H]
\centering
\includegraphics[#1]{figs/#2}
@@ -2080,8 +2086,8 @@ every listing line={\textcolor{red}{\small\ttfamily\bfseries \$>}}}
}
%%%%%%%%%%%%%%%%%%%%
-\newcommand{\figpfc}[3]{
- \begin{figure}[htbp]
+\newcommand{\figoptaddcap}[3]{
+ \begin{figure}[H]
\centering
\includegraphics[#1]{figs/#2}
\caption{#3}
@@ -2150,6 +2156,14 @@ every listing line={\textcolor{red}{\small\ttfamily\bfseries \$>}}}
}
\fi
% \end{macrocode}
+% 补丁
+% \begin{macrocode}
+\renewcommand{\thesection}{\arabic{section}}
+\newcommand{\nchapter}[1]{
+ {\let\clearpage\relax\par\vspace{1cm} \chapter*{\LARGE#1}}
+}
+\newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}
+% \end{macrocode}
%
% \subsection{自定义代码}
% \begin{macrocode}
diff --git a/Master/texmf-dist/tex/latex/njurepo/njurepo.cls b/Master/texmf-dist/tex/latex/njurepo/njurepo.cls
index cdf1614e074..b1c3bdf3467 100644
--- a/Master/texmf-dist/tex/latex/njurepo/njurepo.cls
+++ b/Master/texmf-dist/tex/latex/njurepo/njurepo.cls
@@ -19,12 +19,13 @@
%% version 2005/12/01 or later.
%%
+ % \input{parts/examples/appendix01}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{njurepo}[2019/01/25 1.0.0 Nanjing University Report Template]
\hyphenation{NJU-repo}
\def\njurepo{\textsc{NJU}\-\textsc{repo}}
\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}}
-\def\version{1.0.1}
+\def\version{1.1.2}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=nju,
@@ -36,7 +37,6 @@
\DeclareBoolOption{wide}
\DeclareBoolOption{color}
\DeclareBoolOption{draft}
-\DeclareBoolOption{awesomefont}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
\ProcessKeyvalOptions*
@@ -58,19 +58,18 @@
\RequirePackage{ifxetex}
\RequirePackage{xparse}
\RequirePackage{graphicx}
-\graphicspath{{figs/}}
-\graphicspath{{figs/logo/}}
+\graphicspath{{resources/}}
+\graphicspath{{resources/logo/}}
\RequirePackage[labelformat=simple]{subcaption}
\RequirePackage{pdfpages}
\includepdfset{fitpaper=true}
-\RequirePackage{tikz,tikzducks}
+\RequirePackage{tikz}
\usetikzlibrary{decorations.pathmorphing,graphs,calc}
\RequirePackage{dirtree}
\RequirePackage{array}
\RequirePackage{longtable}
\RequirePackage{booktabs}
\RequirePackage{multirow}
-\RequirePackage{bbding,stmaryrd}
\RequirePackage{tabularx}
\RequirePackage{diagbox}
\RequirePackage{makecell}
@@ -79,6 +78,7 @@
\RequirePackage{amsmath}
\RequirePackage[amsmath, thmmarks, hyperref]{ntheorem}
\RequirePackage{physics}
+\RequirePackage{bbding,stmaryrd}
\RequirePackage[sort&compress]{natbib}
\RequirePackage{hyperref}
\ifxetex
@@ -340,10 +340,10 @@
\theoremheaderfont{\normalfont\heiti}
\theoremsymbol{\ensuremath{\square}}
\newtheorem*{proof}{证明}
-\theoremstyle{plain}
\theoremsymbol{}
\theoremseparator{:}
\ifnju@chinese
+ \theoremstyle{plain}
\newcommand\nju@assumption@name{假设}
\newcommand\nju@definition@name{定义}
\newcommand\nju@proposition@name{命题}
@@ -354,10 +354,12 @@
\newcommand\nju@exercise@name{练习}
\newcommand\nju@example@name{例}
\newcommand\nju@remark@name{注释}
- \newcommand\nju@problem@name{问题}
\newcommand\nju@conjecture@name{猜想}
+ \theoremstyle{break}
+ \newcommand\nju@problem@name{问题}
\newcommand\nju@solution@name{解}
\else
+ \theoremstyle{plain}
\newcommand\nju@assumption@name{Assumption}
\newcommand\nju@definition@name{Definition}
\newcommand\nju@proposition@name{Proposition}
@@ -368,48 +370,45 @@
\newcommand\nju@exercise@name{Exercise}
\newcommand\nju@example@name{Example}
\newcommand\nju@remark@name{Remark}
- \newcommand\nju@problem@name{Problem}
\newcommand\nju@conjecture@name{Conjecture}
+ \theoremstyle{break}
+ \newcommand\nju@problem@name{Problem}
\newcommand\nju@solution@name{Solution}
\fi
\theoremheaderfont{\bfseries}
-\newtheorem{assumption}{\nju@assumption@name}[chapter]
-\newtheorem{definition}{\nju@definition@name}[chapter]
-\newtheorem{proposition}{\nju@proposition@name}[chapter]
-\newtheorem{lemma}{\nju@lemma@name}[chapter]
-\newtheorem{theorem}{\nju@theorem@name}[chapter]
-\newtheorem{axiom}{\nju@axiom@name}[chapter]
-\newtheorem{corollary}{\nju@corollary@name}[chapter]
-\newtheorem{exercise}{\nju@exercise@name}[chapter]
-\newtheorem{example}{\nju@example@name}[chapter]
-\newtheorem{remark}{\nju@remark@name}[chapter]
-\newtheorem{problem}{\nju@problem@name}[chapter]
-\newtheorem{conjecture}{\nju@conjecture@name}[chapter]
-\newtheorem{solution}{\nju@solution@name}[chapter]
+\newtheorem{assumption}{\nju@assumption@name}[section]
+\newtheorem{definition}{\nju@definition@name}[section]
+\newtheorem{proposition}{\nju@proposition@name}[section]
+\newtheorem{lemma}{\nju@lemma@name}[section]
+\newtheorem{theorem}{\nju@theorem@name}[section]
+\newtheorem{axiom}{\nju@axiom@name}[section]
+\newtheorem{corollary}{\nju@corollary@name}[section]
+\newtheorem{exercise}{\nju@exercise@name}[section]
+\newtheorem{example}{\nju@example@name}[section]
+\newtheorem{remark}{\nju@remark@name}[section]
+\newtheorem{problem}{\nju@problem@name}[section]
+\newtheorem{conjecture}{\nju@conjecture@name}[section]
+\newtheorem{solution}{\nju@solution@name}[section]
\ifnju@chinese
\newcommand{\promisewords}{请独立完成作业,不得抄袭。\\若参考了其它资料,请给出引用。\\鼓励讨论,但需独立书写解题过程。}
\else
\newcommand{\promisewords}{I promise this work is done on my own with no plagiarism.}
\fi
-\newcommand{\pshw}{\section*{\scshape Part I\ \ \ Homework}}
-\newcommand{\pscr}{\section*{\scshape Part II\ \ \ Correction}}
-\newcommand{\psfb}{\section*{\scshape Part III\ \ \ Feedback}}
\newcommand{\Hrule}{\noindent\rule{\linewidth}{0.5mm}}
-\ifnju@awesomefont
-\RequirePackage{awesomefont}
-\fi
-
\theorempostwork{\vspace{-0.5cm}\Hrule}
-\newtheorem*{pssolution}{\ifnju@awesomefont\faPencilSquareO\ \fi\nju@solution@name}
+\newtheorem*{csolution}{\PencilRightDown\nju@solution@name}
+\newtheorem*{nsolution}{\PencilRightDown\nju@solution@name}
\RequirePackage[listings]{tcolorbox}
\newtcolorbox{ps@problem}[1]{fonttitle=\bfseries,title=#1,before skip=0.5cm, after skip=-0.5cm}
-\newenvironment{psproblem}[1][]{
- \begin{ps@problem}{\ifnju@awesomefont\faQuestionCircle\ \fi\nju@problem@name\ #1}
+\newenvironment{cproblem}[1][]{
+ \begin{ps@problem}{\Checkmark\ \nju@problem@name\ #1}
}{
\end{ps@problem}
}
+\theoremstyle{plain}
+\newtheorem*{nproblem}{\Checkmark\nju@problem@name}[section]
\setlength{\floatsep}{20bp \@plus4pt \@minus1pt}
\setlength{\intextsep}{20bp \@plus4pt \@minus2pt}
\setlength{\textfloatsep}{20bp \@plus4pt \@minus2pt}
@@ -711,7 +710,8 @@
\parbox[b][2.4cm][t]{\textwidth}{%
\rule{1cm}{0cm}}
\vskip0.65cm
- \par\vskip2cm
+ {\includegraphics[width=0.3\textwidth]{njuname0.pdf}}
+ \par\vskip1.5cm
{\xiaochu\heiti\ziju{0.5}\textbf\nju@csubtitle}
\vskip2.2cm\hskip0.8cm
\noindent\heiti\xiaoer\nju@title@pre
@@ -1131,7 +1131,7 @@ stepnumber=1,
\lstnewenvironment{verilog}{\lstset{style=lstStyleverilog}}{}
\lstnewenvironment{python}{\lstset{style=lstStylepython}}{}
\lstnewenvironment{cpseudo}{\lstset{style=lstStylecpseudo}}{}
-\newcommand{\figpf}[2]{
+\newcommand{\figoptadd}[2]{
\begin{figure}[H]
\centering
\includegraphics[#1]{figs/#2}
@@ -1139,8 +1139,8 @@ stepnumber=1,
}
%%%%%%%%%%%%%%%%%%%%
-\newcommand{\figpfc}[3]{
-\begin{figure}[htbp]
+\newcommand{\figoptaddcap}[3]{
+\begin{figure}[H]
\centering
\includegraphics[#1]{figs/#2}
\caption{#3}
@@ -1200,6 +1200,11 @@ stepnumber=1,
}
}
\fi
+\renewcommand{\thesection}{\arabic{section}}
+\newcommand{\nchapter}[1]{
+ {\let\clearpage\relax\par\vspace{1cm} \chapter*{\LARGE#1}}
+}
+\newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}
\newcommand{\blankpage}{
\clearpage