有没有办法以不同的方式格式化 biblatex 对书籍的引用输出?引用论文时,页数通常是指论文集或期刊中的页码范围,但对于书籍,大多数来源仅提供书籍的页数。
以下面的参考书目为例fictivebook.bib
:
@book{fictivebook2012,
author = "John Smith and Bobby Fisher and Ron Jeremy and Martha Stewart and Barrack Obama",
title = "Super awesome book",
year = "2012",
pages = "9001"}
引用自以下文件:
\documentclass{article}
\usepackage[backend=biber,style=numeric]{biblatex}
\bibliography{fictivebook}
\begin{document}
This citation is useless, we only want a bibliography \cite{fictivebook2012}.
\printbibliography
\end{document}
引文呈现如下:
[1] John Smith et al. Super awesome book. 2012, p. 9001.
这有点模棱两可。我的意思是,这是否意味着我只引用了《超级棒》这本书的第 9001 页,还是意味着这是某人的作品,只对应于这本书的第 9001 页?
我更喜欢这样的输出,有什么办法可以实现吗?
[1] John Smith et al. Super awesome book. 2012, 9001 pages.
我尝试编辑.bib
文件,添加9001 pages
字段,pages
但无济于事。到目前为止,我能想到的最佳解决方案就是删除书籍/论文的页数,这样就能消除混乱。
答案1
使用pagetotal
代替 字段pages
。
\documentclass{article}
\usepackage{biblatex}
% Keep abbreviations in general, but use "pages" to format the `pagetotal` field
\DeclareFieldFormat{pagetotal}{\mkpagetotal[bookpagination]{#1~pages}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{fictivebook2012,
author = "John Smith and Bobby Fisher and Ron Jeremy and Martha Stewart and Barrack Obama",
title = "Super awesome book",
year = "2012",
pagetotal = "9001",
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
This citation is useless, we only want a bibliography \cite{fictivebook2012}.
\printbibliography
\end{document}