From 4338972cc175be565a3441c4ae8a6aa0dfcbe9f9 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 6 Jun 2021 03:02:43 +0000
Subject: CTAN sync 202106060302

---
 macros/latex/contrib/bjfuthesis/bjfuthesis.cls | 86 ++++++++++++++++++++++++--
 1 file changed, 82 insertions(+), 4 deletions(-)

(limited to 'macros/latex/contrib/bjfuthesis/bjfuthesis.cls')

diff --git a/macros/latex/contrib/bjfuthesis/bjfuthesis.cls b/macros/latex/contrib/bjfuthesis/bjfuthesis.cls
index ed02764f98..ef1690a7b2 100644
--- a/macros/latex/contrib/bjfuthesis/bjfuthesis.cls
+++ b/macros/latex/contrib/bjfuthesis/bjfuthesis.cls
@@ -23,7 +23,7 @@
 \def\keywords@label@zh{关键词：}
 \def\keywords@label@en{Keywords: }
 \def\chartnote@label{注：}
-\ProvidesClass{bjfuthesis}[2021/05/30 LaTeX document style for BJFU thesis]
+\ProvidesClass{bjfuthesis}[2021/06/05 A thesis class for Beijing Forestry University]
 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
 \ProcessOptions*
 \LoadClass[a4paper,oneside,fontset=none]{ctexbook}
@@ -69,6 +69,8 @@
 \renewcommand\headrulewidth{.5pt}
 \fancypagestyle{plain}{\fancyhead[C]{\fontsize{9}{12}\selectfont\header@text}\renewcommand\headrulewidth{.5pt}}
 \renewcommand\floatpagefraction{1}
+\RequirePackage[style=gb7714-2015]{biblatex}
+\addbibresource{bibliography.bib}
 \RequirePackage{titlesec}
 \titleformat{\chapter}{\centering\fontsize{16}{30}\bfseries}{\thechapter}{.5em}{}
 \titleformat{\section}{\fontsize{14}{37}\bfseries}{\thesection}{.5em}{}
@@ -82,12 +84,88 @@
 \titlecontents{chapter}[0em]{\fontsize{10.5}{21}\bfseries}{\thecontentslabel~}{\thecontentslabel}{\hspace{.5em}\titlerule*{.}\contentspage}
 \titlecontents{section}[1em]{\fontsize{10.5}{21}}{\thecontentslabel~}{\thecontentslabel}{\hspace{.5em}\titlerule*{.}\contentspage}
 \titlecontents{subsection}[2em]{\fontsize{10.5}{21}}{\thecontentslabel~}{\thecontentslabel}{\hspace{.5em}\titlerule*{.}\contentspage}
-\RequirePackage[hidelinks]{hyperref}
-\RequirePackage[gbpub=false,style=gb7714-2015]{biblatex}
-\addbibresource{bibliography.bib}
 \renewcommand\topfraction{1}
 \renewcommand\bottomfraction{1}
 \renewcommand\textfraction{0}
+\RequirePackage{xpatch}
+\RequirePackage[hidelinks]{hyperref}
+
+\letbibmacro{oldtitle}{title}
+\renewbibmacro*{title}{%
+\ifentrytype{inproceedings}{
+  \ifboolexpr{
+    test {\iffieldundef{title}}
+    and
+    test {\iffieldundef{subtitle}}
+  }
+    {}
+    \printtext[title]{%
+       \printfield[titlecase]{title}}}{\usebibmacro{oldtitle}}}
+\letbibmacro{oldbooktitle}{booktitle}
+\renewbibmacro*{booktitle}{%
+\ifentrytype{inproceedings}{
+  \ifboolexpr{
+    test {\iffieldundef{booktitle}}
+    and
+    test {\iffieldundef{booksubtitle}}
+  }
+    {}
+    {\printtext[booktitle]{\bibtitlefont%
+       \printfield[titlecase]{booktitle}\printtext{[C]}%
+       \setunit{\subtitlepunct}%
+       \printfield[titlecase]{booksubtitle}}%
+     \newunit%标点换成下一句
+     \setunit{\subtitlepunct}}%
+  \printfield{booktitleaddon}}{\usebibmacro{oldbooktitle}}}
+\DeclareBibliographyDriver{inproceedings}{%
+  \usebibmacro{bibindex}%
+  \usebibmacro{begentry}%
+  \usebibmacro{author/translator+others}%
+  \setunit{\printdelim{nametitledelim}}\newblock
+  \usebibmacro{title}\printtext{[A]} 
+   \unspace
+%   \nobreak
+%   \setunit{[A]}
+  \usebibmacro{in:}%
+  \usebibmacro{editor}%
+  \newunit\newblock
+  \usebibmacro{maintitle+booktitle}%%
+  \newunit\newblock
+  \usebibmacro{event+venue+date}%
+  \newunit\newblock
+%   \iffieldundef{maintitle}
+    % {\printfield{volume}%
+    %  \printfield{part}}
+    % {}%
+  \newunit
+  \printfield{volumes}%
+  \newunit\newblock
+  \usebibmacro{series+number}%
+  \newunit\newblock
+  \printfield{note}%
+  \newunit\newblock
+  \printlist{organization}%
+  \newunit
+  \usebibmacro{publisher+location+date}%
+  \newunit\newblock
+  \usebibmacro{chapter+pages}%
+  \newunit\newblock
+  \iftoggle{bbx:isbn}
+    {\printfield{isbn}}
+    {}%
+  \newunit\newblock
+  \usebibmacro{doi+eprint+url}%
+  \newunit\newblock
+  \usebibmacro{addendum+pubstate}%
+  \setunit{\bibpagerefpunct}\newblock
+  \usebibmacro{pageref}%
+  \newunit\newblock
+  \iftoggle{bbx:related}
+    {\usebibmacro{related:init}%
+     \usebibmacro{related}}
+    {}%
+  \usebibmacro{finentry}}
+
 \newenvironment{abstract}{\kaiti}{\vskip \baselinestretch\baselineskip\par}
 \newcommand\keywordscn[1]{\noindent\fontsize{12}{21}\selectfont\textbf{\keywords@label@zh}#1\par}
 \newcommand\keywordsen[1]{\noindent\fontsize{12}{21}\selectfont\textbf{\keywords@label@en}#1\par}
-- 
cgit v1.2.3

