summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/njuthesis/profile/abstract.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/unicodetex/latex/njuthesis/profile/abstract.sty')
-rw-r--r--macros/unicodetex/latex/njuthesis/profile/abstract.sty136
1 files changed, 136 insertions, 0 deletions
diff --git a/macros/unicodetex/latex/njuthesis/profile/abstract.sty b/macros/unicodetex/latex/njuthesis/profile/abstract.sty
new file mode 100644
index 0000000000..37814cef13
--- /dev/null
+++ b/macros/unicodetex/latex/njuthesis/profile/abstract.sty
@@ -0,0 +1,136 @@
+\ProvidesExplPackage{profile/abstract}{2021-09-11}{0.7.0}{NJU Thesis abstract design}
+
+% 判断学位
+\str_if_eq:eeTF {\nju_degree} { ug }
+{
+ % 本科摘要环境
+ \NewDocumentEnvironment{abstract} {}
+ {%
+ \pagestyle{plain}
+ \pagenumbering{Roman}
+ % \phantomsection\addcontentsline{toc}{chapter}{中文摘要} % 将摘要插入目录和pdf书签
+ \pdfbookmark[0]{中文摘要}{中文摘要} % 将摘要插入pdf书签,与上一行不可共存
+ \begin{center}
+ \kaishu\zihao{-2}{\textbf{\uuline{南京大学本科生毕业论文(设计、作品)中文摘要}}}
+ \end{center}
+ {\bgroup
+ \kaishu\zihao{-4}
+ \tl_set:Nn \tabcolsep {0pt}
+ \tl_set:Nn \arraystretch {0.8}
+ \noindent
+ 题目: \nju_title \\
+ 院系: \nju_department \\
+ 专业: \nju_major \\
+ 本科生姓名: \nju_student_name \\
+ 指导教师(姓名、职称):\nju_mentor_full \\
+ 摘要:
+ \egroup
+ }
+ \kaishu\zihao{-4}\par%
+ }{%
+ \newpage
+ }
+
+ % 中文关键词
+ \NewDocumentCommand \keywords {m} {%
+ \par\vspace{2ex}\noindent%
+ {\kaishu\zihao{-4}\makebox[4em][s]{关键词{:}}}~{#1}%
+ }
+
+ % 英文摘要
+ \NewDocumentEnvironment{englishabstract} {}
+ {%
+ \pagestyle{plain}
+ % \phantomsection\addcontentsline{toc}{chapter}{英文摘要} % 将摘要插入目录和pdf书签
+ \pdfbookmark[0]{英文摘要}{英文摘要} % 将摘要插入pdf书签,与上一行不可共存
+ \begin{center}
+ \kaishu\zihao{-2}{\textbf{\uuline{南京大学本科生毕业论文(设计、作品)英文摘要}}}
+ \end{center}
+ {
+ \bgroup
+ THESIS: ~~\nju_title_en \\
+ DEPARTMENT: ~~\nju_department_en \\
+ SPECIALIZATION: ~~\nju_major_en \\
+ UNDERGRADUATE:~~\nju_student_name_en \\
+ MENTOR:~~\nju_mentor_full_en \\
+ ABSTRACT:
+ \egroup
+ }
+ \zihao{-4}\par%
+ }{%
+ \cleardoublepage
+ \newpage
+ }
+
+ % 英文关键词
+ \NewDocumentCommand \englishkeywords {m} {%
+ \par\vspace{2ex}\noindent%
+ {KEYWORDS{:}}~~{#1}%
+ }
+}
+{
+ % 摘要环境
+ \NewDocumentEnvironment{abstract} {}
+ {%
+ \pagestyle{plain}
+ \pagenumbering{Roman}
+ % \phantomsection\addcontentsline{toc}{chapter}{中文摘要} % 将摘要插入目录和pdf书签
+ \pdfbookmark[0]{中文摘要}{中文摘要} % 将摘要插入pdf书签,与上一行不可共存
+ \begin{center}
+ \kaishu\zihao{-2}{\textbf{\uuline{南京大学研究生毕业论文中文摘要首页用纸}}}
+ \end{center}
+
+ \bgroup
+ \kaishu\zihao{4}
+ \tl_set:Nn \tabcolsep {0pt}
+ \tl_set:Nn \arraystretch {0.8}
+ \noindent
+ % 毕业论文题目:\ \uline{\nju_title} \\ % 下划线有问题
+ 毕业论文题目:\ \nju_title \\
+ \uline{\makebox[9em]{\nju_major}}专业\uline{\makebox[3em]{\nju_grade}}级
+ \str_if_eq:eeTF {\nju_degree} { d } {博}{硕}
+ 士生姓名:\uline{\hfill\nju_student_name\hfill} \\
+ 指导教师(姓名、职称):\uline{\hfill\nju_mentor_full\hfill}\par
+ \egroup
+
+ \kaishu\zihao{4}\par%
+ }{%
+ \newpage
+ }
+
+ % 中文关键词
+ \NewDocumentCommand \keywords {m} {%
+ \par\vspace{2ex}\noindent%
+ {\kaishu\zihao{4}\makebox[4em][s]{关键词{:}}}~{#1}%
+ }
+
+ % 英文摘要
+ \NewDocumentEnvironment{englishabstract} {}
+ {%
+ \pagestyle{plain}
+ % \phantomsection\addcontentsline{toc}{chapter}{英文摘要} % 将摘要插入目录和pdf书签
+ \pdfbookmark[0]{英文摘要}{英文摘要} % 将摘要插入pdf书签,与上一行不可共存
+ \begin{center}
+ \kaishu\zihao{-2}{\textbf{\uuline{南京大学研究生毕业论文英文摘要首页用纸}}}
+ \end{center}
+ {
+ \bgroup
+ \zihao{4}
+ THESIS: ~~\nju_title_en \\
+ SPECIALIZATION: ~~\nju_major_en \\
+ POSTGRADUATE:~~\nju_student_name_en \\
+ MENTOR:~~\nju_mentor_full_en\par
+ \egroup
+ }
+ \zihao{4}\par%
+ }{%
+ \cleardoublepage
+ \newpage
+ }
+
+ % 英文关键词
+ \NewDocumentCommand \englishkeywords {m} {%
+ \par\vspace{2ex}\noindent%
+ {KEYWORDS{:}}~~{#1}%
+ }
+}