Skip to content

Commit

Permalink
Change new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Jan 1, 2020
1 parent c365459 commit c943a5a
Show file tree
Hide file tree
Showing 42 changed files with 910 additions and 411 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ about: 报告模板中的 bug,帮助我们改进

复现上述问题的代码:
```TeX
\documentclass[doctor]{ustcthesis}
\documentclass[degree=doctor]{ustcthesis}
\begin{document}
abc
\end{document}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ zip : main doc
ln -sf . $(NAME)
zip -r ../$(NAME)-$(VERSION).zip $(NAME)/{README.md,LICENSE,\
$(NAME).dtx,$(NAME).pdf,$(NAME).cls,*.bst,figures,\
$(MAIN).tex,math-commands.tex,chapters,bib,$(MAIN).pdf,\
$(MAIN).tex,ustcsetup.tex,math-commands.tex,chapters,bib,$(MAIN).pdf,\
latexmkrc,Makefile}
rm $(NAME)
13 changes: 10 additions & 3 deletions chapters/abstract.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
% !TeX root = ../main.tex

\ustcsetup{
keywords = {
中国科学技术大学, 学位论文, \LaTeX{} 模板, 学士, 硕士, 博士
},
keywords* = {
University of Science and Technology of China (USTC), Thesis,
\LaTeX{} Template, Bachelor, Master, PhD
},
}

\begin{abstract}
摘要是论文内容的总结概括,应简要说明论文的研究目的、基本研究内容、 研究方法或
过程、结果和结论,突出论文的创新之处。摘要中不宜使用公式、图表,不引用文献。
Expand All @@ -9,7 +19,6 @@
关键词另起一行并隔写在摘要下方,一般3~8个词,中文关键词间空一字或用分号“;”隔
开。英文摘要的关键词与中文摘要的关键词应完全一致,中间用逗号“,”或分号“;”隔开。

\keywords{中国科学技术大学;学位论文;\LaTeX{} 模板;学士;硕士;博士}
\end{abstract}

\begin{enabstract}
Expand All @@ -22,6 +31,4 @@
some features provided by the template. For more information, please refer to
the template document ustcthesis.pdf.

\enkeywords{University of Science and Technology of China (USTC); Thesis;
\LaTeX{} Template; Bachelor; Master; PhD}
\end{enabstract}
17 changes: 13 additions & 4 deletions chapters/citations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ \section{顺序编码制}

\subsection{角标数字标注法}

\citestyle{super}
\ustcsetup{
cite-style = super,
}
\noindent
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
\verb|\cite{knuth86a}| & \cite{knuth86a} \\
Expand All @@ -24,7 +26,9 @@ \subsection{角标数字标注法}

\subsection{数字标注法}

\citestyle{numbers}
\ustcsetup{
cite-style = inline,
}
\noindent
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
\verb|\cite{knuth86a}| & \cite{knuth86a} \\
Expand All @@ -38,7 +42,9 @@ \subsection{数字标注法}

\section{著者-出版年制标注法}

\citestyle{authoryear}
\ustcsetup{
cite-style = authoryear,
}
\noindent
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
\verb|\cite{knuth86a}| & \cite{knuth86a} \\
Expand All @@ -49,6 +55,9 @@ \section{著者-出版年制标注法}
\verb|\cite{knuth86a,knuth84}| & \cite{knuth86a,knuth84} \\
\end{tabular}

\vskip 2ex \citestyle{super}
\vskip 2ex
\ustcsetup{
cite-style = super,
}
注意,参考文献列表中的每条文献在正文中都要被引用
\cite{slg,lyc,ljs,cgw,cjb,kqy,yhs,yx,dwx,jxz,wjk,syw,wf,xd,twh,huston}。
72 changes: 20 additions & 52 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,12 @@
% !TeX program = xelatex
% !TeX spellcheck = en_US

\documentclass[doctor]{ustcthesis}
% doctor|master|bachelor [academic|professional] [chinese|english] [print|pdf]
% [super|numebers|authoryear]

\title{中国科学技术大学\\学位论文模板示例文档}
\author{李泽平}
\major{数学与应用数学}
\supervisor{XXX~教授}
\cosupervisor{XXX~教授}
% \date{二〇一七年五月一日} % 注释掉则为今日
% \professionaltype{专业学位类型}
% \secretlevel{秘密} % 绝密|机密|秘密,注释本行则不保密
% \secretyear{20} % 保密年限

\entitle{An example of thesis template for University of Science and Technology
of China}
\enauthor{Li Zeping}
\enmajor{Mathematics and Applied Mathematics}
\ensupervisor{Prof.~XXX}
\encosupervisor{Prof.~XXX}
% \endate{May 1, 2017} % Today if commented
% \enprofessionaltype{Professional degree type}
% \ensecretlevel{Secret} % Top secret|Highly secret|Secret


% 加载宏包和配置
\usepackage{graphicx}
\graphicspath{{figures/}}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage[ruled,linesnumbered]{algorithm2e}
\usepackage{siunitx}
\usepackage{amsthm}
\usepackage{hyperref}

\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\DeclareRobustCommand\pkg{\textsf}
\DeclareRobustCommand\file{\nolinkurl}

\input{math-commands.tex}

\documentclass[degree=doctor]{ustcthesis}
% degree = doctor|master|bachelor
% language = chinese|english

% 加载宏包、全部的配置
\input{ustcsetup.tex}


\begin{document}
Expand All @@ -62,27 +26,31 @@
% appendix: 附录

\maketitle
\makestatement
\copyrightpage

\frontmatter
\input{chapters/abstract}
\input{chapters/abstract.tex}
\tableofcontents
% \listoffigures
% \listoftables
\input{chapters/notation}
\input{chapters/notation.tex}

\mainmatter
\input{chapters/intro}
\input{chapters/floats}
\input{chapters/math}
\input{chapters/citations}
\input{chapters/intro.tex}
\input{chapters/floats.tex}
\input{chapters/math.tex}
\input{chapters/citations.tex}

\backmatter
\bibliographystyle{ustcthesis-numerical} % 顺序编码制
% \bibliography{ustcthesis-authoryear} % 著者出版年制
% \bibliography{ustcthesis-bachelor} % 本科生参考文献的格式
\bibliography{bib/ustc}

\appendix
\input{chapters/complementary}
\input{chapters/complementary.tex}

\backmatter
\input{chapters/acknowledgements}
\input{chapters/publications}
\input{chapters/acknowledgements.tex}
\input{chapters/publications.tex}

\end{document}
6 changes: 5 additions & 1 deletion test/testfiles-bib/bib-authoryear.tex
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
\input{regression-test.tex}
\documentclass[doctor,authoryear,fontset=fandol]{ustcthesis}
\documentclass[degree=doctor,fontset=fandol]{ustcthesis}

\begin{document}
\START
\showoutput

\input{citations.tex}

\backmatter
\bibliographystyle{ustcthesis-authoryear}
\bibliography{refs}

\clearpage
\end{document}
\END
10 changes: 7 additions & 3 deletions test/testfiles-bib/bib-authoryear.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Underfull \hbox (badness 2050) in paragraph at lines 12--14
.\kern -0.00021
.\kern 0.0
.\glue(\rightskip) 0.0
(bib-authoryear.bbl
)
Completed box being shipped out [1]
\vbox(722.98453+3.6135)x435.04271
.\glue -29.59084
Expand Down Expand Up @@ -625,7 +625,7 @@ Completed box being shipped out [1]
....\glue(\rightskip) 0.0
...\penalty 300
...\glue(\baselineskip) 8.48763
...\hbox(9.33476+2.1801)x417.11752, glue set 268.24304fil
...\hbox(9.33476+2.1801)x417.11752, glue set 265.23183fil
....\TU/FandolSong-Regular(0)/m/n/12.04486 万
....\glue 0.0 plus 0.61366
....\TU/FandolSong-Regular(0)/m/n/12.04486 锦
Expand Down Expand Up @@ -655,6 +655,7 @@ Completed box being shipped out [1]
....\TU/texgyretermes(0)/m/n/12.04486 )
....\kern -0.0002
....\kern 0.0002
....\glue 3.01122 plus 1.5056 minus 1.00374
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand Down Expand Up @@ -704,6 +705,7 @@ Completed box being shipped out [1]
..........\glue(\rightskip) 0.0
....\glue 0.0 plus 1.0fil minus 1.0fil
...\special{color pop}
(bib-authoryear.bbl
LaTeX Font Info: Calculating math sizes for size <10.53925> on input line ....
LaTeX Font Info: Font shape `TU/XITSMath-Regular(2)/m/n' will be
(Font) scaled to size 10.54036pt on input line ....
Expand All @@ -717,7 +719,7 @@ LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 7.37663pt on input line ....
LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 5.26906pt on input line ....
))
)
Completed box being shipped out [2]
\vbox(722.98453+3.6135)x435.04271
.\glue -29.59084
Expand Down Expand Up @@ -774,6 +776,8 @@ Completed box being shipped out [2]
..\glue(\lineskip) 0.0
..\vbox(700.50723+0.0)x417.11752, glue set 293.4369fil
...\write-{}
...\write1{\protect \FN@pp@footnotehinttrue }
...\write-{}
...\write1{\@writefile{toc}{\protect \contentsline {chapter}{参考文献}{\thepage \ET
C.}
...\mark{{{\protect \ustc@spacetitle {参考文献}}}{}}
Expand Down
6 changes: 5 additions & 1 deletion test/testfiles-bib/bib-bachelor.tex
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
\input{regression-test.tex}
\documentclass[bachelor,fontset=fandol]{ustcthesis}
\documentclass[degree=bachelor,fontset=fandol]{ustcthesis}

\begin{document}
\START
\showoutput

\input{citations.tex}

\backmatter
\bibliographystyle{ustcthesis-bachelor}
\bibliography{refs}

\clearpage
\end{document}
\END
10 changes: 6 additions & 4 deletions test/testfiles-bib/bib-bachelor.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 8.43044pt on input line ....
LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 6.02177pt on input line ....
(bib-bachelor.bbl
)
Completed box being shipped out [1]
\vbox(722.98453+3.6135)x435.04271
.\glue -29.59084
Expand Down Expand Up @@ -523,7 +523,7 @@ Completed box being shipped out [1]
...\kern 1.0
...\glue(\parskip) 0.0
...\glue(\baselineskip) 11.34259
...\hbox(10.61922+0.0)x417.11752, glue set 371.45787fil
...\hbox(10.61922+0.0)x417.11752, glue set 368.44666fil
....\hbox(0.0+0.0)x24.08972
....\mathon
....\hbox(5.80077+1.31528)x21.56993, shifted -4.81845
Expand All @@ -544,6 +544,7 @@ Completed box being shipped out [1]
.....\kern -0.0002
.....\kern 0.0002
....\mathoff
....\glue 3.01122 plus 1.5056 minus 1.00374
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand Down Expand Up @@ -592,7 +593,7 @@ Completed box being shipped out [1]
..........\glue(\rightskip) 0.0
....\glue 0.0 plus 1.0fil minus 1.0fil
...\special{color pop}
))
(bib-bachelor.bbl)
Completed box being shipped out [2]
\vbox(722.98453+3.6135)x435.04271
.\glue -29.59084
Expand Down Expand Up @@ -669,7 +670,8 @@ Completed box being shipped out [2]
..\glue(\lineskip) 0.0
..\vbox(700.50723+0.0)x417.11752, glue set 257.11848fil
...\write-{}
...\write1{\@writefile{toc}{\protect \addvspace {12\bp@ }}}
...\write1{\protect \FN@pp@footnotehinttrue }
...\write-{}
...\write1{\@writefile{toc}{\protect \contentsline {chapter}{参考文献}{\thepage \ET
C.}
...\write1{\@writefile{lof}{\protect \addvspace {10.0pt}}}
Expand Down
10 changes: 9 additions & 1 deletion test/testfiles-bib/bib-numbers.tex
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
\input{regression-test.tex}
\documentclass[doctor,numbers,fontset=fandol]{ustcthesis}
\documentclass[degree=doctor,fontset=fandol]{ustcthesis}

\begin{document}
\START
\showoutput

\ustcsetup{
cite-style = inline,
}

\input{citations.tex}

\backmatter
\bibliographystyle{ustcthesis-numerical}
\bibliography{refs}

\clearpage
\end{document}
\END
10 changes: 7 additions & 3 deletions test/testfiles-bib/bib-numbers.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 8.43044pt on input line ....
LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 6.02177pt on input line ....
(bib-numbers.bbl
)
Completed box being shipped out [1]
\vbox(722.98453+3.6135)x435.04271
.\glue -29.59084
Expand Down Expand Up @@ -427,7 +427,7 @@ Completed box being shipped out [1]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0
...\glue(\baselineskip) 9.90892
...\hbox(8.28687+1.87898)x417.11752, glue set 362.92769fil
...\hbox(8.28687+1.87898)x417.11752, glue set 359.91647fil
....\hbox(0.0+0.0)x24.08972
....\TU/texgyretermes(0)/m/n/12.04486 [
....\hbox(8.28687+0.16861)x6.02243
Expand All @@ -446,6 +446,7 @@ Completed box being shipped out [1]
....\TU/texgyretermes(0)/m/n/12.04486 ]
....\kern -0.0002
....\kern 0.0002
....\glue 3.01122 plus 1.5056 minus 1.00374
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand Down Expand Up @@ -495,6 +496,7 @@ Completed box being shipped out [1]
..........\glue(\rightskip) 0.0
....\glue 0.0 plus 1.0fil minus 1.0fil
...\special{color pop}
(bib-numbers.bbl
LaTeX Font Info: Calculating math sizes for size <10.53925> on input line ....
LaTeX Font Info: Font shape `TU/XITSMath-Regular(2)/m/n' will be
(Font) scaled to size 10.54036pt on input line ....
Expand All @@ -508,7 +510,7 @@ LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 7.37663pt on input line ....
LaTeX Font Info: Font shape `TU/XITSMath-Regular(3)/m/n' will be
(Font) scaled to size 5.26906pt on input line ....
))
)
Completed box being shipped out [2]
\vbox(722.98453+3.6135)x435.04271
.\glue -29.59084
Expand Down Expand Up @@ -565,6 +567,8 @@ Completed box being shipped out [2]
..\glue(\lineskip) 0.0
..\vbox(700.50723+0.0)x417.11752, glue set 294.48018fil
...\write-{}
...\write1{\protect \FN@pp@footnotehinttrue }
...\write-{}
...\write1{\@writefile{toc}{\protect \contentsline {chapter}{参考文献}{\thepage \ET
C.}
...\mark{{{\protect \ustc@spacetitle {参考文献}}}{}}
Expand Down
Loading

0 comments on commit c943a5a

Please sign in to comment.