diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14efa76 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.aux +*.fls +*.log +*.bbl +*.blg +*.fdb_latexmk +*.lof +*.lot +*.out +*.synctex.gz +*.toc +*.xdv \ No newline at end of file diff --git a/Makefile b/Makefile index dc74697..cadf258 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Makefile for ThuThesis PACKAGE = thuthesis -THESIS = thuthesis-example +THESIS = thuthesis-bachelor-thesis SOURCES = $(PACKAGE).ins $(PACKAGE).dtx CLSFILE = dtx-style.sty $(PACKAGE).cls diff --git a/bachelor-thesis.pdf b/bachelor-thesis.pdf new file mode 100644 index 0000000..bcaeca4 Binary files /dev/null and b/bachelor-thesis.pdf differ diff --git a/bachelor-thesis.tex b/bachelor-thesis.tex new file mode 100644 index 0000000..e2093cb --- /dev/null +++ b/bachelor-thesis.tex @@ -0,0 +1,97 @@ +% !TEX encoding = UTF-8 +% !TEX program = xelatex +% !TEX spellcheck = en_US + +\documentclass[degree=bachelor]{thuthesis} + % 学位 degree: + % doctor | master | bachelor | postdoc + % 学位类型 degree-type: + % academic(默认)| professional + % 特殊格式 style-override: + % none(默认)| schwarzman(苏世民学院) + % 语言 language + % chinese(默认)| english + % 字体库 fontset + % windows | mac | fandol | ubuntu + % 建议终版使用 Windows 平台的字体编译 + + +% 论文基本配置,加载宏包等全局配置 +\input{thusetup} + + +\begin{document} + +% 封面 +\maketitle + +% 学位论文指导小组、公开评阅人和答辩委员会名单 +% 本科生不需要 +% \input{data/committee} + +% 使用授权的说明 +% 本科生开题报告不需要 +\copyrightpage +% 将签字扫描后授权文件 scan-copyright.pdf 替换原始页面 +% \copyrightpage[file=scan-copyright.pdf] + +\frontmatter +\input{data/abstract} + +% 目录 +\tableofcontents + +% 插图和附表清单 +\listoffigures % 插图清单 +\listoftables % 附表清单 +% \listoffiguresandtables % 插图和附表清单 + +% 符号对照表 +\input{data/denotation} + + +% 正文部分 +\mainmatter +\input{data/chap01} +\input{data/chap02} +\input{data/chap03} +\input{data/chap04} + +% 参考文献 +\bibliography{ref/refs} % 参考文献使用 BibTeX 编译 +% \printbibliography % 参考文献使用 BibLaTeX 编译 + +% 附录 +\appendix +\input{data/appendix} + +% 其他部分 +\backmatter + +% 致谢 +\input{data/acknowledgements} + +% 声明 +% 各类开题报告通常不需要 +\statement +% 在提交终稿 PDF 时,先编译不含页眉页脚的声明页,以避免页码变化带来问题 +% \statement[page-style=empty] +% 打印、签名、扫描为 PDF 文档后,将 scan-statement.pdf 替换原始页面,并生成页眉页脚 +% \statement[file=scan-statement.pdf] + +% 个人简历、在学期间完成的相关学术成果 +% 本科生可以附个人简历,也可以不附个人简历 +% \input{data/resume} + +% 指导教师/指导小组评语 +% 本科生不需要 +% \input{data/comments} + +% 答辩委员会决议书 +% 本科生不需要 +% \input{data/resolution} + +% 本科生的综合论文训练记录表(扫描版) +% \record{file=scan-record.pdf} + +\end{document} diff --git a/data/abstract.tex b/data/abstract.tex index 6fcf779..6844409 100644 --- a/data/abstract.tex +++ b/data/abstract.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex % 中英文摘要和关键字 diff --git a/data/acknowledgements.tex b/data/acknowledgements.tex index f6344f3..0a34395 100644 --- a/data/acknowledgements.tex +++ b/data/acknowledgements.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \begin{acknowledgements} 衷心感谢导师×××教授和物理系××副教授对本人的精心指导。他们的言传身教将使我终生受益。 diff --git a/data/appendix.tex b/data/appendix.tex index b71acb6..8a04373 100644 --- a/data/appendix.tex +++ b/data/appendix.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \chapter{补充内容} diff --git a/data/chap01.tex b/data/chap01.tex index 143ec4b..1798293 100644 --- a/data/chap01.tex +++ b/data/chap01.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \chapter{论文主要部分的写法} diff --git a/data/chap02.tex b/data/chap02.tex index 78efa90..2df2f11 100644 --- a/data/chap02.tex +++ b/data/chap02.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \chapter{图表示例} diff --git a/data/chap03.tex b/data/chap03.tex index 71952a7..9eef382 100644 --- a/data/chap03.tex +++ b/data/chap03.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \chapter{数学符号和公式} diff --git a/data/chap04.tex b/data/chap04.tex index a2dd4ef..7160742 100644 --- a/data/chap04.tex +++ b/data/chap04.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \chapter{引用文献的标注} diff --git a/data/comments.tex b/data/comments.tex deleted file mode 100644 index 8304a7c..0000000 --- a/data/comments.tex +++ /dev/null @@ -1,10 +0,0 @@ -% !TEX root = ../thuthesis-example.tex - -\begin{comments} -% \begin{comments}[name = {指导小组评语}] -% \begin{comments}[name = {Comments from Thesis Supervisor}] -% \begin{comments}[name = {Comments from Thesis Supervision Committee}] - - 论文提出了…… - -\end{comments} diff --git a/data/committee.tex b/data/committee.tex index 711dbd6..7ff8daa 100644 --- a/data/committee.tex +++ b/data/committee.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \begin{committee}[name={学位论文指导小组、公开评阅人和答辩委员会名单}] diff --git a/data/denotation.tex b/data/denotation.tex index b18776c..99bff42 100644 --- a/data/denotation.tex +++ b/data/denotation.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \begin{denotation}[3cm] \item[PI] 聚酰亚胺 diff --git a/data/resolution.tex b/data/resolution.tex deleted file mode 100644 index 7c4e310..0000000 --- a/data/resolution.tex +++ /dev/null @@ -1,19 +0,0 @@ -% !TEX root = ../thuthesis-example.tex - -\begin{resolution} - - 论文提出了…… - - 论文取得的主要创新性成果包括: - - 1. …… - - 2. …… - - 3. …… - - 论文工作表明作者在×××××具有×××××知识,具有××××能力,论文××××,答辩××××。 - - 答辩委员会表决,(×票/一致)同意通过论文答辩,并建议授予×××(姓名)×××(门类)学博士/硕士学位。 - -\end{resolution} diff --git a/data/resume.tex b/data/resume.tex index feeb7b5..6756132 100644 --- a/data/resume.tex +++ b/data/resume.tex @@ -1,4 +1,4 @@ -% !TEX root = ../thuthesis-example.tex +% !TEX root = ../bachelor-thesis.tex \begin{resume} diff --git a/dtx-style.sty b/dtx-style.sty new file mode 100644 index 0000000..d19b059 --- /dev/null +++ b/dtx-style.sty @@ -0,0 +1,256 @@ +%% +%% This is file `dtx-style.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% thuthesis.dtx (with options: `dtx-style') +%% +%% This is a generated file. +%% +%% Copyright (C) 2005-2026 by Tsinghua University TUNA Association +%% +%% This work 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 +%% https://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% To produce the documentation run the original source files ending with `.dtx' +%% through LaTeX. +%% +\newcommand\thu@error[1]{% + \ClassError{thuthesis}{#1}{}% +} +\newcommand\thu@warning[1]{% + \ClassWarning{thuthesis}{#1}% +} +\newcommand\thu@debug[1]{% + \typeout{Package thuthesis Info: #1}% +} +\newcommand\thu@patch@error[1]{% + \thu@error{Failed to patch command \protect#1}% +} +\newcommand\thu@deprecate[2]{% + \def\thu@@tmp{#2}% + \thu@warning{% + The #1 is deprecated% + \ifx\thu@@tmp\@empty\else + . Use #2 instead% + \fi + }% +} +\newcommand\thu@replace@with@error[1]{% + \expandafter\def\csname #1\endcsname{% + \thu@error{% + \expandafter\protect\csname #1\endcsname\space can only be used once. + \MessageBreak + Please remove the duplicate call% + }% + }% +} +\@ifl@t@r\fmtversion{2017/04/15}{}{ + \thu@error{% + TeX Live 2017 or later version is required to compile this document% + } +} +\RequirePackage{iftex} +\ifXeTeX\else + \ifLuaTeX\else + \thu@error{XeLaTeX or LuaLaTeX is required to compile this document} + \fi +\fi +\InputIfFileExists{thuthesis-pdf-test-config.tex}{}{ + \InputIfFileExists{thuthesis-log-test-config.tex}{}{} +} +\ProvidesPackage{dtx-style} +\RequirePackage{hypdoc} +\RequirePackage{ifthen} +\RequirePackage{fontspec}[2017/01/20] +\RequirePackage{amsmath} +\RequirePackage{unicode-math} +\RequirePackage{siunitx} +\RequirePackage[UTF8,scheme=chinese]{ctex} +\RequirePackage[ + top=2.5cm, bottom=2.5cm, + left=4cm, right=2cm, + headsep=3mm]{geometry} +\RequirePackage{hologo} +\RequirePackage{array,longtable,booktabs} +\RequirePackage{listings} +\RequirePackage{fancyhdr} +\RequirePackage{xcolor} +\RequirePackage{enumitem} +\RequirePackage{etoolbox} +\RequirePackage{metalogo} +\RequirePackage[tightLists=false]{markdown} + +\markdownSetup{ + renderers = { + link = {\href{#2}{#1}}, + } +} + +\hypersetup{ + pdflang = zh-CN, + pdftitle = {ThuThesis:清华大学学位论文模板}, + pdfauthor = {清华大学 TUNA 协会}, + pdfsubject = {清华大学学位论文模板使用说明}, + pdfkeywords = {论文模板; 清华大学; 使用说明}, + pdfdisplaydoctitle = true +}% + +\setmainfont[ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, +]{texgyrepagella} +\setsansfont[ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, +]{texgyreheros} +\setmonofont[ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff, +]{texgyrecursor} + +\unimathsetup{ + math-style=ISO, + bold-style=ISO, +} +\DeclareRobustCommand\mathellipsis{\mathinner{\unicodecdots}} +\IfFontExistsTF{XITSMath-Regular.otf}{ + \setmathfont[ + Extension = .otf, + BoldFont = XITSMath-Bold, + StylisticSet = 8, + ]{XITSMath-Regular} + \setmathfont[range={cal,bfcal},StylisticSet=1]{XITSMath-Regular.otf} +}{ + \setmathfont[ + Extension = .otf, + BoldFont = *bold, + StylisticSet = 8, + ]{xits-math} + \setmathfont[range={cal,bfcal},StylisticSet=1]{xits-math.otf} +} + +\colorlet{thu@macro}{blue!60!black} +\colorlet{thu@env}{blue!70!black} +\colorlet{thu@option}{purple} +\patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{} +\patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{} +\patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{} +\patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{} + +\def\DescribeOption{% + \leavevmode\@bsphack\begingroup\MakePrivateLetters% + \Describe@Option} +\def\Describe@Option#1{\endgroup + \marginpar{\raggedleft\PrintDescribeOption{#1}}% + \thu@special@index{option}{#1}\@esphack\ignorespaces} +\def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{thu@option} #1\ } +\def\thu@special@index#1#2{\@bsphack + \begingroup + \HD@target + \let\HDorg@encapchar\encapchar + \edef\encapchar usage{% + \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}% + }% + \index{#2\actualchar{\string\ttfamily\space#2} + (#1)\encapchar usage}% + \index{#1:\levelchar#2\actualchar + {\string\ttfamily\space#2}\encapchar usage}% + \endgroup + \@esphack} + +\lstdefinestyle{lstStyleBase}{% + basicstyle=\small\ttfamily, + aboveskip=\medskipamount, + belowskip=\medskipamount, + lineskip=0pt, + boxpos=c, + showlines=false, + extendedchars=true, + upquote=true, + tabsize=2, + showtabs=false, + showspaces=false, + showstringspaces=false, + numbers=none, + linewidth=\linewidth, + xleftmargin=4pt, + xrightmargin=0pt, + resetmargins=false, + breaklines=true, + breakatwhitespace=false, + breakindent=0pt, + breakautoindent=true, + columns=flexible, + keepspaces=true, + gobble=4, + framesep=3pt, + rulesep=1pt, + framerule=1pt, + backgroundcolor=\color{gray!5}, + stringstyle=\color{green!40!black!100}, + keywordstyle=\bfseries\color{blue!50!black}, + commentstyle=\slshape\color{black!60}} + +\lstdefinestyle{lstStyleShell}{% + style=lstStyleBase, + frame=l, + rulecolor=\color{purple}, + language=bash} + +\lstdefinestyle{lstStyleLaTeX}{% + style=lstStyleBase, + frame=l, + rulecolor=\color{violet}, + language=[LaTeX]TeX} + +\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{} +\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{} + +\setlist{nosep} + +\DeclareDocumentCommand{\option}{m}{\textsf{#1}} +\DeclareDocumentCommand{\env}{m}{\texttt{#1}} +\DeclareDocumentCommand{\pkg}{s m}{% + \textsf{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}} +\DeclareDocumentCommand{\cls}{s m}{% + \textsf{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}} +\DeclareDocumentCommand{\file}{s m}{% + \nolinkurl{#2}\IfBooleanF#1{\thu@special@index{file}{#2}}} +\newcommand{\myentry}[1]{% + \marginpar{\raggedleft\color{purple}\bfseries\strut #1}} +\newcommand{\note}[2][Note]{{% + \color{magenta}{\bfseries #1}\emph{#2}}} + +\g@addto@macro\UrlBreaks{% + \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9% + \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M + \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z + \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m + \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z +} +\Urlmuskip=0mu plus 0.1mu + +\DeclareDocumentCommand{\githubuser}{m}{\href{https://github.com/#1}{@#1}} + +\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}} +\endinput +%% +%% End of file `dtx-style.sty'. diff --git a/figures/committee.pdf b/figures/committee.pdf deleted file mode 100644 index 37f210a..0000000 Binary files a/figures/committee.pdf and /dev/null differ diff --git a/thusetup.tex b/thusetup.tex index 6b8172e..c60c273 100644 --- a/thusetup.tex +++ b/thusetup.tex @@ -1,4 +1,4 @@ -% !TEX root = ./thuthesis-example.tex +% !TEX root = ./bachelor-thesis.tex % 论文基本信息配置 @@ -21,9 +21,8 @@ % 标题 % 可使用“\\”命令手动控制换行 % - title = {清华大学学位论文 \LaTeX{} 模板\\使用示例文档 v\version}, - title* = {An Introduction to \LaTeX{} Thesis Template of Tsinghua - University v\version}, + title = {跨国公网链路传输优化方法研究}, + title* = {To be filled}, % % 学科门类 % 1. 学术型 @@ -48,14 +47,14 @@ % 培养单位 % 填写所属院系的全名 % - department = {计算机科学与技术系}, + department = {电子工程系}, % % 学科 % 1. 研究生学术型学位,获得一级学科授权的学科填写一级学科名称,其他填写二级学科名称 % 2. 本科生填写专业名称,第二学位论文需标注“(第二学位)” % - discipline = {计算机科学与技术}, - discipline* = {Computer Science and Technology}, + discipline = {电子信息科学与技术}, + discipline* = {Electronic Engineering}, % % 专业领域 % 1. 设置专业领域的专业学位类别,填写相应专业领域名称 @@ -67,8 +66,8 @@ % % 姓名 % - author = {薛瑞尼}, - author* = {Xue Ruini}, + author = {高艺轩}, + author* = {Gao Yixuan}, % % 学号 % 仅当书写开题报告时需要(同时设置 `thesis-type = proposal') @@ -78,13 +77,13 @@ % 指导教师 % 中文姓名和职称之间以英文逗号“,”分开,下同 % - supervisor = {郑纬民, 教授}, - supervisor* = {Professor Zheng Weimin}, + supervisor = {王博, 副教授}, + supervisor* = {Associate Professor Wang Bo}, % % 副指导教师 % - associate-supervisor = {陈文光, 教授}, - associate-supervisor* = {Professor Chen Wenguang}, + % associate-supervisor = {陈文光, 教授}, + % associate-supervisor* = {Professor Chen Wenguang}, % % 联合指导教师 % diff --git a/thuthesis-example.pdf b/thuthesis-example.pdf index 766150c..7088494 100644 Binary files a/thuthesis-example.pdf and b/thuthesis-example.pdf differ