我正在尝试使用 biblatex 将位置字段包含在参考书目中,该字段位于 inproceedings 条目中。一个最小的工作示例如下
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[sorting=ynt,bibstyle=authoryear-comp,defernumbers=true,maxnames=300,firstinits=true,uniquename=init,backend=biber,dashed=false,arxiv=abs]{biblatex}
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat[article]{pages}{#1}
\DeclareFieldFormat[inproceedings]{pages}{\lowercase{pp.}#1}
\DeclareFieldFormat[incollection]{pages}{\lowercase{pp.}#1}
\DeclareFieldFormat[article]{volume}{\textbf{#1}}
\DeclareFieldFormat[article]{number}{(#1)}
\DeclareFieldFormat[inproceedings]{title}{#1}
\DeclareFieldFormat{shorthandwidth}{#1}
\DeclareNameAlias{sortname}{first-last}
\DeclareBibliographyDriver{inproceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor}%
\setunit{\labelnamepunct}\nopunct
\usebibmacro{title}
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\usebibmacro{in:}%
\printfield{booktitle}%
\setunit{\bibpagespunct}%
\printfield{pages}
\newunit\newblock
\printfield{issn}%
\newunit\newblock
\printfield{location}%
\newunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
\begin{filecontents}{\jobname.bib}
@inproceedings{trial,
location = {Venice, Italy},
author = {Doe, J and Mouse, M},
booktitle = {Proceedings of my conference},
pages = {133--158},
title = {A possible title},
year = {2001}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
不幸的是,我无法让位置条目出现在参考书目中。有什么线索吗?
答案1
该location
字段属于文字列表数据类型。由于所有格式指令都特定于数据类型,因此将其替换\printfield{location}
为\printlist{location}
。
在 biblatex 手册的数据库指南中可以找到默认数据模型中字段及其数据类型的列表。
答案2
尝试这个:
address = {Venice, Italy}