Files
bachelor-thesis/thuthesis-numeric.bbx
2026-05-12 10:45:51 +08:00

60 lines
1.8 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
\ProvidesFile{thuthesis-numeric.bbx}[2020/08/01 v1.0 ThuThesis biblatex
bibliography style]
\RequireBibliographyStyle{gb7714-2015}
\ExecuteBibliographyOptions{
gbnamefmt = lowercase,
gbpub = false,
gbalign = left,
}
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{1cm}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
%
% 重设专利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}%
}
% 斜线默认使用原字体,不再使用等宽字体
% <https://github.com/tuna/thuthesis/discussions/1018>
\def\SlashFont{}