Skip to content
Snippets Groups Projects
Commit a20d5a55 authored by Yu Xiong's avatar Yu Xiong :confounded:
Browse files

feat: 使用命令而不是sty文件置入个人信息,有利于ctan发布

parent 949113d6
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@
│ page.sty
│ reference.sty
│ coverinfo.sty
│ coverinfo.tex
│ njuthesis.bib
│ njuthesis.cls
│ njuthesis.tex
......
\ProvidesExplPackage{coverinfo}{2021-09-04}{0.1}{NJU Thesis Undergraduate cover information}
\tl_const:Nn \TitleA {一种使用南京大学\hologo{LaTeX}模版}% 第一行标题
\tl_const:Nn \TitleB {编写本科生毕业论文的经验性方法}% 第二行标题
\tl_const:Nn \TitleC {}% 第三行标题
\tl_const:Nn \Title_EN {An~Empirical~Way~of~Composing~Undergraduate~Thesis~with~NJU~\hologo{LaTeX}~Template} % 注意英文名中空格必须替换为波浪线
\tl_const:Nn \Grade {2018}
\tl_const:Nn \StudentID {181114514}
\tl_const:Nn \StudentName {周煜华}
\tl_const:Nn \StudentName_EN {Zhou~Yuhua}
\tl_const:Nn \Department {拉太赫科学与技术学院}
\tl_const:Nn \Department_EN {School~of~\hologo{LaTeX}}
\tl_const:Nn \Major {拉太赫语言学}
\tl_const:Nn \Major_EN {\hologo{LaTeX}~Linguistics}
\tl_const:Nn \Mentor {李成殿}
\tl_const:Nn \Mentor_EN {Li~Chengdian}
\tl_const:Nn \MentorTitle {教授}
\tl_const:Nn \MentorTitle_EN {Professor}
\tl_const:Nn \SubmitDate {2021年8月10日}
% 设置用于封面的个人信息
\setTitleA{一种使用南京大学\hologo{LaTeX}模版}%第一行标题
\setTitleB{编写本科生毕业论文的经验性方法}%第二行标题
\setTitleC{}%第三行标题
\setTitleEN{An~Empirical~Way~of~Composing~Undergraduate~Thesis~with~NJU~\hologo{LaTeX}~Template}%注意英文名中空格必须替换为波浪线
\setGrade{2018}
\setStudentID{181114514}
\setStudentName{周煜华}
\setStudentNameEN{Zhou~Yuhua}
\setDepartment{拉太赫科学与技术学院}
\setDepartmentEN{School~of~\hologo{LaTeX}}
\setMajor{拉太赫语言学}
\setMajorEN{\hologo{LaTeX}~Linguistics}
\setMentor{李成殿}
\setMentorEN{Li~Chengdian}
\setMentorTitle{教授}
\setMentorTitleEN{Professor}
\setSubmitDate{2021年8月10日}
......@@ -27,7 +27,6 @@
% 输入配置文件
\RequirePackage{profile/packages}
\RequirePackage{coverinfo}
\RequirePackage{profile/font}
\RequirePackage{profile/page}
\RequirePackage{profile/reference}
......
......@@ -21,6 +21,9 @@
Type=thesis% thesis: 毕业论文,design: 毕业设计
]{njuthesis}
% 输入个人信息
\input{coverinfo.tex}
% 导入参考文献源
\addbibresource{njuthesis.bib}
......
\ProvidesExplPackage{profile/abstract}{2021-09-04}{0.1}{NJU Thesis Undergraduate abstract design}
% 拼合标题
\tl_const:Nn \Title {\TitleA\TitleB\TitleC}
% 摘要环境
\NewDocumentEnvironment{abstract} {}
{%
......
\ProvidesExplPackage{profile/cover}{2021-09-04}{0.1}{NJU Thesis Undergraduate cover design}
% 封面信息
\NewDocumentCommand\setTitleA{m}{\tl_const:Nn \TitleA {#1}}% 第一行标题
\NewDocumentCommand\setTitleB{m}{\tl_const:Nn \TitleB {#1}}% 第二行标题
\NewDocumentCommand\setTitleC{m}{\tl_const:Nn \TitleC {#1}}% 第三行标题
\NewDocumentCommand\setTitleEN{m}{\tl_const:Nn \Title_EN {#1}} % 注意英文名中空格必须替换为波浪线
\NewDocumentCommand\setGrade{m}{\tl_const:Nn \Grade {#1}}
\NewDocumentCommand\setStudentID{m}{\tl_const:Nn \StudentID {#1}}
\NewDocumentCommand\setStudentName{m}{\tl_const:Nn \StudentName {#1}}
\NewDocumentCommand\setStudentNameEN{m}{\tl_const:Nn \StudentName_EN {#1}}
\NewDocumentCommand\setDepartment{m}{\tl_const:Nn \Department {#1}}
\NewDocumentCommand\setDepartmentEN{m}{\tl_const:Nn \Department_EN {#1}}
\NewDocumentCommand\setMajor{m}{\tl_const:Nn \Major {#1}}
\NewDocumentCommand\setMajorEN{m}{\tl_const:Nn \Major_EN {#1}}
\NewDocumentCommand\setMentor{m}{\tl_const:Nn \Mentor {#1}}
\NewDocumentCommand\setMentorEN{m}{\tl_const:Nn \Mentor_EN {#1}}
\NewDocumentCommand\setMentorTitle{m}{\tl_const:Nn \MentorTitle {#1}}
\NewDocumentCommand\setMentorTitleEN{m}{\tl_const:Nn \MentorTitle_EN {#1}}
\NewDocumentCommand\setSubmitDate{m}{\tl_const:Nn \SubmitDate {#1}}
% 拼合标题
\tl_const:Nn \Title {\TitleA\TitleB\TitleC}
% 封面下划线
\cs_new:Npn \cover_underline:nn #1 #2 {
\uline{\makebox[#1]{#2}}
......
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