Skip to content

Commit

Permalink
Fixed some bugs. (#18)
Browse files Browse the repository at this point in the history
* 新增选项 math-font = cm (Computer Modern)([ustcthesis#324](https://github.com/ustctug/ustcthesis/issues/324))。
* 增加了 [gbt7714-2015参考文献格式](https://github.com/zepinglee/gbt7714-bibtex-style)选项(#5)。
* 修正了研究生学位论文节标题行距。
* 修正了英文摘要段首缩进距离。
  • Loading branch information
LaureatePoet authored Apr 12, 2022
1 parent 9cc6b94 commit d3899b0
Show file tree
Hide file tree
Showing 12 changed files with 422 additions and 228 deletions.
16 changes: 10 additions & 6 deletions HFUT_Thesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version":"1.0.4",
"organization": "HFUTTUG",
"repository": "HFUT_Thesis",
"release_date": "2021-05-23",
"release_date": "2022-04-15",
"license": "LPPL-1.3c",
"history": {
"template": "https://keepachangelog.com/en/1.0.0/",
Expand All @@ -12,15 +12,19 @@
"title": "",
"logs": {
"add": [
"add GitHub workflow compile Test"
"add GitHub workflow compile Test",
"新增选项 math-font = cm (Computer Modern)([ustcthesis#324](https://github.com/ustctug/ustcthesis/issues/324))。",
"增加了 [gbt7714-2015参考文献格式](https://github.com/zepinglee/gbt7714-bibtex-style) 选项(#5)。"
],
"change": [],
"remove": [],
"fix": [
"修复了载入 `natbib` 前设置 `cite-style` 无效的问题([ustcthesis#327](https://github.com/ustctug/ustcthesis/issues/327))",
"修正了 biblatex 参考文献的页眉。([ustcthesis#311](https://github.com/ustctug/ustcthesis/issues/311))",
"修正`Makefile`文件。(感谢[@zepinglee](https://github.com/zepinglee))([#9](https://github.com/HFUTTUG/HFUT_Thesis/issues/9))",
"修改因`publications`环境造成的“不兼容TeX Live 2017-2020”。(感谢[@zepinglee](https://github.com/zepinglee))([#9](https://github.com/HFUTTUG/HFUT_Thesis/issues/9))"
"修复了载入 `natbib` 前设置 `cite-style` 无效的问题([ustcthesis#327](https://github.com/ustctug/ustcthesis/issues/327))。",
"修正了 biblatex 参考文献的页眉([ustcthesis#311](https://github.com/ustctug/ustcthesis/issues/311))。",
"修正`Makefile`文件(感谢[@zepinglee](https://github.com/zepinglee))([#9](https://github.com/HFUTTUG/HFUT_Thesis/issues/9))。",
"修改因`publications`环境造成的“不兼容TeX Live 2017-2020”(感谢[@zepinglee](https://github.com/zepinglee))([#9](https://github.com/HFUTTUG/HFUT_Thesis/issues/9))。",
"修正了研究生学位论文节标题行距。",
"修正了英文摘要段首缩进距离。"
]
}
},
Expand Down
1 change: 1 addition & 0 deletions chapters/abstract.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
\end{abstract}

\begin{abstract*}
\noindent %西文首段不缩进
This is a sample document of HFUT thesis \LaTeX{} template for bachelor,
master and doctor. The template is created by \href{https://github.com/LaureatePoet}{LaureatePoet} and \href{https://github.com/HowardZorn}{Fw[a]rd}. The
template meets the equirements of HFUT thesis writing standards.
Expand Down
15 changes: 0 additions & 15 deletions chapters/citations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ \subsection{数字标注法}
\verb|\cite{knuth86a,knuth84}| & \cite{knuth86a,knuth84} \\
\end{tabular}

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

\hfutsetup{
cite-style = authoryear,
}
\noindent
\begin{tabular}{l@{\quad$\Rightarrow$\quad}l}
\verb|\cite{knuth86a}| & \cite{knuth86a} \\
\verb|\citep{knuth86a}| & \citep{knuth86a} \\
\verb|\citet[42]{knuth86a}| & \citet[42]{knuth86a} \\
\verb|\citep[42]{knuth86a}| & \citep[42]{knuth86a} \\
\verb|\cite{knuth86a,tlc2}| & \cite{knuth86a,tlc2} \\
\verb|\cite{knuth86a,knuth84}| & \cite{knuth86a,knuth84} \\
\end{tabular}

\hfutsetup{
cite-style = super,
}
Expand Down
4 changes: 2 additions & 2 deletions chapters/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ \subsection{二级节标题}

\subsubsection{三级节标题}

\paragraph{四级节标题} \texttt{runin=true},注意!
\paragraph{四级节标题}

\subparagraph{五级节标题} \texttt{runin=true},注意!
\subparagraph{五级节标题}

本模板 \pkg{hfutthesis} 是合肥工业大学本科生和研究生学位论文的 \LaTeX{}
模板, 按照《\href{http://xwgl.hfut.edu.cn/2021/0419/c1975a253949/page.htm}
Expand Down
18 changes: 9 additions & 9 deletions hfutsetup.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% !TeX root = ./main.tex

\hfutsetup{
title = {合肥工业大学学位论文模板示例文档 \hfutthesisversion},
title = {合肥工业大学学位论文模板\\示例文档 \hfutthesisversion},
title* = {An example of thesis template for \\ Hefei University of Technology \hfutthesisversion},
stuID = {学号},
author = {XXX},
Expand All @@ -14,7 +14,7 @@
%
% 数学字体
% math-style = GB, % 可选:GB, TeX, ISO
math-font = xits, % 可选:stix, xits, libertinus
math-font = xits, % 可选:stix, xits, libertinus, newcm, cm, lm, newtx
%
%
%
Expand Down Expand Up @@ -74,25 +74,25 @@
\usepackage{siunitx}

% 参考文献使用 BibTeX + natbib 宏包
% 顺序编码制
% HFUT顺序编码制
\usepackage[sort]{natbib}
\bibliographystyle{hfutthesis-numerical}

% 著者-出版年制
% \usepackage{natbib}
% \bibliographystyle{hfutthesis-authoryear}
% gbt7714-2015 参考文献的著录格式
% \usepackage[sort]{natbib}
% \bibliographystyle{gbt7714-numerical}

% 本科生参考文献的著录格式
% 优化过的 gbt7714-2015 参考文献的著录格式
% \usepackage[sort]{natbib}
% \bibliographystyle{hfutthesis-bachelor}
% \bibliographystyle{hfutthesis-graduate}

% 参考文献使用 BibLaTeX 宏包
% \usepackage[style=hfutthesis-numeric]{biblatex}
% \usepackage[bibstyle=hfutthesis-numeric,citestyle=hfutthesis-inline]{biblatex}
% \usepackage[style=hfutthesis-authoryear]{biblatex}
% \usepackage[style=hfutthesis-bachelor]{biblatex}
% 声明 BibLaTeX 的数据库
% \addbibresource{bib/ustc.bib}
% \addbibresource{bib/hfut.bib}

% 配置图片的默认目录
\graphicspath{{figures/}}
Expand Down
39 changes: 0 additions & 39 deletions hfutthesis-bachelor.bbx

This file was deleted.

4 changes: 0 additions & 4 deletions hfutthesis-bachelor.cbx

This file was deleted.

59 changes: 59 additions & 0 deletions hfutthesis-graduate.bbx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
\ProvidesFile{hfutthesis-graduate.bbx}[2021/01/19 v1.0 HFUT_Thesis biblatex
bibliography style]

\RequireBibliographyStyle{gb7714-2015}

\ExecuteBibliographyOptions{
gbpub = false,
gbalign = left,
}

\DeclareFieldFormat{titlecase}{\iftoggle{bbx:titlelink}{%
\iffieldundef{url}{\MakeSentenceCase{#1}}{%
\href{\thefield{url}}{#1}}}{\MakeSentenceCase{#1}}}

\DeclareFieldFormat{booktitlecase}{\MakeCapital{#1}}
\renewbibmacro*{booktitle}{%
\ifboolexpr{
test {\iffieldundef{booktitle}}
and
test {\iffieldundef{booksubtitle}}
}
{}
{\printtext[booktitle]{\bibtitlefont%
\printfield[booktitlecase]{booktitle}%
\setunit{\subtitlepunct}%
\printfield[booktitlecase]{booksubtitle}}%
\newunit%标点换成下一句
\setunit{\subtitlepunct}}%
\printfield{booktitleaddon}}

%
% 重设专利title的输出,将文献类型标识符输出出去
%
\renewbibmacro*{patenttitle}{%原输出来自biblatex.def文件
\ifboolexpr{%
test{\iffieldundef{title}}%
and%
test{\iffieldundef{subtitle}}%
}%
{}%
{\printtext[title]{\bibtitlefont%
\printfield[titlecase]{title}%
\ifboolexpr{test {\iffieldundef{subtitle}}}
{}{\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
\iffieldundef{titleaddon}{}
{\setunit{\subtitlepunct}\printfield{titleaddon}}%
% \setunit{\subtitlepunct}\printfield{number}%写专利号
\setunit{\subtitlepunct}%
\iflistundef{location}{}
{\printlist{location}\setunit{\addcomma\space}}% 专利国别
\printfield{number}%写专利号
\iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}%
%\iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点
%\newunit
}%
}%
\clearlist{location}\clearlist{address}%
}
Loading

0 comments on commit d3899b0

Please sign in to comment.