From d6d9cbf441f094db37af82767f829f7c3ec4c993 Mon Sep 17 00:00:00 2001 From: 1FCENdoge <86185801+1FCENdoge@users.noreply.github.com> Date: Wed, 2 Sep 2026 21:29:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B0=86=E5=8F=82=E8=80=83=E6=96=87?= =?UTF-8?q?=E7=8C=AE=E6=A0=BC=E5=BC=8F=E6=9B=B4=E6=96=B0=E8=87=B3=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sysuthesis-authoryear.bbx | 65 +++++---- sysuthesis-authoryear.bst | 277 ++++++++++++++++++++------------------ sysuthesis-numeric.bbx | 49 ++++--- sysuthesis-numerical.bst | 277 ++++++++++++++++++++------------------ 4 files changed, 358 insertions(+), 310 deletions(-) diff --git a/sysuthesis-authoryear.bbx b/sysuthesis-authoryear.bbx index bcc384d..82905f3 100644 --- a/sysuthesis-authoryear.bbx +++ b/sysuthesis-authoryear.bbx @@ -583,7 +583,7 @@ % %增加一个处理佚名或noauthor的控制选项 \DeclareBibliographyOption{gbnoauthor}[true]{% - \ifstrequal{#1}{false}{}{\dealnoathor}} + \ifstrequal{#1}{false}{}{\dealnoauthor}} %\ExecuteBibliographyOptions{gbnoauthor=true}%对于需要展开较早(展开层级优先)的选项,这一执行无效,只能用宏包加载时给出的选项。 @@ -614,7 +614,7 @@ % 增加控制析出文献来源前的标点符号//输出的选项 % v1.0k, 2018.04.20,added in by hzz \newtoggle{bbx:gbpunctin} - \DeclareBibliographyOption{gbpunctin}[false]{% + \DeclareBibliographyOption{gbpunctin}[true]{% \settoggle{bbx:gbpunctin}{#1}} \ExecuteBibliographyOptions{gbpunctin} @@ -836,7 +836,7 @@ \DefineBibliographyStrings{english}{ bibliography = {\str@bibliography}, references = {\str@references}, - bytranslatorcn= {\str@bytranslator\adddot}, %将trans. by 改成 译 + bytranslatorcn= {\str@bytranslator}, %将trans. by 改成 译 byeditor={\iffieldequalstr{userd}{chinese}{\str@editorcn}{ed\adddotspace by}}, and = {\addcomma},%将第2和3人名见的and符号改成 逗号,用\finalnamedelim命令也可以定义,参见3.9.1节 andcn = {\addcomma},%\str@andcn\ and本地化字符串的中文对应词 @@ -1069,6 +1069,7 @@ \step[fieldset=usera, fieldvalue={DS}]% \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution \step[fieldset=institution, origfieldval] + \step[fieldset=entrysubtype,fieldvalue={dataset}] } \map{%对应增加的一个软件类型software确定文献类型标识符 \pertype{software} @@ -1081,16 +1082,17 @@ \step[fieldset=usera, fieldvalue={CM}]% \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution \step[fieldset=institution, origfieldval] + \step[fieldset=entrysubtype, fieldvalue=map] } - \map{%舆图类型map的scale表示尺寸 + \map{%舆图类型map的dimensions表示尺寸 \pertype{map} - \step[fieldsource=scale,final] %有时会把publisher和institution混淆,处理后使用institution + \step[fieldsource=dimensions,final] \step[fieldset=addendum, origfieldval] } - \map{%舆图类型map的dimensions表示尺寸 + \map{% \pertype{map} - \step[fieldsource=dimensions,final] %有时会把publisher和institution混淆,处理后使用institution - \step[fieldset=addendum, origfieldval] + \step[fieldsource=edition,final] % + \step[fieldset=version, origfieldval] } \map{%对应增加的一个预印本类型preprint确定文献类型标识符 \pertype{preprint} @@ -1169,6 +1171,12 @@ \pertype{patent} \step[fieldset=usera, fieldvalue={P}] } + \map[overwrite]{ + \pertype{patent} + \step[fieldsource=holder, final] + \step[fieldset=author, origfieldval] + \step[fieldset=holder, null] + } \map{ \pertype{inproceedings} \pertype{conference}%兼容老的conference类型 @@ -1184,7 +1192,7 @@ } \map{ \pertype{incollection} - \step[fieldset=usera, fieldvalue={G}] + \step[fieldset=usera, fieldvalue={M}]%20260706从标识符G转为M \step[fieldsource=institution]%有时会把publisher和institution混淆,处理后使用publisher \step[fieldset=publisher, origfieldval] } @@ -1503,7 +1511,6 @@ \pertype{dataset} \step[fieldsource=journal,final] \step[typesource=dataset,typetarget=article] - \step[fieldset=entrysubtype,fieldvalue={dataset}] } \map{%再转online \pertype{dataset} @@ -1662,7 +1669,7 @@ % 佚名/noauthor的处理 % % 原理方法:利用样式层的动态数据修改实现 -\def\dealnoathor{ +\def\dealnoauthor{ \DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map{%默认情况下将空缺作者的中文文献设置为佚名 @@ -1673,6 +1680,10 @@ \step[fieldsource=language,match={english},final] \step[fieldset=author, fieldvalue={A{non}}]%noauthor换成Anon,同时为避免大写还加了{} } + \map{%如果author或者editor或者translator存在,那么设置namea便于后面判断。 + \step[fieldsource=author,final] + \step[fieldset=namea,origfieldval] + } } } } @@ -2120,7 +2131,7 @@ % 2021.08.19,增加出版地和出版社之间的标点,hzz \newcommand{\publocpunct}{\addcolon\addspace}%出版项中:出版社地址后面的标点 %\renewcommand{\relateddelim}{}%\par - +\DeclareDelimFormat[bib]{nonameyeardelim}{\addcomma\addspace} %标题内容和文献标识符之间的标点 %===================================================================== % 修改域的格式,重定义域的输出宏 %===================================================================== @@ -2479,7 +2490,7 @@ {\printtext[title]{\bibtitlefont%增加字体控制命令 %标准的号放前面 \ifentrytype{standard}{\ifboolexpr{(not test{\iffieldundef{number}})}% - {\printfield[titlecase]{number}\quad\printfield[titlecase]{title}}% + {\printfield{number}\quad\printfield[titlecase]{title}}% {\printfield[titlecase]{title}}}% {\printfield[titlecase]{title}}% \ifboolexpr{test {\iffieldundef{subtitle}}}%增加了对子标题的判断 @@ -3798,14 +3809,14 @@ test {\ifentrytype{conference}} \newunit\newblock \usebibmacro{byauthor}}% \newunit\newblock - \printfield{type}% - \setunit*{\innerspacedelim}% +% \printfield{type}% +% \setunit*{\innerspacedelim}% %\printfield{number}%已放到patenttitle中处理 - \iflistundef{location} - {} - {\setunit*{\innerspacedelim}% - \printtext{%[parens] - \printlist[][-\value{listtotal}]{location}}}% +% \iflistundef{location} +% {} +% {\setunit*{\innerspacedelim}% +% \printtext{%[parens] +% \printlist[][-\value{listtotal}]{location}}}% \ifboolexpr{not test {\iflistundef{publisher}} and test {\iffieldundef{url}}}% {\setunit*{\subtitlepunct}% \printtext{%[parens] @@ -3839,7 +3850,7 @@ test {\ifentrytype{conference}} \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3861,15 +3872,9 @@ test {\ifentrytype{conference}} {\newunit\usebibmacro{newsdate}} {\ifboolexpr{test {\iffieldequalstr{entrysubtype}{dataset}} or test {\iffieldequalstr{entrysubtype}{preprint}}} {\usebibmacro{modifydate}}{\newunit\usebibmacro{modifydate}}}}% -% \newunit\newblock -%\ifboolexpr{% -%test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{eventday}}% -%}{\usebibmacro{date}}% -%{\iffieldundef{entrysubtype}{\usebibmacro{modifydate}}% -% {\iffieldequalstr{entrysubtype}{archive}{\usebibmacro{newsdate}}{\usebibmacro{modifydate}}}% -%}%带括号的日期和不带括号的日期 \iffieldundef{entrysubtype}{\usebibmacro{online:url+urldate}} - {\iffieldequalstr{entrysubtype}{report}{\usebibmacro{chapter+pages}\newunit\usebibmacro{url}}{\usebibmacro{online:url+urldate}}}% + {\iffieldequalstr{entrysubtype}{report}{\usebibmacro{chapter+pages}\newunit\usebibmacro{url}} + {\iffieldequalstr{entrysubtype}{map}{\newunit\usebibmacro{url}}{\usebibmacro{online:url+urldate}}}}% \newunit\newblock \usebibmacro{doi+cstr}% \newunit\newblock @@ -4185,6 +4190,8 @@ test {\ifentrytype{conference}} \iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}} \DeclareDelimFormat{bibpagespunct}{% \iffieldequalstr{userd}{chinese}{\unspace\gbpunctcolon}{\unspace\gbpunctcolonlanen}} +\DeclareDelimFormat[bib]{nonameyeardelim}{% + \iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}} %标题内容和文献标识符之间的标点 \renewcommand{\aftertransdelim}{\gbpunctcomma} \renewcommand{\beforetransdelim}{% \iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}} diff --git a/sysuthesis-authoryear.bst b/sysuthesis-authoryear.bst index 9e300fe..59391e7 100644 --- a/sysuthesis-authoryear.bst +++ b/sysuthesis-authoryear.bst @@ -1,5 +1,5 @@ %% -%% This is file `gbt7714-2025-authoryear.bst', +%% This is file `variants/gbt7714-2025-authoryear.bst', %% generated with the docstrip utility. %% %% The original source files were: @@ -8,7 +8,7 @@ %% ------------------------------------------------------------------- %% GB/T 7714 BibTeX Style %% https://github.com/zepinglee/gbt7714-bibtex-style -%% Version: 2026-06-14 v2.3.1 +%% Version: 2026-07-20 v3.0.1 %% ------------------------------------------------------------------- %% Copyright (C) 2016-2026 by Zeping Lee %% ------------------------------------------------------------------- @@ -134,6 +134,7 @@ FUNCTION {load.config} ENTRY { address + applicationnumber archiveprefix author bookauthor @@ -426,7 +427,7 @@ FUNCTION {bbl.sine.loco.sine.nomine} if$ } -FUNCTION {default.self.tokens} { ":,-'–—?.!" } +FUNCTION {default.self.tokens} { ":,-'’–—?.!()[]" } FUNCTION {latin.upper} { "ÀÁÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞŸĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ" } @@ -983,21 +984,18 @@ FUNCTION {is.tex.str.in.title.case} duplicate$ "" = { pop$ pop$ #0 } { split.first.char.from.str is.upper - { duplicate$ "" = % single-letter word - { pop$ pop$ #1 } - { duplicate$ is.all.lower - { empty$ - { duplicate$ "" = - { pop$ #0 } - 'is.all.lower - if$ - } + { duplicate$ + is.all.lower + { empty$ + { duplicate$ "" = + { pop$ #1 } 'is.all.lower if$ } - { pop$ pop$ #0 } + 'is.all.lower if$ } + { pop$ pop$ #0 } if$ } { pop$ pop$ #0} @@ -1210,7 +1208,6 @@ FUNCTION {self.tokens} FUNCTION {tokenize.by} { 'b := 's := - s "" = { "" "" } { s split.first.char.from.str @@ -1246,8 +1243,7 @@ FUNCTION {tokenize} FUNCTION {smart.sentence.case} { tokenize 's := - - { s "" = not } + { s "" = not } { s skip.inter.token.chars 's := * s tokenize swap$ duplicate$ ":" = @@ -1256,7 +1252,11 @@ FUNCTION {smart.sentence.case} tokenize swap$ control.capitalize.subtitle 'skip$ - { lower.token.if.in.title.case } + { duplicate$ "A" = + { pop$ "a" } + 'lower.token.if.in.title.case + if$ + } if$ } 'lower.token.if.in.title.case @@ -1453,6 +1453,7 @@ FUNCTION {set.entry.numbered} type$ "patent" = or type$ "regulation" = or type$ "report" = or + type$ "standard" = or type$ "techreport" = or { #1 'entry.numbered := } { #0 'entry.numbered := } @@ -1587,7 +1588,7 @@ FUNCTION {format.western.given.name} if$ } if$ - s nameptr "{, jj}" format.name$ * + s nameptr "{ jj}" format.name$ * "." "" find.replace } @@ -1673,7 +1674,7 @@ FUNCTION {format.name} duplicate$ lang.zh = swap$ lang.ja = or { pop$ s nameptr "{vv~}{ll}" format.name$ - s nameptr "{ff}{, jj}" format.name$ + s nameptr "{ff}{ jj}" format.name$ duplicate$ get.str.lang duplicate$ lang.zh = swap$ lang.ja = or { * } @@ -1682,7 +1683,7 @@ FUNCTION {format.name} } { lang.ru = { s nameptr "{vv~}{ll}" format.name$ - s nameptr "{ff}{, jj}" format.name$ + s nameptr "{ff}{ jj}" format.name$ "." "" find.replace duplicate$ empty$ 'pop$ @@ -1970,46 +1971,61 @@ FUNCTION {add.link} if$ } -FUNCTION {format.tr.number} -{ "" - number empty$ - 'skip$ - { type$ "patent" = control.patent.country and - { country empty$ not - { country * } - { nationality empty$ not - { nationality * } - { address empty$ not - { address * } - { location empty$ not - { location * } +FUNCTION {format.patent.country} +{ control.patent.country + { country empty$ + { nationality empty$ + { address empty$ + { location empty$ + { entry.lang lang.zh = + { "中国" } { "" } - { entry.lang lang.zh = - { "中国" * } - 'skip$ - if$ - } if$ } + { location } if$ } + { address } if$ } + { nationality } if$ } - 'skip$ + { country } if$ + } + { "" } + if$ +} + +FUNCTION {either.or} +{ swap$ + duplicate$ empty$ + { pop$ duplicate$ empty$ + { pop$ "" } 'skip$ - 'add.comma if$ - number - duplicate$ get.str.lang lang.zh = - 'format.punctuations - 'skip$ + } + { swap$ pop$ } + if$ +} + +FUNCTION {format.tr.number} +{ type$ "patent" = + { format.patent.country + applicationnumber number either.or + duplicate$ empty$ + 'pop$ + { swap$ + duplicate$ empty$ + 'pop$ + { add.comma swap$ * } + if$ + } if$ - * } + { number field.or.null } if$ } @@ -2058,18 +2074,44 @@ FUNCTION {format.title} { title empty$ { "" } { format.title.subtitle.titleaddon - control.sentence.case.title - 'change.sentence.case - 'skip$ + type$ "periodical" = + { duplicate$ "." contains not + control.sentence.case.journal and + 'change.sentence.case + 'skip$ + if$ + } + { control.sentence.case.title + 'change.sentence.case + 'skip$ + if$ + } if$ format.punctuations control.link.title 'add.link 'skip$ if$ - entry.numbered number empty$ not and - { add.colon - format.tr.number * + entry.numbered + { format.tr.number + duplicate$ empty$ + 'pop$ + { + type$ "standard" = + { + is.lang.cjk + { "\quad " } + { " " } + if$ + * swap$ * + } + { + swap$ add.colon + swap$ * + } + if$ + } + if$ } 'skip$ if$ @@ -2249,8 +2291,27 @@ FUNCTION {format.btitle} 'add.link 'skip$ if$ - entry.numbered number empty$ not and - { add.colon format.tr.number * } + entry.numbered + { format.tr.number + duplicate$ empty$ + 'pop$ + { + type$ "standard" = + { + is.lang.cjk + { "\quad " } + { " " } + if$ + * swap$ * + } + { + swap$ add.colon + swap$ * + } + if$ + } + if$ + } 'skip$ if$ type$ "map" = @@ -2364,14 +2425,7 @@ FUNCTION {remove.dots} } FUNCTION {format.journal.title} -{ journal empty$ - { journaltitle empty$ - { "" } - { journaltitle } - if$ - } - { journal } - if$ +{ journal journaltitle either.or journalsubtitle empty$ 'skip$ { duplicate$ empty$ @@ -2390,7 +2444,8 @@ FUNCTION {format.journal.title} journaltitleaddon * } if$ - control.sentence.case.journal + duplicate$ "." contains not + control.sentence.case.journal and 'change.sentence.case 'skip$ if$ @@ -2405,12 +2460,7 @@ FUNCTION {format.short.journal} 'skip$ if$ } - { shortjournal - control.journal.dots - 'skip$ - 'remove.dots - if$ - } + { shortjournal } if$ } @@ -2424,18 +2474,14 @@ FUNCTION {get.journal.title} { pop$ format.short.journal } if$ } - { shortjournal empty$ control.journal.dots not and - 'remove.dots - { duplicate$ shortjournal field.or.null = control.journal.dots not and - 'remove.dots - 'skip$ - if$ - } - if$ - } + 'skip$ if$ } if$ + control.journal.dots + 'skip$ + 'remove.dots + if$ } FUNCTION {check.arxiv.preprint} @@ -2500,31 +2546,11 @@ FUNCTION {set.entry.type.id} } if$ } - { entrysubtype "newspaper" = - { pop$ "N" 'entry.type.id := } - { entrysubtype "inproceedings" = - { pop$ "C" 'entry.type.id := } - { entrysubtype "report" = - { pop$ "R" 'entry.type.id := } - { entrysubtype "techreport" = - { pop$ "R" 'entry.type.id := } - { entrysubtype "standard" = - { pop$ "S" 'entry.type.id := } - { entrysubtype "patent" = - { pop$ "P" 'entry.type.id := } - { entrysubtype "dataset" = - { pop$ "DS" 'entry.type.id := } - { 'entry.type.id := } - if$ - } - if$ - } - if$ - } - if$ - } - if$ - } + { entrysubtype "archive" = + { pop$ "A" 'entry.type.id := } + { entrysubtype "newspaper" = + { pop$ "N" 'entry.type.id := } + { 'entry.type.id := } if$ } if$ @@ -2672,12 +2698,15 @@ FUNCTION {format.edition} FUNCTION {format.version} { version empty$ { "" } - { version #1 #1 substring$ - duplicate$ "V" = - { pop$ version } + { version #1 #1 substring$ "l" change.case$ + duplicate$ is.digit + { pop$ + "V" version * + } { "v" = + version #2 #1 substring$ is.digit and { "V" version #2 global.max$ substring$ * } - { "V" version * } + { version } if$ } if$ @@ -2779,7 +2808,11 @@ FUNCTION {format.date} { date "/" extract.before "-" extract.before date "/" contains { "-" normalize.year.dash * - date "/" extract.after "-" extract.before * + date "/" extract.after "-" extract.before + duplicate$ #1 #1 substring$ is.digit % EDTF: 1984/.. + { * } + 'pop$ + if$ } 'skip$ if$ @@ -2827,7 +2860,11 @@ FUNCTION {format.lab.date} { date "/" extract.before "-" extract.before date "/" contains { "-" normalize.year.dash * - date "/" extract.after "-" extract.before * + date "/" extract.after "-" extract.before + duplicate$ #1 #1 substring$ is.digit + { * } + 'pop$ + if$ } 'skip$ if$ @@ -2999,19 +3036,6 @@ FUNCTION {format.url} if$ } -FUNCTION {either.or} -{ swap$ - duplicate$ empty$ - { pop$ - duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ - } - { swap$ pop$ } - if$ -} - FUNCTION {format.doi} { control.doi { control.cstr not cstr empty$ or @@ -3649,11 +3673,6 @@ FUNCTION {standard} format.authors.editors output format.date.before.title output new.block - number field.or.null output - is.lang.cjk - { "\quad " set.punct } - { " " set.punct } - if$ format.btitle "title" output.check new.block format.url output @@ -3945,10 +3964,6 @@ FUNCTION {control.pass} if$ } -FUNCTION {control.check} -{ % TODO -} - MACRO {jan} {"January"} MACRO {feb} {"February"} @@ -4507,8 +4522,6 @@ EXECUTE {load.config} ITERATE {control.pass} -EXECUTE {control.check} - ITERATE {presort} SORT diff --git a/sysuthesis-numeric.bbx b/sysuthesis-numeric.bbx index 5d42375..26624dd 100644 --- a/sysuthesis-numeric.bbx +++ b/sysuthesis-numeric.bbx @@ -597,7 +597,7 @@ % % 原理方法:在顺序编码制中不需要使用,为与作者年制的兼容性考虑,这里也增加避免报错 \DeclareBibliographyOption{gbnoauthor}[true]{% - \ifstrequal{#1}{false}{}{\dealnoathor}} + \ifstrequal{#1}{false}{}{\dealnoauthor}} % @@ -627,7 +627,7 @@ % 增加控制析出文献来源前的标点符号//输出的选项 % v1.0k, 2018.04.20,added in by hzz \newtoggle{bbx:gbpunctin} - \DeclareBibliographyOption{gbpunctin}[false]{% + \DeclareBibliographyOption{gbpunctin}[true]{% \settoggle{bbx:gbpunctin}{#1}} \ExecuteBibliographyOptions{gbpunctin} @@ -1099,6 +1099,7 @@ \step[fieldset=usera, fieldvalue={DS}]% \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution \step[fieldset=institution, origfieldval] + \step[fieldset=entrysubtype,fieldvalue={dataset}] } \map{%对应增加的一个软件类型software确定文献类型标识符 \pertype{software} @@ -1111,12 +1112,18 @@ \step[fieldset=usera, fieldvalue={CM}]% \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution \step[fieldset=institution, origfieldval] + \step[fieldset=entrysubtype, fieldvalue=map] } \map{%舆图类型map的dimensions表示尺寸 \pertype{map} - \step[fieldsource=dimensions,final] %有时会把publisher和institution混淆,处理后使用institution + \step[fieldsource=dimensions,final] % \step[fieldset=addendum, origfieldval] } + \map{% + \pertype{map} + \step[fieldsource=edition,final] % + \step[fieldset=version, origfieldval] + } \map{%对应增加的一个预印本类型preprint确定文献类型标识符 \pertype{preprint} \step[fieldset=usera, fieldvalue={PP}]% @@ -1194,6 +1201,12 @@ \pertype{patent} \step[fieldset=usera, fieldvalue={P}] } + \map[overwrite]{ + \pertype{patent} + \step[fieldsource=holder, final] + \step[fieldset=author, origfieldval] + \step[fieldset=holder, null] + } \map{ \pertype{inproceedings} \pertype{conference}%兼容老的conference类型 @@ -1209,7 +1222,7 @@ } \map{ \pertype{incollection} - \step[fieldset=usera, fieldvalue={G}] + \step[fieldset=usera, fieldvalue={M}]%20260706从标识符G转为M \step[fieldsource=institution]%有时会把publisher和institution混淆,处理后使用publisher \step[fieldset=publisher, origfieldval] } @@ -1558,7 +1571,6 @@ \pertype{dataset} \step[fieldsource=journal,final] \step[typesource=dataset,typetarget=article] - \step[fieldset=entrysubtype,fieldvalue={dataset}] } \map{%再转online \pertype{dataset} @@ -1569,7 +1581,6 @@ %\step[notfield=address,final]%当address不存在则继续 \step[fieldsource=url,final]%地址不存在且存在url那么转变为online \step[typesource=dataset,typetarget=online] - \step[fieldset=entrysubtype,fieldvalue={dataset}] } \map{% \pertype{software} @@ -1703,7 +1714,7 @@ % 佚名/noauthor的处理 % % 原理方法:利用样式层的动态数据修改实现 -\def\dealnoathor{ +\def\dealnoauthor{ \DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map{%默认情况下将空缺作者的中文文献设置为佚名 @@ -1714,6 +1725,10 @@ \step[fieldsource=language,match={english},final] \step[fieldset=author, fieldvalue={A{non}}]%noauthor换成Anon,同时为避免大写还加了{} } + \map{%如果author或者editor或者translator存在,那么设置namea便于后面判断。 + \step[fieldsource=author,final] + \step[fieldset=namea,origfieldval] + } } } } @@ -2441,7 +2456,7 @@ {\printtext[title]{\bibtitlefont%增加字体控制命令 %标准的号放前面 \ifentrytype{standard}{\ifboolexpr{(not test{\iffieldundef{number}})}% - {\printfield[titlecase]{number}\quad\printfield[titlecase]{title}}% + {\printfield{number}\quad\printfield[titlecase]{title}}% {\printfield[titlecase]{title}}}% {\printfield[titlecase]{title}}% \ifboolexpr{test {\iffieldundef{subtitle}}}%增加了对子标题的判断 @@ -3604,14 +3619,14 @@ incollection,proceedings,inproceedings]{number}{% \newunit\newblock \usebibmacro{byauthor}}% \newunit\newblock - \printfield{type}% - \setunit*{\innerspacedelim}% - %\printfield{number}%已放到patenttitle中处理 - \iflistundef{location} - {} - {\setunit*{\innerspacedelim}% - \printtext{%[parens] - \printlist[][-\value{listtotal}]{location}}}% +% \printfield{type}% +% \setunit*{\innerspacedelim}% +% %\printfield{number}%已放到patenttitle中处理 +% \iflistundef{location} +% {} +% {\setunit*{\innerspacedelim}% +% \printtext{%[parens] +% \printlist[][-\value{listtotal}]{location}}}% \ifboolexpr{not test {\iflistundef{publisher}} and test {\iffieldundef{url}}}% {\setunit*{\subtitlepunct}% \printtext{%[parens] @@ -3669,7 +3684,7 @@ incollection,proceedings,inproceedings]{number}{% {\usebibmacro{modifydate}}{\newunit\usebibmacro{modifydate}}}}% \iffieldundef{entrysubtype}{\usebibmacro{online:url+urldate}} {\iffieldequalstr{entrysubtype}{report}{\usebibmacro{chapter+pages}\newunit\usebibmacro{url}} - {\usebibmacro{online:url+urldate}}}% + {\iffieldequalstr{entrysubtype}{map}{\newunit\usebibmacro{url}}{\usebibmacro{online:url+urldate}}}}% \newunit\newblock \usebibmacro{doi+cstr}% \newunit\newblock diff --git a/sysuthesis-numerical.bst b/sysuthesis-numerical.bst index 71e447e..32a34c8 100644 --- a/sysuthesis-numerical.bst +++ b/sysuthesis-numerical.bst @@ -1,5 +1,5 @@ %% -%% This is file `gbt7714-2025-numeric.bst', +%% This is file `variants/gbt7714-2025-numeric.bst', %% generated with the docstrip utility. %% %% The original source files were: @@ -8,7 +8,7 @@ %% ------------------------------------------------------------------- %% GB/T 7714 BibTeX Style %% https://github.com/zepinglee/gbt7714-bibtex-style -%% Version: 2026-06-14 v2.3.1 +%% Version: 2026-07-20 v3.0.1 %% ------------------------------------------------------------------- %% Copyright (C) 2016-2026 by Zeping Lee %% ------------------------------------------------------------------- @@ -124,6 +124,7 @@ FUNCTION {load.config} ENTRY { address + applicationnumber archiveprefix author bookauthor @@ -416,7 +417,7 @@ FUNCTION {bbl.sine.loco.sine.nomine} if$ } -FUNCTION {default.self.tokens} { ":,-'–—?.!" } +FUNCTION {default.self.tokens} { ":,-'’–—?.!()[]" } FUNCTION {latin.upper} { "ÀÁÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞŸĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ" } @@ -973,21 +974,18 @@ FUNCTION {is.tex.str.in.title.case} duplicate$ "" = { pop$ pop$ #0 } { split.first.char.from.str is.upper - { duplicate$ "" = % single-letter word - { pop$ pop$ #1 } - { duplicate$ is.all.lower - { empty$ - { duplicate$ "" = - { pop$ #0 } - 'is.all.lower - if$ - } + { duplicate$ + is.all.lower + { empty$ + { duplicate$ "" = + { pop$ #1 } 'is.all.lower if$ } - { pop$ pop$ #0 } + 'is.all.lower if$ } + { pop$ pop$ #0 } if$ } { pop$ pop$ #0} @@ -1200,7 +1198,6 @@ FUNCTION {self.tokens} FUNCTION {tokenize.by} { 'b := 's := - s "" = { "" "" } { s split.first.char.from.str @@ -1236,8 +1233,7 @@ FUNCTION {tokenize} FUNCTION {smart.sentence.case} { tokenize 's := - - { s "" = not } + { s "" = not } { s skip.inter.token.chars 's := * s tokenize swap$ duplicate$ ":" = @@ -1246,7 +1242,11 @@ FUNCTION {smart.sentence.case} tokenize swap$ control.capitalize.subtitle 'skip$ - { lower.token.if.in.title.case } + { duplicate$ "A" = + { pop$ "a" } + 'lower.token.if.in.title.case + if$ + } if$ } 'lower.token.if.in.title.case @@ -1443,6 +1443,7 @@ FUNCTION {set.entry.numbered} type$ "patent" = or type$ "regulation" = or type$ "report" = or + type$ "standard" = or type$ "techreport" = or { #1 'entry.numbered := } { #0 'entry.numbered := } @@ -1577,7 +1578,7 @@ FUNCTION {format.western.given.name} if$ } if$ - s nameptr "{, jj}" format.name$ * + s nameptr "{ jj}" format.name$ * "." "" find.replace } @@ -1663,7 +1664,7 @@ FUNCTION {format.name} duplicate$ lang.zh = swap$ lang.ja = or { pop$ s nameptr "{vv~}{ll}" format.name$ - s nameptr "{ff}{, jj}" format.name$ + s nameptr "{ff}{ jj}" format.name$ duplicate$ get.str.lang duplicate$ lang.zh = swap$ lang.ja = or { * } @@ -1672,7 +1673,7 @@ FUNCTION {format.name} } { lang.ru = { s nameptr "{vv~}{ll}" format.name$ - s nameptr "{ff}{, jj}" format.name$ + s nameptr "{ff}{ jj}" format.name$ "." "" find.replace duplicate$ empty$ 'pop$ @@ -1960,46 +1961,61 @@ FUNCTION {add.link} if$ } -FUNCTION {format.tr.number} -{ "" - number empty$ - 'skip$ - { type$ "patent" = control.patent.country and - { country empty$ not - { country * } - { nationality empty$ not - { nationality * } - { address empty$ not - { address * } - { location empty$ not - { location * } +FUNCTION {format.patent.country} +{ control.patent.country + { country empty$ + { nationality empty$ + { address empty$ + { location empty$ + { entry.lang lang.zh = + { "中国" } { "" } - { entry.lang lang.zh = - { "中国" * } - 'skip$ - if$ - } if$ } + { location } if$ } + { address } if$ } + { nationality } if$ } - 'skip$ + { country } if$ + } + { "" } + if$ +} + +FUNCTION {either.or} +{ swap$ + duplicate$ empty$ + { pop$ duplicate$ empty$ + { pop$ "" } 'skip$ - 'add.comma if$ - number - duplicate$ get.str.lang lang.zh = - 'format.punctuations - 'skip$ + } + { swap$ pop$ } + if$ +} + +FUNCTION {format.tr.number} +{ type$ "patent" = + { format.patent.country + applicationnumber number either.or + duplicate$ empty$ + 'pop$ + { swap$ + duplicate$ empty$ + 'pop$ + { add.comma swap$ * } + if$ + } if$ - * } + { number field.or.null } if$ } @@ -2048,18 +2064,44 @@ FUNCTION {format.title} { title empty$ { "" } { format.title.subtitle.titleaddon - control.sentence.case.title - 'change.sentence.case - 'skip$ + type$ "periodical" = + { duplicate$ "." contains not + control.sentence.case.journal and + 'change.sentence.case + 'skip$ + if$ + } + { control.sentence.case.title + 'change.sentence.case + 'skip$ + if$ + } if$ format.punctuations control.link.title 'add.link 'skip$ if$ - entry.numbered number empty$ not and - { add.colon - format.tr.number * + entry.numbered + { format.tr.number + duplicate$ empty$ + 'pop$ + { + type$ "standard" = + { + is.lang.cjk + { "\quad " } + { " " } + if$ + * swap$ * + } + { + swap$ add.colon + swap$ * + } + if$ + } + if$ } 'skip$ if$ @@ -2239,8 +2281,27 @@ FUNCTION {format.btitle} 'add.link 'skip$ if$ - entry.numbered number empty$ not and - { add.colon format.tr.number * } + entry.numbered + { format.tr.number + duplicate$ empty$ + 'pop$ + { + type$ "standard" = + { + is.lang.cjk + { "\quad " } + { " " } + if$ + * swap$ * + } + { + swap$ add.colon + swap$ * + } + if$ + } + if$ + } 'skip$ if$ type$ "map" = @@ -2354,14 +2415,7 @@ FUNCTION {remove.dots} } FUNCTION {format.journal.title} -{ journal empty$ - { journaltitle empty$ - { "" } - { journaltitle } - if$ - } - { journal } - if$ +{ journal journaltitle either.or journalsubtitle empty$ 'skip$ { duplicate$ empty$ @@ -2380,7 +2434,8 @@ FUNCTION {format.journal.title} journaltitleaddon * } if$ - control.sentence.case.journal + duplicate$ "." contains not + control.sentence.case.journal and 'change.sentence.case 'skip$ if$ @@ -2395,12 +2450,7 @@ FUNCTION {format.short.journal} 'skip$ if$ } - { shortjournal - control.journal.dots - 'skip$ - 'remove.dots - if$ - } + { shortjournal } if$ } @@ -2414,18 +2464,14 @@ FUNCTION {get.journal.title} { pop$ format.short.journal } if$ } - { shortjournal empty$ control.journal.dots not and - 'remove.dots - { duplicate$ shortjournal field.or.null = control.journal.dots not and - 'remove.dots - 'skip$ - if$ - } - if$ - } + 'skip$ if$ } if$ + control.journal.dots + 'skip$ + 'remove.dots + if$ } FUNCTION {check.arxiv.preprint} @@ -2490,31 +2536,11 @@ FUNCTION {set.entry.type.id} } if$ } - { entrysubtype "newspaper" = - { pop$ "N" 'entry.type.id := } - { entrysubtype "inproceedings" = - { pop$ "C" 'entry.type.id := } - { entrysubtype "report" = - { pop$ "R" 'entry.type.id := } - { entrysubtype "techreport" = - { pop$ "R" 'entry.type.id := } - { entrysubtype "standard" = - { pop$ "S" 'entry.type.id := } - { entrysubtype "patent" = - { pop$ "P" 'entry.type.id := } - { entrysubtype "dataset" = - { pop$ "DS" 'entry.type.id := } - { 'entry.type.id := } - if$ - } - if$ - } - if$ - } - if$ - } - if$ - } + { entrysubtype "archive" = + { pop$ "A" 'entry.type.id := } + { entrysubtype "newspaper" = + { pop$ "N" 'entry.type.id := } + { 'entry.type.id := } if$ } if$ @@ -2662,12 +2688,15 @@ FUNCTION {format.edition} FUNCTION {format.version} { version empty$ { "" } - { version #1 #1 substring$ - duplicate$ "V" = - { pop$ version } + { version #1 #1 substring$ "l" change.case$ + duplicate$ is.digit + { pop$ + "V" version * + } { "v" = + version #2 #1 substring$ is.digit and { "V" version #2 global.max$ substring$ * } - { "V" version * } + { version } if$ } if$ @@ -2769,7 +2798,11 @@ FUNCTION {format.date} { date "/" extract.before "-" extract.before date "/" contains { "-" normalize.year.dash * - date "/" extract.after "-" extract.before * + date "/" extract.after "-" extract.before + duplicate$ #1 #1 substring$ is.digit % EDTF: 1984/.. + { * } + 'pop$ + if$ } 'skip$ if$ @@ -2813,7 +2846,11 @@ FUNCTION {format.lab.date} { date "/" extract.before "-" extract.before date "/" contains { "-" normalize.year.dash * - date "/" extract.after "-" extract.before * + date "/" extract.after "-" extract.before + duplicate$ #1 #1 substring$ is.digit + { * } + 'pop$ + if$ } 'skip$ if$ @@ -2973,19 +3010,6 @@ FUNCTION {format.url} if$ } -FUNCTION {either.or} -{ swap$ - duplicate$ empty$ - { pop$ - duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ - } - { swap$ pop$ } - if$ -} - FUNCTION {format.doi} { control.doi { control.cstr not cstr empty$ or @@ -3605,11 +3629,6 @@ FUNCTION {software} FUNCTION {standard} { "S" set.entry.type.id output.bibitem - number field.or.null output - is.lang.cjk - { "\quad " set.punct } - { " " set.punct } - if$ format.btitle "title" output.check new.block format.url output @@ -3901,10 +3920,6 @@ FUNCTION {control.pass} if$ } -FUNCTION {control.check} -{ % TODO -} - MACRO {jan} {"January"} MACRO {feb} {"February"} @@ -4280,8 +4295,6 @@ EXECUTE {load.config} ITERATE {control.pass} -EXECUTE {control.check} - EXECUTE {init.seq} ITERATE {presort} From 512527a3a7aa2bf717c66b5226138aa275573b16 Mon Sep 17 00:00:00 2001 From: 1FCENdoge <86185801+1FCENdoge@users.noreply.github.com> Date: Wed, 2 Sep 2026 21:34:43 +0800 Subject: [PATCH 2/2] minor changes --- sysuthesis-authoryear.bst | 2 +- sysuthesis-numerical.bst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysuthesis-authoryear.bst b/sysuthesis-authoryear.bst index 59391e7..96297cc 100644 --- a/sysuthesis-authoryear.bst +++ b/sysuthesis-authoryear.bst @@ -1,5 +1,5 @@ %% -%% This is file `variants/gbt7714-2025-authoryear.bst', +%% This is file `gbt7714-2025-authoryear.bst', %% generated with the docstrip utility. %% %% The original source files were: diff --git a/sysuthesis-numerical.bst b/sysuthesis-numerical.bst index 32a34c8..09a1a26 100644 --- a/sysuthesis-numerical.bst +++ b/sysuthesis-numerical.bst @@ -1,5 +1,5 @@ %% -%% This is file `variants/gbt7714-2025-numeric.bst', +%% This is file `gbt7714-2025-numeric.bst', %% generated with the docstrip utility. %% %% The original source files were: