diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c4fc27..58367e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 新增选项 `link.journal` 允许在期刊题名添加超链接([#144](https://github.com/zepinglee/gbt7714-bibtex-style/issues/144))。 +### Changed + +`@inbook` 改为按照是否有 `booktitle` 选择“专著”或“专著的吸出文献”格式([tuna/thuthesis#930](https://github.com/tuna/thuthesis/issues/930))。 + ## Fixed 修复 `not brace-balanced` 的警告([#113](https://github.com/zepinglee/gbt7714-bibtex-style/issues/113))。 diff --git a/gbt7714-2005-author-year.bst b/gbt7714-2005-author-year.bst index b54917c..834cba3 100644 --- a/gbt7714-2005-author-year.bst +++ b/gbt7714-2005-author-year.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -747,7 +747,7 @@ FUNCTION {editor.full} FUNCTION {make.full.names} { type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.full { type$ "collection" = @@ -2050,7 +2050,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2291,7 +2296,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" = @@ -2493,7 +2498,7 @@ FUNCTION {presort} " " * type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.sort { type$ "collection" = diff --git a/gbt7714-2005-numerical.bst b/gbt7714-2005-numerical.bst index 00b0f49..67be21a 100644 --- a/gbt7714-2005-numerical.bst +++ b/gbt7714-2005-numerical.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -737,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" = @@ -2040,7 +2040,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2281,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" = diff --git a/gbt7714-author-year.bst b/gbt7714-author-year.bst index 931fcfe..093e21f 100644 --- a/gbt7714-author-year.bst +++ b/gbt7714-author-year.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -747,7 +747,7 @@ FUNCTION {editor.full} FUNCTION {make.full.names} { type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.full { type$ "collection" = @@ -2050,7 +2050,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2291,7 +2296,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" = @@ -2493,7 +2498,7 @@ FUNCTION {presort} " " * type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.sort { type$ "collection" = diff --git a/gbt7714-numerical.bst b/gbt7714-numerical.bst index 8f65546..30f9ed2 100644 --- a/gbt7714-numerical.bst +++ b/gbt7714-numerical.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -737,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" = @@ -2040,7 +2040,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2281,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" = diff --git a/gbt7714.dtx b/gbt7714.dtx index 79596e2..277a125 100644 --- a/gbt7714.dtx +++ b/gbt7714.dtx @@ -2232,7 +2232,7 @@ FUNCTION {editor.full} FUNCTION {make.full.names} { type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.full { type$ "collection" = @@ -3844,10 +3844,16 @@ FUNCTION {dataset} % % Optional: volume or number, series, type, address, edition, month, note % -% inbook 类是不含 booktitle 域的,所以不应该适用于“专著中的析出文献”,而应该是专 -% 著,即 book 类。 +% 原生 BibTeX 的数据模型中 \texttt{@inbook} 不含 \texttt{booktitle} , +% 按照“专著”处理。而 biblatex 的 \texttt{@inbook} 跟 \texttt{incollection} 一样。 +% 按照“专著的析出文献”处理。 % \begin{macrocode} -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} % \end{macrocode} % @@ -4297,7 +4303,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" = @@ -4571,7 +4577,7 @@ FUNCTION {presort} " " * type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.sort { type$ "collection" = diff --git a/gbt7714.sty b/gbt7714.sty index 1bab954..7076c6c 100644 --- a/gbt7714.sty +++ b/gbt7714.sty @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 diff --git a/variants/thu/thuthesis-author-year.bst b/variants/thu/thuthesis-author-year.bst index 9514668..84c338d 100644 --- a/variants/thu/thuthesis-author-year.bst +++ b/variants/thu/thuthesis-author-year.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -747,7 +747,7 @@ FUNCTION {editor.full} FUNCTION {make.full.names} { type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.full { type$ "collection" = @@ -2050,7 +2050,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2291,7 +2296,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" = @@ -2493,7 +2498,7 @@ FUNCTION {presort} " " * type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.sort { type$ "collection" = diff --git a/variants/thu/thuthesis-bachelor.bst b/variants/thu/thuthesis-bachelor.bst index fd22e2c..39c1d02 100644 --- a/variants/thu/thuthesis-bachelor.bst +++ b/variants/thu/thuthesis-bachelor.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -737,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" = @@ -2040,7 +2040,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2281,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" = diff --git a/variants/thu/thuthesis-numeric.bst b/variants/thu/thuthesis-numeric.bst index 2d3018e..7782f62 100644 --- a/variants/thu/thuthesis-numeric.bst +++ b/variants/thu/thuthesis-numeric.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -737,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" = @@ -2040,7 +2040,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2281,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" = diff --git a/variants/ucas/ucasthesis-author-year.bst b/variants/ucas/ucasthesis-author-year.bst index cdaaf83..1569cb9 100644 --- a/variants/ucas/ucasthesis-author-year.bst +++ b/variants/ucas/ucasthesis-author-year.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -747,7 +747,7 @@ FUNCTION {editor.full} FUNCTION {make.full.names} { type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.full { type$ "collection" = @@ -2050,7 +2050,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2291,7 +2296,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" = @@ -2493,7 +2498,7 @@ FUNCTION {presort} " " * type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.sort { type$ "collection" = diff --git a/variants/ucas/ucasthesis-numerical.bst b/variants/ucas/ucasthesis-numerical.bst index 918ef2d..dd5e91e 100644 --- a/variants/ucas/ucasthesis-numerical.bst +++ b/variants/ucas/ucasthesis-numerical.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -737,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" = @@ -2040,7 +2040,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2281,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" = diff --git a/variants/ustc/ustcthesis-authoryear.bst b/variants/ustc/ustcthesis-authoryear.bst index cd95621..e8bdfe1 100644 --- a/variants/ustc/ustcthesis-authoryear.bst +++ b/variants/ustc/ustcthesis-authoryear.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -747,7 +747,7 @@ FUNCTION {editor.full} FUNCTION {make.full.names} { type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.full { type$ "collection" = @@ -2050,7 +2050,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2291,7 +2296,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" = @@ -2493,7 +2498,7 @@ FUNCTION {presort} " " * type$ "book" = - type$ "inbook" = + type$ "inbook" = booktitle empty$ not and or 'author.editor.sort { type$ "collection" = diff --git a/variants/ustc/ustcthesis-numerical.bst b/variants/ustc/ustcthesis-numerical.bst index f09353a..eebcd30 100644 --- a/variants/ustc/ustcthesis-numerical.bst +++ b/variants/ustc/ustcthesis-numerical.bst @@ -10,7 +10,7 @@ %% https://github.com/zepinglee/gbt7714-bibtex-style %% Version: 2022/10/03 v2.1.5 %% ------------------------------------------------------------------- -%% Copyright (C) 2016--2023 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 @@ -737,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" = @@ -2040,7 +2040,12 @@ FUNCTION {dataset} electronic } -FUNCTION {inbook} { book } +FUNCTION {inbook} { + booktitle empty$ + 'book + 'incollection + if$ +} FUNCTION {inproceedings} { "C" set.entry.mark @@ -2281,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" =