Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重构 china-national-standard-gb-t-7714-2015-numeric.csl #15

Merged
merged 1 commit into from
Nov 16, 2021
Merged

重构 china-national-standard-gb-t-7714-2015-numeric.csl #15

merged 1 commit into from
Nov 16, 2021

Conversation

zepinglee
Copy link
Collaborator

@zepinglee zepinglee commented Nov 16, 2021

现版本的 china-national-standard-gb-t-7714-2015-*.csl 与国标的格式有许多差异。我在另一个仓库整理了国标的大部分示例 gbt7714-numeric.txt,以及结构化的 CSL-JSON 输入数据 gbt7714-numeric-data.json(可导入 Zotero,先前版本导入失败是因为用了 CSL v1.0.2 新增的文献类型)。 现版本 CSL 输出的参考文献与国标的格式对比:https://github.com/zepinglee/china-national-standard-gb-t-7714-2015/compare/standard...original,其中未使用 CSL-M 的多语言功能。

重构后的 CSL 生成的参考文献与国标的对比:zepinglee/china-national-standard-gb-t-7714-2015@standard...main,其中还有一些差异,但据我了解在目前 CSL v1.0.1 的版本下应该无法实现。

以下是主要修改的记录(用英文写的,应该不需要翻译)。

  1. Allow editor name to be the primary contributor of a book instead the anonymous term.
  2. The anonymous term is omitted in numeric and note styles as specified in the standard.
  3. Use sentence case (actually no case conversion) for titles and container titles instead of title case. This is not explicitly specified in the style but is used in the all the examples.
  4. The names of proceeding editor are moved after the "//" mark (which is similar to "In:").
  5. The edition number is now checked if it is numeric for output.
  6. Change page-range-delimiter to hyphen as specified in the standard, which is similar to Vancouver style.
  7. Correct the hyphens in ISO dates (yyyy-mm-dd) from en dashes.
  8. Fix missing issued date in report type.
  9. Split the bibliography layout into categories so that the code structure is more clear.
  10. Cite items are not sorted. It's not specified in the standard and a citation example with reverse-ordered citation-numbers appears.
  11. A space is inserted in the author-date citation ahead of et-al term in Chinese, which is required by the standard.

@redleafnew
Copy link
Collaborator

后面需要多语言我再添加其它的。

@redleafnew redleafnew merged commit 635e5f7 into zotero-chinese:main Nov 16, 2021
@zepinglee
Copy link
Collaborator Author

其实这个 PR 中的是支持多语言的:
https://github.com/redleafnew/Chinese-STD-GB-T-7714-related-csl/blob/635e5f70b21762a2597b340b2b75c656bb8975e0/china-national-standard-gb-t-7714-2015-numeric.csl#L385-L392

我打算先测试一段时间再推送到官方的 styles。

@redleafnew
Copy link
Collaborator

那正好。官方好像不接受多个layout的。

@zepinglee
Copy link
Collaborator Author

多语言版的输出跟国标的对比:zepinglee/china-national-standard-gb-t-7714-2015/compare/standard...multi-lang

@redleafnew
Copy link
Collaborator

@zepinglee zepinglee deleted the refactor branch November 22, 2021 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants