我想重新排序 Biblatex 印刷书目输出中的字段。我的目的是将“注释”字段放在最后。
目前,该页面可能会引起混淆。如果注释中提到了另一个版本,读者可能会认为这些页面是另一个版本的。
这个问题不同于这个(作者使用“note”代替“urldate”)。它与另一个问题但复杂的解决方案是 2012 年的。在最近的 biblatex 版本中,也许有一种更简单的方法来实现这一点
梅威瑟:
\begin{filecontents}{\jobname.bib}
@article{test,
author = {Author},
title = {Title},
journaltitle = {Journal},
year = 2015,
number = 2,
volume = 167,
pages = {67--88},
note = {Reprinted under the name "Title2"}}
\end{filecontents}
\documentclass[12pt,twoside,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{filecontents}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\cite{test}
\printbibliography
\end{document}
答案1
该addendum
字段通常显示在条目的最后(大多数情况下它会在最后),因此如果您不想弄乱样式本身,这将是您的明显候选者。
你可以使用源映射note
进行映射addendum
,这样你甚至不必更改.bib
文件
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{test,
author = {Author},
title = {Title},
journaltitle = {Journal},
year = 2015,
number = 2,
volume = 167,
pages = {67--88},
note = {Reprinted under the name \mkbibquote{Title2}},
}
\end{filecontents}
\documentclass[12pt,twoside,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{filecontents}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=false]{
\step[fieldsource=note]
\step[fieldset=addendum, origfieldval, final]
\step[fieldset=note, null]
}
}
}
\begin{document}
\cite{test}
\printbibliography
\end{document}
如果您确实想移动note
所有条目类型的 ,则必须重新定义或修补书目驱动程序和宏。然后,您可以在and之后note+pages
重新插入该note
字段(再次强调,从技术上讲,这实际上不是在末尾,但将其放在那里而不是放在最后是有意义的)。addendum
pubstate
\usepackage{xpatch}
\newcommand*{\removenotefromdriver}[1]{%
\xpatchbibdriver{#1}
{\printfield{note}}
{}
{}{}}
\forcsvlist{\removenotefromdriver}
{book,collection,proceedings,
inbook,incollection,inproceedings,
booklet,manual,misc,online,patent,
periodical,report,thesis,unpublished}
\renewbibmacro*{note+pages}{%
\setunit{\bibpagespunct}%
\printfield{pages}%
\newunit}
\renewbibmacro*{addendum+pubstate}{%
\printfield{addendum}%
\newunit\newblock
\printfield{pubstate}%
\newunit\newblock
\printfield{note}}
如果这真的是关于文章的转载,我诚挚地建议你看一下related
功能。biblatex
你可以尝试类似
@article{test,
author = {Author},
title = {Title},
journaltitle = {Journal},
year = 2015,
number = 2,
volume = 167,
pages = {67--88},
related = {test2},
relatedtype = {reprintas},
}
@inbook{test2,
author = {Author},
title = {Title2},
booktitle = {Collected Works},
}
这将给予