我有一个与此相关的问题:biblatex-verbose:版本作为年份前面的上标
我正在使用biblatex-musuos
,该解决方案也适用于它,但仅适用于普通条目。使用 crossref 的子条目没有上标。让我困惑的是,它适用于 中的父条目和子条目biblatex-verbose
。但musuos
和verbose
都需要authortitle
样式,我无法分辨出musuos
哪些不同之处可能会阻止它工作。 中的 incollection-bibliography 驱动程序musuos
看起来与 基本相同standard
,我不知道还有什么会影响这一点。我该怎么做才能让它在 中工作musuos
?(如果我遗漏了一些非常明显的东西,我深表歉意。)
这是我使用 得到的结果musuos
。如果您将 MWE 中的样式更改为verbose
它看起来就像应该的那样,在两年之前都有上标。
MWE(与带有评论的链接问题相比有微小的变化):
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
@mvcollection{parent,
editor = {Editor, Edith},
title = {Collectiontitle},
location = {Somewhere},
date = {2000},
edition = {2},
volume = {1},
}
@InCollection{child,
author = {Author, Alf},
title = {Title},
crossref = {parent},
}
\end{filecontents}
\usepackage[style=musuos,backend=biber]{biblatex}
\usepackage{xpatch}
\addbibresource{bibliography.bib}
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\ifnumcomp{#1}={1}{}% Only use for integers >1
{\textsuperscript{#1}}}
{#1\isdot\setunit{\addcomma\space}}}
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addspace}}% changed from \addcomma\space
{\setunit*{\addcomma\space}}% changed from \addcolon\space
\printlist{publisher}%
\setunit*{\addspace}% changed from \addcomma\space
\iffieldint{edition}{%
\printfield{edition}}{}%
\usebibmacro{date}%
\newunit}
\newcommand{\editedition}[1]{%
\xpatchbibdriver{#1}
{\printfield{edition}%
\newunit}
{\iffieldint{edition}{}{%
\printfield{edition}%
\newunit}}%
{}
{\typeout{failed to patch driver #1}}
}
\editedition{book}
\editedition{collection}
\editedition{inbook}
\editedition{incollection}
\editedition{manual}
\begin{document}
\nocite{parent}
\nocite{child}
\printbibliography
\end{document}
答案1
由于我不是特别清楚的原因,它的驱动程序中biblatex-musuos
没有使用 bibmacro ,而是使用。publisher+location+date
@incollection
location+date
我们将必须重新定义location+date
类似于publisher+location+date
。
\documentclass{article}
\usepackage[style=musuos,backend=biber]{biblatex}
\usepackage{xpatch}
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\ifnumcomp{#1}={1}{}% Only use for integers >1
{\textsuperscript{#1}}}
{#1\isdot\setunit{\addcomma\space}}}
\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addspace}}% changed from \addcomma\space
{\setunit*{\addcomma\space}}% changed from \addcolon\space
\printlist{publisher}%
\setunit*{\addspace}% changed from \addcomma\space
\iffieldint{edition}{%
\printfield{edition}}{}%
\usebibmacro{date}%
\newunit}
\renewbibmacro*{location+date}{%
\printlist{location}%
\setunit*{\addcomma\space}%
\iffieldint{edition}{%
\printfield{edition}}{}%
\usebibmacro{cite:labelyear+extrayear}%
\newunit}
\newcommand{\editedition}[1]{%
\xpatchbibdriver{#1}
{\printfield{edition}%
\newunit}
{\iffieldint{edition}{}{%
\printfield{edition}%
\newunit}}%
{}
{\typeout{failed to patch driver #1}}
}
\editedition{book}
\editedition{collection}
\editedition{inbook}
\editedition{incollection}
\editedition{manual}
\begin{filecontents}{\jobname.bib}
@mvcollection{parent,
editor = {Editor, Edith},
title = {Collectiontitle},
location = {Somewhere},
date = {2000},
edition = {2},
volume = {1},
}
@InCollection{child,
author = {Author, Alf},
title = {Title},
crossref = {parent},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{parent}
\nocite{child}
\printbibliography
\end{document}