From 75de242fc22ff463a0899e607392fae3bf3a196f Mon Sep 17 00:00:00 2001 From: ShiWenber <1210169842@qq.com> Date: Sat, 27 Apr 2024 15:10:01 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86gbt7714-numerica?= =?UTF-8?q?l,=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=97=A7=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E6=9C=9F=E5=88=8A=E5=90=8D=E4=B8=BA=E6=96=9C=E4=BD=93?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- references/gbt7714-numerical.bst | 117 +++++++++++++++++++++---------- 1 file changed, 81 insertions(+), 36 deletions(-) diff --git a/references/gbt7714-numerical.bst b/references/gbt7714-numerical.bst index 0867f7b..faa65e6 100644 --- a/references/gbt7714-numerical.bst +++ b/references/gbt7714-numerical.bst @@ -8,9 +8,9 @@ %% ------------------------------------------------------------------- %% GB/T 7714 BibTeX Style %% https://github.com/zepinglee/gbt7714-bibtex-style -%% Version: 2021/12/08 v2.1.3 +%% Version: 2024/03/08 v2.1.6 %% ------------------------------------------------------------------- -%% Copyright (C) 2016—2021 by Zeping Lee +%% Copyright (C) 2016--2024 by Zeping Lee %% ------------------------------------------------------------------- %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -37,10 +37,9 @@ INTEGERS { show.mark space.before.mark show.medium.type - slash.for.extraction - in.booktitle short.journal italic.journal + link.journal bold.journal.volume show.missing.address.publisher space.before.pages @@ -55,37 +54,41 @@ INTEGERS { end.with.period } +STRINGS { + component.part.label +} + FUNCTION {load.config} { #2 'citation.et.al.min := #1 'citation.et.al.use.first := #4 'bibliography.et.al.min := #3 'bibliography.et.al.use.first := - #0 'uppercase.name := + #1 'uppercase.name := #0 'terms.in.macro := #0 'year.after.author := #1 'period.after.author := - #1 'italic.book.title := - #0 'sentence.case.title := - #1 'link.title := + #0 'italic.book.title := + #1 'sentence.case.title := + #0 'link.title := #1 'title.in.journal := #0 'show.patent.country := #1 'show.mark := #0 'space.before.mark := #1 'show.medium.type := - #1 'slash.for.extraction := - #0 'in.booktitle := + "slash" 'component.part.label := #0 'short.journal := - #1 'italic.journal := + #0 'italic.journal := + #0 'link.journal := #0 'bold.journal.volume := #0 'show.missing.address.publisher := #1 'space.before.pages := #0 'only.start.page := #0 'wave.dash.in.pages := #1 'show.urldate := - #0 'show.url := - #0 'show.doi := - #0 'show.preprint := + #1 'show.url := + #1 'show.doi := + #1 'show.preprint := #0 'show.note := #0 'show.english.translation := #1 'end.with.period := @@ -102,6 +105,7 @@ ENTRY editor eprint eprinttype + entrysubtype howpublished institution journal @@ -382,9 +386,22 @@ FUNCTION {new.sentence} FUNCTION {new.slash} { output.state before.all = 'skip$ - { slash.for.extraction + { component.part.label "slash" = { after.slash 'output.state := } - { after.block 'output.state := } + { new.block + component.part.label "in" = + { entry.lang lang.en = + { "In: " output + write$ + "" + before.all 'output.state := + } + 'skip$ + if$ + } + 'skip$ + if$ + } if$ } if$ @@ -720,7 +737,7 @@ FUNCTION {editor.full} FUNCTION {make.full.names} { type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.full { type$ "collection" = @@ -862,7 +879,7 @@ FUNCTION {format.volume} { volume is.number { entry.lang lang.zh = { "第 " volume * " 卷" * } - { "volume" volume tie.or.space.connect } + { "Vol." volume tie.or.space.connect } if$ } { volume } @@ -877,7 +894,7 @@ FUNCTION {format.number} { number is.number { entry.lang lang.zh = { "第 " number * " 册" * } - { "number" number tie.or.space.connect } + { "No." number tie.or.space.connect } if$ } { number } @@ -977,14 +994,6 @@ FUNCTION {format.series.vol.num.booktitle} { format.booktitle.vol.num } if$ format.btitle - in.booktitle - { duplicate$ empty$ not entry.lang lang.en = and - { "In: " swap$ * } - 'skip$ - if$ - } - 'skip$ - if$ } FUNCTION {remove.period} @@ -1050,7 +1059,7 @@ FUNCTION {get.journal.title} } FUNCTION {check.arxiv.preprint} -{ #1 #5 substring$ "l" change.case$ "arxiv" = +{ #1 #5 substring$ purify$ "l" change.case$ "arxiv" = { #1 } { #0 } if$ @@ -1063,6 +1072,10 @@ FUNCTION {format.journal} 'emphasize 'skip$ if$ + link.journal + 'add.link + 'skip$ + if$ } 'skip$ if$ @@ -1126,9 +1139,13 @@ FUNCTION {format.edition} { edition empty$ { "" } { edition is.number - { entry.lang lang.zh = - { edition " 版" * } - { edition num.to.ordinal " ed." * } + { edition "1" = not + { entry.lang lang.zh = + { edition " 版" * } + { edition num.to.ordinal " ed." * } + if$ + } + 'skip$ if$ } { entry.lang lang.en = @@ -1290,7 +1307,10 @@ FUNCTION {format.year} { year extract.before.slash extra.label * } { date empty$ not { date extract.before.dash extra.label * } - { "empty year in " cite$ * warning$ + { entry.is.electronic not + { "empty year in " cite$ * warning$ } + 'skip$ + if$ urldate empty$ not { "[" urldate extract.before.dash * extra.label * "]" * } { "" } @@ -1328,7 +1348,15 @@ FUNCTION {format.date} { date empty$ not { type$ "patent" = type$ "newspaper" = or { date } - { format.year } + { entrysubtype empty$ not + { type$ "article" = entrysubtype "newspaper" = and + { date } + { format.year } + if$ + } + { format.year } + if$ + } if$ } { year empty$ not @@ -1796,7 +1824,15 @@ FUNCTION {journal.article} new.block title.in.journal { format.title "title" output.check - "J" set.entry.mark + entrysubtype empty$ not + { + entrysubtype "newspaper" = + { "N" set.entry.mark } + { "J" set.entry.mark } + if$ + } + { "J" set.entry.mark } + if$ format.mark "" output.after new.block } @@ -1936,6 +1972,10 @@ FUNCTION {preprint} format.urldate "" output.after output.eprint output.url + show.preprint not eprint empty$ or + 'output.doi + 'skip$ + if$ new.block format.note output fin.entry @@ -2000,7 +2040,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2241,7 +2286,7 @@ FUNCTION {editor.key.organization.label} FUNCTION {calc.short.authors} { "" 'short.label := type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.key.label { type$ "collection" = From d9be08bf2a4570dd2ef5c2ea8a7d1e0dc1ed9839 Mon Sep 17 00:00:00 2001 From: ShiWenber <1210169842@qq.com> Date: Sat, 27 Apr 2024 15:17:02 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E7=9A=84=E9=97=B4=E8=B7=9D=E5=92=8C=E9=A1=B5=E7=9C=89?= =?UTF-8?q?=E9=A1=B5=E8=84=9A=E7=9A=84=E4=BD=8D=E7=BD=AE=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E5=85=B6=E5=92=8C=E5=AD=A6=E6=A0=A12024=E5=B9=B4=E7=9A=84word?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=A7=86=E8=A7=89=E6=95=88=E6=9E=9C=E6=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YNUbachelor.cls | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/YNUbachelor.cls b/YNUbachelor.cls index 2c33847..c407d3b 100644 --- a/YNUbachelor.cls +++ b/YNUbachelor.cls @@ -78,11 +78,16 @@ \newcommand{\otherFontSize}{\zihao{-4} \heiti}%三层及以下标题格式设置 %页边距设置 +% 参考 https://github.com/ustctug/ustcthesis/blob/master/ustcthesis.cls 相关设置 \RequirePackage[a4paper, - top=2.5cm, - bottom=2.0cm, - left=3.0cm, - right=2.0cm]{geometry} + % 根据 word 视觉效果调整的页边距,通过 powertoy 的 ruler 工具测量,效果相近 + top = 3.0cm, + bottom = 2.7cm, + left = 3.0cm, + right = 2.0cm, + head = 1.6cm, + foot = 0.85cm, + ]{geometry} \addtolength{\oddsidemargin}{0cm} \addtolength{\evensidemargin}{1cm} @@ -106,24 +111,28 @@ } \ctexset{ + % 关于字号和行距,见 https://blog.csdn.net/weixin_43849277/article/details/115201445#:~:text=1%20%E5%B0%8F%E5%9B%9B%E5%AD%97%E4%BD%93%E5%AF%B9%E5%BA%9412%E7%A3%85%EF%BC%8C12%20X%200.03527%20%3D%200.42324%20cm%202,cm%203%20%E6%8D%A2%E4%B8%BAbp%EF%BC%8C0.687765%20%2F%200.0353%20%3D%2019.4834%20bp section = { format ={\clearpage\phantomsection\centering\yiCengBiaoTi}, afterindent=true, - beforeskip={0.8em}, - afterskip={0.5em}, + % beforeskip={0.8em}, + beforeskip=16.64bp, + % afterskip={0.5em}, + afterskip=10.4bp, fixskip = {false}, }, subsection = { format ={\phantomsection\erCengBiaoTi}, afterindent=true, - beforeskip={0.5em}, - afterskip={0.0em}, + % beforeskip={0.5em}, + beforeskip = 10.4bp, + afterskip= 0bp, fixskip = {false}, }, subsubsection = { format ={\phantomsection\otherFontSize}, afterindent=true, - beforeskip={0.5em}, + beforeskip={0.0em}, afterskip={0.0em}, indent= {2\ccwd}, fixskip = {false}, @@ -259,7 +268,7 @@ } \renewcommand{\sectionmark}[1]{\markboth{#1}{}} % \renewcommand{\sectionmark}[1]{\markboth{\CTEXifname{\CTEXthesection\quad}{}#1}{}} -\setlength{\headheight}{12.64723pt}%页眉高度 +% \setlength{\headheight}{12.64723pt}%页眉高度 %中英abstract, keywords设置 \renewenvironment{abstract}[1]{% @@ -315,7 +324,7 @@ } %acknowledgement致谢设置 -\newcommand{\acknowledgementname}{致\texorpdfstring{\quad}{}谢} +\newcommand{\acknowledgementname}{致\texorpdfstring{\qquad}{}谢} \newenvironment{acknowledgement}[1]{% \section*{\acknowledgementname \addcontentsline{toc}{section}{\acknowledgementname} @@ -326,7 +335,7 @@ %参考文献 \RequirePackage[square,numbers,super,sort&compress,sectionbib]{natbib} -%\RequirePackage{gbt7714} +% \RequirePackage{gbt7714} \bibliographystyle{references/gbt7714-numerical.bst}%gbt7714-author-year,gbt7714-numerical %natbib.sty From f36d50adbe9adc70548f8ff10cce2ada7a42acf2 Mon Sep 17 00:00:00 2001 From: ShiWenber <1210169842@qq.com> Date: Sat, 11 May 2024 20:26:49 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=20subsubsection?= =?UTF-8?q?=20=E7=9A=84=20beforeskip=EF=BC=9B=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E6=80=BB=E7=BB=93=E9=83=A8=E5=88=86=E7=9A=84=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=EF=BC=8C=E5=B9=B6=E5=9C=A8main.tex=20?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0=E4=BA=86=E8=AF=B4=E6=98=8E=EF=BC=9B?= =?UTF-8?q?=E4=BB=8E=E7=9B=AE=E5=BD=95=E9=A1=B5=E4=B8=AD=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E4=BA=86=20=E7=9B=AE=E5=BD=95=E7=9A=84=E9=A1=B5=E6=A0=87?= =?UTF-8?q?=EF=BC=9B=E5=B0=86=E6=91=98=E8=A6=81=E5=92=8C=E8=87=B4=E8=B0=A2?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E7=9A=84=E9=97=B4=E9=9A=94=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E4=B8=AD=E6=96=87=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YNUbachelor.cls | 30 ++++++++++++++++++++++++++---- main.tex | 12 ++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/YNUbachelor.cls b/YNUbachelor.cls index c407d3b..88fc299 100644 --- a/YNUbachelor.cls +++ b/YNUbachelor.cls @@ -68,6 +68,11 @@ Scale = MatchLowercase, ] +\setlength{\parskip}{0bp} %段落间距 + +% 浮动体和正文的间距 +\setlength{\textfloatsep}{22bp} + \RequirePackage{amsmath,amsfonts,amssymb,siunitx}%数学公式扩展,花体,扩展符号的基础字体支持,扩展符号定义成命令,物理量的单位 %\RequirePackage[math-style=ISO, bold-style=ISO]{unicode-math} %\setmathfont{XITS Math} @@ -98,12 +103,12 @@ punct=quanjiao,%全角标点 autoindent=2, today=small, - contentsname={目\texorpdfstring{\quad}{}录}, + contentsname={目\texorpdfstring{\qquad}{}录}, listfigurename={图目录}, listtablename={表目录}, figurename={图}, tablename={表}, - abstractname={摘\texorpdfstring{\quad}{}要}, + abstractname={摘\texorpdfstring{\qquad}{}要}, indexname={索引}, appendixname={附录}, bibname={参考文献}, @@ -132,7 +137,10 @@ subsubsection = { format ={\phantomsection\otherFontSize}, afterindent=true, - beforeskip={0.0em}, + % TODO: 这里的0.6 是临时方案,如果设置为0,会导致subsubsection标题和正文之间的间距过小。 + % 另,设置为 0.6 em 依然有问题,如果二级标题和三级标题之间的没有正文,那么二级标题和三级标题之间的间距也会过小。 + % beforeskip={0.0em}, + beforeskip={0.6em}, afterskip={0.0em}, indent= {2\ccwd}, fixskip = {false}, @@ -313,7 +321,8 @@ \renewcommand\tableofcontents{% \section*{\contentsname% - \addcontentsline{toc}{section}{\contentsname}% + % 将目录页中的目录页码标记去除 + % \addcontentsline{toc}{section}{\contentsname}% \markboth{\contentsname}{}% }% \pagestyle{PreContent} @@ -333,6 +342,19 @@ #1} {} +% 总结与展望设置 +\newcommand{\conclusionname}{结论} +\newenvironment{conclusion}[1]{ + \section*{\conclusionname + \addcontentsline{toc}{section}{\conclusionname} + \markboth{\conclusionname}{} + } + #1} + {} + + + + %参考文献 \RequirePackage[square,numbers,super,sort&compress,sectionbib]{natbib} % \RequirePackage{gbt7714} diff --git a/main.tex b/main.tex index 22470db..ba5f709 100644 --- a/main.tex +++ b/main.tex @@ -484,6 +484,14 @@ 引用\cite{2019First}。引用\cite{向守平2008天体物理概论}。引用\cite{BQC_2020}。引用\cite{2019First,向守平2008天体物理概论,BQC_2020}。 \end{latexcode} \textbf{编译得:}引用\cite{2019First}。引用\cite{向守平2008天体物理概论}。引用\cite{BQC_2020}。引用\cite{2019First,向守平2008天体物理概论,BQC_2020}。 + + \subsection{总结部分} + 总结部分使用如下代码撰写: + \begin{latexcode} + \begin{conclusion} + 总结的内容。 + \end{conclusion} + \end{latexcode} \subsection{致谢部分} 致谢部分使用如下代码撰写: @@ -525,6 +533,10 @@ \section{PDF转Word} 可使用 \href{https://www.adobe.com/acrobat/online/pdf-to-word.html}{Adobe PDF to Word} 转换 \verb|*.pdf| 文件。第二次转换文件时需要登录 Adobe 账号才能下载,建议在浏览器的“无痕浏览”、“隐私模式”等模式下访问以跳过强制登录。 + \begin{conclusion} + 总结与展望。 + \end{conclusion} + \bibliography{references/references.bib}%参考文献,引入文献的bibtex格式信息,填bib文件 \begin{acknowledgement} From f46306b2bbade44bc67b4ed0db3ee8e52c11efc5 Mon Sep 17 00:00:00 2001 From: ShiWenber <1210169842@qq.com> Date: Tue, 21 May 2024 15:41:13 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=80=BB?= =?UTF-8?q?=E9=A1=B5=E6=95=B0=E7=BB=9F=E8=AE=A1=E8=AE=A1=E5=85=A5=E5=B0=81?= =?UTF-8?q?=E5=BA=95=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YNUbachelor.cls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/YNUbachelor.cls b/YNUbachelor.cls index 4fda498..53090eb 100644 --- a/YNUbachelor.cls +++ b/YNUbachelor.cls @@ -200,6 +200,7 @@ %封底 \newcommand{\backcover}{ \AtEndDocument{% + \label{LastContentPage} \clearpage~\thispagestyle{empty} \AddToShipoutPicture*{% \put(0,0){% @@ -270,7 +271,7 @@ \fancyhf{} \fancyhead[OC]{\zihao{5} \leftmark} \fancyhead[EC]{\zihao{5} \@title} - \fancyfoot[C]{\zihao{5} 第\thepage 页(共~\pageref{LastPage}~页)} + \fancyfoot[C]{\zihao{5} 第\thepage 页(共~\pageref{LastContentPage}~页)} \renewcommand\headrulewidth{0.5pt} } \renewcommand{\sectionmark}[1]{\markboth{#1}{}} From 3255e91e9537ae6be64da4deda02687ff58ca9fe Mon Sep 17 00:00:00 2001 From: ShiWenber <1210169842@qq.com> Date: Tue, 21 May 2024 16:30:48 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=91=98=E8=A6=81?= =?UTF-8?q?=EF=BC=8C=E8=8B=B1=E6=96=87=E6=91=98=E8=A6=81=E5=92=8C=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E9=A1=B5=E7=A0=81=E9=83=BD=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E4=BB=8E=E7=BD=97=E9=A9=AC=E6=95=B0=E5=AD=971=E5=BC=80?= =?UTF-8?q?=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YNUbachelor.cls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/YNUbachelor.cls b/YNUbachelor.cls index 53090eb..1fc9fc7 100644 --- a/YNUbachelor.cls +++ b/YNUbachelor.cls @@ -297,7 +297,7 @@ \markboth{\enabstractname}{} } #1} - {\thispagestyle{PreContent}} + {\thispagestyle{PreContent}\pagenumbering{Roman}} \newcommand{\enkeywords}[1]{% {\textbf{Key Words:} #1}} @@ -326,6 +326,7 @@ \markboth{\contentsname}{}% }% \pagestyle{PreContent} + \pagenumbering{Roman} \@starttoc{toc}% \thispagestyle{PreContent}% \afterpage{\pagenumbering{arabic}}% From 7917bca1163bc7382fc530d311513dbaf3dacfd5 Mon Sep 17 00:00:00 2001 From: ShiWenber <1210169842@qq.com> Date: Thu, 13 Jun 2024 21:28:56 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E5=8F=A5=E5=8F=B7=E5=8F=98=E4=B8=BA=E7=82=B9=E5=BD=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YNUbachelor.cls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YNUbachelor.cls b/YNUbachelor.cls index 1fc9fc7..8c585f3 100644 --- a/YNUbachelor.cls +++ b/YNUbachelor.cls @@ -34,7 +34,7 @@ %简体中文 宋体 %\setCJKmainfont{SimSun.ttf}[Path=fonts/] -\setCJKmainfont{SimSun.ttf}[AutoFakeBold=true, Path=fonts/, Mapping=fullwidth-stop] +\setCJKmainfont{SimSun.ttf}[AutoFakeBold=true, Path=fonts/] %简体中文 黑体 \setCJKsansfont{SimHei.ttf}[Path=fonts/]