hushidong / biblatex-gb7714-2015

A biblatex implementation of the GB/T7714-2015 bibliography style || GB/T 7714-2015 参考文献著录和标注的biblatex样式包
763 stars 84 forks source link

著者-出版制的日期格式 #182

Closed zepinglee closed 9 months ago

zepinglee commented 9 months ago

刚刚注意到标准作者对著者-出版年的格式补充说明:《怎样著录著者-出版年制联机网络文献的“出版年”》,发现目前的 biblatex 实现有些差异。

\documentclass{ctexart}

\begin{filecontents}[force,noheader]{\jobname.bib}
@legislation{gbt7714.04.6.2:02,
  title = {关于转发北京市企业投资项目核准暂行实施办法的通知},
  author = {北京市人民政府办公厅},
  date = {2005-07-12},
  number = {京政办发[2005]37号},
  url = {http://china.findlaw.cn/fagui/p_1/39934.html},
  urldate = {2011-07-12},
  langid = {chinese},
}

@online{gbt7714.04.6.2:04,
  title = {About {OCLC}: History of Cooperation},
  shorttitle = {About {OCLC}},
  author = {{Online Computer Library Center, Inc.}},
  url = {http://www.oclc.org/about/cooperation.en.html},
  urldate = {2012-03-27},
  langid = {american},
}

@article{gbt7714.A.09:04,
  entrysubtype = {newspaper},
  title = {雾霾来袭, 如何突围?},
  author = {刘, 裕国 and 杨, 柳 and 张, 洋 and 王, 汉超 and 靳, 博 and 田, 豆豆 and 付, 文},
  date = {2013-01-12},
  journaltitle = {人民日报},
  url = {http://paper.people.com.cn/rmrb/html/2013-01/12/nw.D110000renmrb_20130112_2-04.htm},
  urldate = {2013-11-06},
  langid = {chinese},
}
\end{filecontents}

\usepackage[backend=biber,style=gb7714-2015ay]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}
Screenshot 2023-12-31 at 12 28 57

差异包括:

  1. @legislation 缺少文献类型标识和更新或修改日期。
  2. 报纸类型缺少更新或修改日期。
  3. @online 使用 urldate 作为估计的出版年缺少方括号。(不过这一条在实践中几乎没有出现过,所以不是很重要。)
hushidong commented 9 months ago

好的,最近比较忙,等会一阵我再完善一下。

hushidong commented 9 months ago

我完善了一下,上面的(1)(2)都处理了,第(3)我觉得没有必要,形式上就不统一,不好。

\documentclass{article}
\usepackage{ctex}
\usepackage[backend=biber,style=gb7714-2015ay,sorting=none]{biblatex}

\begin{filecontents}[force,noheader]{\jobname.bib}
@legislation{gbt7714.04.6.2:02,
  title = {关于转发北京市企业投资项目核准暂行实施办法的通知},
  author = {北京市人民政府办公厅},
  date = {2005-07-12},
  number = {京政办发[2005]37号},
  url = {http://china.findlaw.cn/fagui/p_1/39934.html},
  urldate = {2011-07-12},
}

@online{gbt7714.04.6.2:04,
  title = {About {OCLC}: History of Cooperation},
  shorttitle = {About {OCLC}},
  author = {{Online Computer Library Center, Inc.}},
  url = {http://www.oclc.org/about/cooperation.en.html},
  urldate = {2012-03-27},
}

@article{gbt7714.A.09:04,
  entrysubtype = {newspaper},
  title = {雾霾来袭, 如何突围?},
  author = {刘, 裕国 and 杨, 柳 and 张, 洋 and 王, 汉超 and 靳, 博 and 田, 豆豆 and 付, 文},
  date = {2013-01-12},
  journaltitle = {人民日报},
  url = {http://paper.people.com.cn/rmrb/html/2013-01/12/nw.D110000renmrb_20130112_2-04.htm},
  urldate = {2013-11-06},
}

@Newspaper{张田勤2000--,
  Title                    = {犯罪DNA库与生命伦理学计划},
  Author                   = {张田勤},
  Date                     = {2000-11-12},
  Journaltitle             = {大众科技报},
  Number                   = {7}
}

@Article{丁文祥2000--,
  Title                    = {数字革命与竞争国际化},
  Author                   = {丁文祥},
  Date                     = {2000-11-20},
  Journaltitle             = {中国青年报},
  Number                   = {15},
  entrysubtype = {newspaper},
}

@Article{陈建军2010-93-93,
  Title                    = {从数字地球到智慧地球},
  Author                   = {陈建军},
  Journal                  = {国图资源导刊},
  Number                   = {10},
  Pages                    = {93},
  Volume                   = {7},
  Doi                      = {10.3969/j.issn.1672-5603.2010.10.038},
  Url                      = {http://d.g.wanfangdata.com.cn},
  Urldate                  = {2013-03-20},
  Year                     = {2010}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography[heading=bibliography]
\end{document} 

结果为:

图片

图中标黄位置是正确的吧?

zepinglee commented 9 months ago

图中标黄位置是正确的吧?

输出的格式没错。

不过这里的报纸版次“15”其实相当于页码,应该填在 pages 字段。比如 Zotero 中:

Screenshot 2023-12-31 at 20 59 26

按照 BBT 插件的 Biblatex 格式导出后:

@article{gbt7714.A.09:01,
  entrysubtype = {newspaper},
  title = {数字革命与竞争国际化},
  author = {{丁文详}},
  date = {2000-11-20},
  journaltitle = {中国青年报},
  pages = {15},
  langid = {chinese}
}
hushidong commented 9 months ago

可以,兼容它就行。索性把urldate的labelyear标签的[]也加上了。

\documentclass{article}
\usepackage{ctex}
\usepackage[backend=biber,style=gb7714-2015ay,sorting=none]{biblatex}%,mergedate=false

%\DeclareFieldFormat{labelurlyear}{#1}
%\DeclareFieldFormat{labelyear}{【#1】}

\begin{filecontents}[force,noheader]{\jobname.bib}
@legislation{gbt7714.04.6.2:02,
  title = {关于转发北京市企业投资项目核准暂行实施办法的通知},
  author = {北京市人民政府办公厅},
  date = {2005-07-12},
  number = {京政办发[2005]37号},
  url = {http://china.findlaw.cn/fagui/p_1/39934.html},
  urldate = {2011-07-12},
}

@online{gbt7714.04.6.2:04,
  title = {About {OCLC}: History of Cooperation},
  shorttitle = {About {OCLC}},
  author = {{Online Computer Library Center, Inc.}},
  url = {http://www.oclc.org/about/cooperation.en.html},
  urldate = {2012-03-27},
}

@article{gbt7714.A.09:04,
  entrysubtype = {newspaper},
  title = {雾霾来袭, 如何突围?},
  author = {刘, 裕国 and 杨, 柳 and 张, 洋 and 王, 汉超 and 靳, 博 and 田, 豆豆 and 付, 文},
  date = {2013-01-12},
  journaltitle = {人民日报},
  url = {http://paper.people.com.cn/rmrb/html/2013-01/12/nw.D110000renmrb_20130112_2-04.htm},
  urldate = {2013-11-06},
}

@Newspaper{张田勤2000--,
  Title                    = {犯罪DNA库与生命伦理学计划},
  Author                   = {张田勤},
  Date                     = {2000-11-12},
  Journaltitle             = {大众科技报},
  pages                   = {7}
}

@Article{丁文祥2000--,
  Title                    = {数字革命与竞争国际化},
  Author                   = {丁文祥},
  Date                     = {2000-11-20},
  Journaltitle             = {中国青年报},
  Number                   = {15},
  entrysubtype = {newspaper},
}

@Article{陈建军2010-93-93,
  Title                    = {从数字地球到智慧地球},
  Author                   = {陈建军},
  Journal                  = {国图资源导刊},
  Number                   = {10},
  Pages                    = {93},
  Volume                   = {7},
  Doi                      = {10.3969/j.issn.1672-5603.2010.10.038},
  Url                      = {http://d.g.wanfangdata.com.cn},
  Urldate                  = {2013-03-20},
  Year                     = {2010}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography[heading=bibliography]
\end{document} 

结果为: 图片

zepinglee commented 9 months ago

完美!