Comments (3)
改的要稍多一些,卷通常是跟标题放一起的。
% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015样式,对于作者姓名格式的控制和选项
% 测试gbnamefmt选项
% 测试bib文件中的nameformat域
\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage[backend=biber,style=gb7714-2015ay,gbstrict=false]{biblatex}
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map{\pertype{mvbook}
\step[typesource=mvbook,typetarget=book]
\step[fieldset=usera, fieldvalue={M}]%
}
}
}
\renewbibmacro*{title}{%
\ifboolexpr{%
test{\iffieldundef{title}}%
and
test{\iffieldundef{subtitle}}}%
{}%
{\printtext[title]{\bibtitlefont%增加字体控制命令
\printfield[titlecase]{title}%
\ifboolexpr{test {\iffieldundef{subtitle}}}%增加了对子标题的判断
{}{\setunit{\subtitlepunct}\printfield[titlecase]{subtitle}}%
\iffieldundef{titleaddon}{}{\setunit{\subtitlepunct}\printfield{titleaddon}}%判断一下titleaddon
\ifboolexpr{test{\ifentrytype{book}} and (not test{\iffieldundef{volume}}) and
test{\iffieldundef{volumes}}}%判断一下book类有没有volume
{\setunit{\subtitlepunct}\printfield{volume}}{}%
\iftoggle{bbx:gbtype}%
{\iffieldundef{entrysubtype}{\printfield[gbtypeflag]{usera}}%在标题后直接给出文献标识字母,判断一下,是否是报纸和标准
{\iffieldequalstr{entrysubtype}{standard}{\printfield[gbtypeflags]{usera}}%判断是否为标准
{\iffieldequalstr{entrysubtype}{news}{\printfield[gbtypeflagn]{usera}}% 判断是否为报纸
{\printfield[gbtypeflag]{usera}}}}}{}%%其它
}%
}%
}
\DeclareFieldFormat[book,inbook,incollection]{volumes}%
{\iffieldequalstr{userd}{chinese}{\iffieldint{volumes}%
{共 #1\bibstring{volumecn}%
}{#1}}%
{\bibstring{volumes}~#1}%
}
\renewbibmacro*{series+number}{%
\printfield{series}%
\setunit*{\addcolon\addspace}%
\printfield{number}%
\newunit%
}
\AtEveryBibitem{\clearlist{language}}
\DeclareBibliographyDriver{book}{%源来自standard.bbx文件
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{maintitle+title}%
\iftoggle{bbx:gbstrict}{}{%
\newunit
\printlist{language}%
\newunit\newblock%
\usebibmacro{byauthor}%
\newunit\newblock}%
\usebibmacro{byeditor+others}%
\newunit
\printfield{edition}%
\newunit\newblock%%
\iftoggle{bbx:gbstrict}{}{%
\iffieldundef{maintitle}%
{\iffieldundef{volumes}{}{\printfield{volume}}%
\printfield{part}}%
{}%
\newunit%
\printfield{volumes}%
\newunit\newblock%
\usebibmacro{series+number}}%
\newunit\newblock%
%\printfield{note}%
%\newunit\newblock%
\usebibmacro{publisher+location+date}%
%\newunit\newblock %这里标点去掉
\usebibmacro{chapter+pages}%
\iffieldundef{url}{}{%当没有网址时也不输出
\usebibmacro{modifydate}}%带括号的修改或更新日期,
\usebibmacro{doi+eprint+url}%从下面移动到上面来,因为gbt2015的url需直接放在页码后面。
\newunit\newblock%
\printfield{pagetotal}%
\newunit\newblock%
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
%\usebibmacro{doi+eprint+url}%
%\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}\usebibmacro{annotation}}
\begin{filecontents}[force]{\jobname.bib}
@book{barnes-1975,
title = {An Algebraic Introduction to Mathematical Logic},
author = {Barnes, Donald W. and Mack, John M.},
year = {1975},
series = {Graduate {{Texts}} in {{Mathematics}}},
number = {22},
publisher = {{Springer Verlag}},
address = {{New York}},
}
@mvbook{FengQi-2019-JiHeLunDaoYinJiBenLiLun,
title = {集合论导引:基本理论},
author = {{冯琦}},
date = {2019},
series = {现代数学基础丛书},
volume = {1},
number = {178},
publisher = {{科学出版社}},
location = {{北京}},
volumes = {3}
}
@book{FengQi-2019,
title = {集合论导引:基本理论},
author = {{冯琦}},
date = {2019},
series = {现代数学基础丛书},
volume = {1},
number = {178},
publisher = {{科学出版社}},
location = {{北京}},
volumes = {3}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
结果为:
from biblatex-gb7714-2015.
感谢!
按这个思路,照葫芦画瓢临时性魔改了一下,将卷数调整至title与subtitle之间,并略改标点样式,得到以下中文条目的格式效果:
示例中的第3卷是略去subtitle的测试格式。
from biblatex-gb7714-2015.
按照国标的示例,似乎应该按照这个格式:“题名: 卷次 分卷书名”。
from biblatex-gb7714-2015.
Related Issues (20)
- 对“参考文献”进行章节编号 HOT 3
- 会议论文集格式
- 会议论文集格式 HOT 6
- 著者-出版制的日期格式 HOT 5
- 一种法学类文献样式--如何实现这种注释要求 HOT 26
- 中英文文献中 unicode 引号的处理 HOT 7
- 在通过 Pandoc 转换的 LaTeX 文档中使用 biblatex-gb7714-2015 时,\autocites 多重引用产生了多余的括号 HOT 14
- 使用了gbcitelabel = quanjiao设定引用处的标点符号之后,括号前后的间距不一样。 HOT 3
- 南开大学硕/博模板中如何将[J]前的.去除 HOT 1
- [样式请求] 顺序编码制 + `\parencite` 输出的页码是非上标 HOT 2
- 英文译者 `Trans. by` 后没有空格 HOT 2
- 警告:`byeditor+others` 已定义 HOT 2
- 关于增加 `file` 域来链接本地文件的问题 HOT 18
- `parencite` 失去超链接 HOT 4
- `\parencite[]{}` 的 `[]` 输入页码时的空格问题 HOT 2
- 著者-出版年制期刊名与期中间不应有逗号 HOT 3
- 西文作者名包含短横线 hyphen 的缩写问题 HOT 12
- `incollection` 中作者和编者相同时编者未显示 HOT 1
- 使用 quarto 生成 pdf 参考文献的等字显示为 “andotherscn” HOT 18
- 设置gbfnperpage=true后,跨页段落中的脚标无法准确重置计数 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biblatex-gb7714-2015.