我用它biblatex-chicago
来管理论文中的引用。我经常引用多卷合集,美国外交关系,其中有一个可接受的引用格式。我创建了一个自定义的参考书目驱动程序@archive
来模仿这种格式,但还有一个我无法修复的错误。MWE:
\documentclass{article}
\usepackage[notes,backend=biber,booklongxref=bib]{biblatex-chicago}
\DeclareBibliographyAlias{mvarchive}{archive}
\DeclareFieldFormat*[archive]{volume}{vol. #1}
\DeclareFieldFormat*[archive]{part}{\parentext{#1}}
\DeclareDataInheritance{mvarchive}{*}{
\inherit{editor}{editor}
\inherit{location}{location}
\inherit{publisher}{publisher}
\inherit{title}{maintitle}
\inherit{subtitle}{mainsubtitle}
\noinherit{shorttitle}
}
\newbibmacro*{archive-mtitle}{%
\toggletrue{cms@usedvol}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}%
\setunit{\addcolon\addspace}%
\printfield[noformat]{mainsubtitle}}%
\newcunit
\printfield{maintitleaddon}
\setunit{\addcomma\addspace}%
\printtext[title]{%
\printfield[noformat]{title}}}
\DeclareBibliographyDriver{archive}{%
\usebibmacro{bibindex}%
\usebibmacro{editor}%
\setunit{\addspace}%
\printfield{nameaddon}%
\newcunit\newblock
\usebibmacro{archive-mtitle}%
\newcunit\newblock
\printfield{volume}%
\printfield{part}
\setunit{\addcolon\addspace}%
\printtext[subtitle]{%
\printfield[title]{subtitle}}%
\newunit\newblock
\usebibmacro{publ+loc+year}%
\newunit\newblock
\usebibmacro{finentry}}%
\DeclareBibliographyDriver{cite:archive}{%
\usebibmacro{bibindex}%
\ifboolexpr{
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
}% expression
{%
\usebibmacro{editor}%
\setunit{\addspace}%
\printfield{nameaddon}%
\setunit{\addcomma\addspace}%
\newcunit\newblock
\usebibmacro{archive-mtitle}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\printfield{volume}%
\printfield{part}%
\newcunit\newblock
\usebibmacro{volfullpostnote}%
\newcunit\newblock
\usebibmacro{cite+doi+url}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}%
}%
{%
\entrydata{\thefield{crossref}}{%
\clearname{editor}%
\printtext[cmshyperlink]{%
\printfield[citetitle]{labeltitle}}}%
\setunit{\addcomma\addspace}%
\clearname{editor}%
\printtext[cmshyperlink]{%
\printfield[citetitle]{labeltitle}}%
\newcunit\newblock
\printfield{volume}%
\printfield{part}%
\newcunit\newblock
\usebibmacro{volfullpostnote}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@MVarchive{FRUS,
Editor = {{U.S. Department of State}},
Location = {Washington},
Publisher = {United States Government Printing Office},
Shorttitle = {FRUS},
Title = {Foreign Relations of the United States}}
@archive{FRUS:61-63:5.1,
Title = {1961--1963},
Subtitle = {Soviet Union},
Shorttitle = {1961--63},
Volume = {5},
Part = {1},
Crossref = {FRUS},
Year = {1998}}
@archive{FRUS:64-68:11,
Title = {1964--1968},
Subtitle = {Arms Control and Disarmament},
Shorttitle = {1964--68},
Volume = {11},
Crossref = {FRUS},
Year = {1997}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Note.\footcite[795--96]{FRUS:61-63:5.1}
Note.\footcite[50-52]{FRUS:61-63:5.1}
Note.\footcite[654--56]{FRUS:64-68:11}
Note.\footcite[50-52]{FRUS:61-63:5.1}
\printbibliography
\end{document}
导致:
这正是芝加哥风格的 FRUS 引文应有的样子,脚注 4 除外。请注意,当我在脚注 2 中重复 FRUS 1961-63 的引文时,它会给我一个 ibid 和一个后注,这是应该的。同样,在脚注 3 中,它是另一个 FRUS 卷的第一个实例,因此它shorttitle
为父卷提供了,然后是shorttitle
子卷的volume
,以及后注。但是当我在脚注 4 中重复 FRUS 61-63 的引文时,它会恢复为完全不同的样式。
我需要做哪些更改才能使脚注 4 看起来与脚注 3 完全一样?
答案1
我通过重新定义来解决这个问题,bibmacro{cite}
这样它就可以检查条目类型是否为@archive
。我敢肯定,这并不优雅,但它完成了工作。MWE:
\documentclass{article}
\usepackage[notes,backend=biber,booklongxref=bib]{biblatex-chicago}
\newbibmacro*{cite}{%
\ifciteseen%
{\iffieldundef{shorthand}%
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}%
{\usebibmacro{cite:ibid}}%
{\ifboolexpr{not test {\ifentrytype{archive}}}{%
\global\toggletrue{cms@shortnote}%
\global\togglefalse{cms@fullnote}%
\usebibmacro{cite:short}%
\usebibmacro{cite:save}}%
{\usebibmacro{cite:full}% If it is @archive, use regular cite
\usebibmacro{cite:save}}}}%
{\iftoggle{cms@shorthandibid}%
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}%
{\usebibmacro{cite:ibid}}%
{\usebibmacro{cite:shorthand}%
\usebibmacro{cite:save}}}%
{\usebibmacro{cite:shorthand}%
\usebibmacro{cite:save}}}}%
{\iftoggle{cms@allshort}%
{\global\toggletrue{cms@shortnote}%
\global\togglefalse{cms@fullnote}%
\global\toggletrue{cms@printshhand}%
\usebibmacro{cite:short}%
\usebibmacro{cite:save}}%
{\global\toggletrue{cms@fullnote}%
\global\togglefalse{cms@shortnote}%
\usebibmacro{cite:full}%
\usebibmacro{cite:save}}}}%
\DeclareBibliographyAlias{mvarchive}{archive}
\DeclareFieldFormat*[archive]{volume}{vol. #1}
\DeclareFieldFormat*[archive]{part}{\parentext{#1}}
\DeclareDataInheritance{mvarchive}{*}{
\inherit{editor}{editor}
\inherit{location}{location}
\inherit{publisher}{publisher}
\inherit{title}{maintitle}
\inherit{subtitle}{mainsubtitle}
\noinherit{shorttitle}
}
\newbibmacro*{archive-mtitle}{%
\toggletrue{cms@usedvol}%
\printtext[maintitle]{%
\printfield[noformat]{maintitle}}%
\newcunit
\printfield{maintitleaddon}
\setunit{\addcomma\addspace}%
\printtext[title]{%
\printfield[noformat]{title}}}
\DeclareBibliographyDriver{archive}{%
\usebibmacro{bibindex}%
\usebibmacro{editor}%
\setunit{\addspace}%
\printfield{nameaddon}%
\newcunit\newblock
\usebibmacro{archive-mtitle}%
\newcunit\newblock
\printfield{volume}%
\printfield{part}
\ifboolexpr{
not test{\iffieldundef{crossref}}}%
{%
\setunit{\addcolon\addspace}%
\printtext[subtitle]{%
\printfield[title]{subtitle}}%
\newunit\newblock}%
{\newunit\newblock}%
\usebibmacro{publ+loc+year}%
\newunit\newblock
\usebibmacro{finentry}}%
\DeclareBibliographyDriver{cite:archive}{%
\usebibmacro{bibindex}%
\ifboolexpr{
test {\iffieldundef{crossref}}%
or
not test {\ifentryseen{\thefield{crossref}}}%
}%
{%
\usebibmacro{editor}%
\setunit{\addspace}%
\printfield{nameaddon}%
\newcunit\newblock
\usebibmacro{archive-mtitle}%
\newcunit\newblock
\usebibmacro{cpubl+loc+year}%
\newcunit\newblock
\printfield{volume}%
\printfield{part}%
\newcunit\newblock
\usebibmacro{volfullpostnote}%
\newcunit\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}%
\usebibmacro{book:xref+finentry}%
}%
{%
\entrydata{\thefield{crossref}}{%
\printtext[title]{%
\printfield[noformat]{labeltitle}}}%
\newcunit\newblock
\clearname{editor}%
\printtext[cmshyperlink]{%
\printfield[citetitle]{labeltitle}}%
\newcunit\newblock
\printfield{volume}%
\printfield{part}%
\newcunit\newblock
\usebibmacro{volfullpostnote}%
\newcunit\newblock
\usebibmacro{finentry}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@MVarchive{FRUS,
Editor = {{U.S. Department of State}},
Location = {Washington},
Publisher = {United States Government Printing Office},
Shorttitle = {FRUS},
Title = {Foreign Relations of the United States}}
@archive{FRUS:61-63:5.1,
Title = {1961--1963},
Subtitle = {Soviet Union},
Shorttitle = {1961--63},
Volume = {5},
Part = {1},
Crossref = {FRUS},
Year = {1998}}
@archive{FRUS:64-68:11,
Title = {1964--1968},
Subtitle = {Arms Control and Disarmament},
Shorttitle = {1964--68},
Volume = {11},
Crossref = {FRUS},
Year = {1997}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Note.\footcite[795--96]{FRUS:61-63:5.1}
Note.\footcite[50-52]{FRUS:61-63:5.1}
Note.\footcite[654--56]{FRUS:64-68:11}
Note.\footcite[50-52]{FRUS:61-63:5.1}
\printbibliography
\end{document}
生成: