Repository navigation
chore(better.bib): update Better BibTeX for Zotero - #8
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
retorquere/zotero-better-bibtex@v9.0.68...v9.0.70 时部分
number变成了eid:人工智能的分析
eid/number 的处理逻辑在
translators/bibtex/biblatex.ts(Better BibLaTeX 导出)中有实质性修改,对应 issue #3609("Journal article with volume, issue, and article number (eid)")。具体改动
1.
issue字段的写入条件改了:2. 新增辅助函数
looks_like_number_field(),用来判断 issue 值是否"看起来像数字"(纯数字、罗马数字、数字范围如1-2、Suppl. 2、3es这类短标识符):item.number→eid/number那行本身没变,但受上面 issue 逻辑影响。行为变化
按照 biblatex 手册的语义(注释里大段引用):
issue是给 "Spring"/"Summer" 这类非数字标识用的,纯数字/数字范围的 issue 应该进number字段。所以现在是:2、1-2、Suppl. 2)且当前还没写number→ 写进numberSummer)→ 仍写进issueitem.number(Zotero 的 article number)→ 优先eid(若 entrytype 允许 eid 或已有 number)同时 patch 里新增了对应测试 fixture:
Journal article with volume, issue, and article number (eid) #3609Article numbers without numeric issues #3609(非数字 issue 的场景)Duplicate number field causes export error #1448fixture如果你是从 ≤9.0.64 升级,且文献的 issue 是纯数字,导出 BibLaTeX 时该值会从
issue = {...}变成number = {...},这是预期行为而非 bug。