此插件添加支持 引用文件格式( CFF) 文档,既作为YAML,又作为非标准的JSON格式.
安装
无
npm install @citation-js/plugin-cff
浏览器
盖起一个 @citation-js/plugin-cff 编辑 构建工具来啊!
使用
注册插件 require- 说:
require('@citation-js/plugin-cff')
格式
投入
# Example from https://github.com/citation-file-format/citation-file-format#example
cff-version: 1.2.0
message: If you use this software, please cite it as below.
type: software
authors:
- family-names: Druskat
given-names: Stephan
orcid: https://orcid.org/0000-0003-4925-7248
title: My Research Tool
version: 1.0.4
doi: 10.5281/zenodo.1234
date-released: 2017-12-18
变成
{
author: [ { family: 'Druskat', given: 'Stephan' } ],
issued: { 'date-parts': [ [2017, 12, 18] ] },
DOI: '10.5281/zenodo.1234',
title: 'My Research Tool',
version: '1.0.4',
type: 'book',
_cff_mainReference: true
}
产出
如果通过多次引用,则将第一个数作为主要参考,而
剩余部分在 references 列表中选择一个选项。 指定不同的条目为主
引用,通过 main 选项 :
Cite(/* ... */).format('cff', {
main: '...'
})
或者,该条目可以 _cff_mainReference 设置为 true不过
主要用于圆通取水.
要指定首选引用,请在 preferred 选项.
生成 CFF 1.1.0 输出, 通过 '1.1.0' 页:1 cffVersion 选项.
您也可以指定信件,每个 CFF 文件的强制部分. 默认, 消息为:
请在使用此软件时引用以下作品.
要改变它, 传递一个字符串到 message 选项在格式化时:
Cite(/* ... */).format('cff', {
message: 'If you use this software, please cite it as below.'
})