这是定制 biblatex 缩写列表:为不同的作者提供单独的列表. 有了 moewe 的
\DeclareBibliographyDriver{shorthand}{%
\usebibmacro{title}%
\newunit\newblock
\printdate}
简写列表中只有标题和日期。然而,事实证明我需要两种类型的简写列表,一种只有标题和日期,另一种有作者、标题和日期。原因是我有两位主要作者的缩写,但也有许多其他作者的缩写;对于后者,让读者看到作者会很有帮助。因此,例如,我希望与从 moewe 的代码中获得的内容略有不同:
我希望有改变
堪萨斯州 弗雷格,戈特洛布,小书,1967年
在最后的“其他作者的速记”部分。
按照 David Purton 的回答进行编辑。
这个答案很有帮助,但并不完全有效。现在的问题是,所有相关作者的条目都会出现在简写列表中,即使是那些在 .bib 文件中没有简写的条目。以下是 MWE:
\documentclass{book}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage[style=authoryear,natbib=true,backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Frege1967,
Title = {{K}leine {S}chriften},
Address = {Hildesheim},
Author = {Frege, Gottlob},
Publisher = {Georg Olms},
Year = {1967},
Shorthand = {\emph{KS}}
}
@Article{Russell1905b,
Title = {{O}n {D}enoting},
Author = {Russell, Bertrand},
Year = {1905},
Number = {56},
Pages = {479-493},
Volume = {14},
Journal = {Mind}
}
@Book{Bradley1893,
Title = {{A}ppearance and {R}eality: a {M}etaphysical {E}ssay},
Address = {London},
Author = {Bradley, Francis Herbert},
Publisher = {Swan Sonnenshein},
Year = {1893},
Shorthand = {\emph{AR}}
}
@Article{Korselt1903,
Title = {{Ü}ber die {G}rundlagen der {G}eometrie},
Author = {Korselt, Alwin},
Journaltitle = {Jahresbericht der Deutschen Mathematiker Vereinigung},
Year = {1903},
Pages = {402–7}
}
@Inbook{Peirce1880a,
Title = {{A} {B}oolian {A}lgebra with {O}ne {C}onstant},
Author = {Peirce, Charles Sanders},
Booktitle = {Collected Papers of Charles Sanders Peirce},
Year = {1880},
Editor = {Hartshorne, Charles and Weiss, Paul and Burks, Arthur},
Pages = {12-20},
Publisher = {Harvard University Press},
Volume = {4}
}
@Article{Moore1899,
Title = {{T}he {N}ature of {J}udgment},
Author = {Moore, G. E.},
Year = {1899},
Number = {30},
Pages = {176-193},
Volume = {8},
Journal = {Mind},
Shorthand = {\emph{NJ}},
}
@Mvbook{Whitehead1910-1913,
Title = {{P}rincipia {M}athematica},
Author = {Whitehead, Alfred North and Russell, Bertrand},
Year = {1910-1913},
Edition = {1},
Address = {Cambridge},
Publisher = {Cambridge University Press},
Shorthand = {\emph{PM}}
}
@Inbook{Frege1918,
Title = {{T}hought},
Author = {Frege, Gottlob},
Year = {1918},
Pages = {351-372},
Crossref = {Frege1984}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\newcommand*{\generateauthorcategory}[3]{%
\DeclareBibliographyCategory{by#1}%
\DeclareIndexNameFormat{cat#1}{%
\ifboolexpr{
test {\ifdefstring{\namepartfamily}{#2}}
and
test {\ifdefstring{\namepartgiven}{#3}}
}%
{\addtocategory{by#1}{\thefield{entrykey}}}
{}}%
\AtDataInput{\indexnames[cat#1][1-999]{author}}}
\generateauthorcategory{frege}{Frege}{Gottlob}
\generateauthorcategory{russell}{Russell}{Bertrand}
\generateauthorcategory{moore}{Moore}{G.\bibnamedelimi E.}
\defbibfilter{moorerussell}{%
( category=bymoore or category=byrussell )
}
\defbibfilter{notmainprimary}{%
not category=byfrege
and not category=bymoore
and not category=byrussell
}
\defbibcheck{primarysource}{%
\iffieldint{year}
{\ifnumless{\thefield{year}}{1925}
{}
{\skipentry}}
{\skipentry}}
\defbibcheck{secondarysource}{%
\iffieldint{year}
{\ifnumgreater{\thefield{year}}{1925}
{}
{\skipentry}}
{\skipentry}}
\DeclareBiblistFilter{author}{
\filter[type=field,filter=shorthand]
}
\DeclareBiblistFilter{title}{
\filter[type=field,filter=shorthand]
}
\DeclareBibliographyDriver{author}{%
\usebibmacro{title}%
\newunit\newblock
\printdate}
\DeclareBibliographyDriver{title}{%
\renewbibmacro*{date+extradate}{}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\addcomma\space}\newblock
\usebibmacro{title}%
\setunit{\addcomma\space}\newblock
\printdate}
\begin{document}
\chapter*{Abbreviations}
Full details of these works are in the Bibliography.
\printbiblist[env=shorthand,title={Works of Frege}, heading=subbibliography, category=byfrege]{author}
\printbiblist[env=shorthand,title={Works of Moore and Russell}, heading=subbibliography, filter=moorerussell]{author}
\printbiblist[env=shorthand,title={Other Primary Works}, heading=subbibliography, check=primarysource, notcategory=byfrege, notcategory=bymoore, notcategory=byrussell]{title}
\nocite{Frege1967,Russell1905b,Bradley1893,Korselt1903,Moore1899,Peirce1880a,Whitehead1910-1913,Frege1918}
\end{document}
在 TeXStudio 中构建时结果是:
《思想》、《论指示》以及 Korselt 和 Peirce 的论文都在列表中,但没有简写。所以问题是如何将这些从列表中排除。
我刚刚尝试通过添加 \DeclareBiblistFilter 来实现 moeve 在评论 David Purton 的回答时提出的建议,但遗憾的是这没有效果。很可能我没有编写正确的过滤器。
答案1
已更新以包含所需的书目列表过滤器
biblist
您可以通过定义名为和的新驱动程序title
并使用来实现这一点author
。\printbiblist
从 moewe 对您上一个问题的回答中删除旧的简写驱动程序。
新驱动程序:
\DeclareBibliographyDriver{author}{%
\usebibmacro{title}%
\newunit\newblock
\printdate}
\DeclareBibliographyDriver{title}{%
\renewbibmacro*{date+extradate}{}% remove (date) after author.
\usebibmacro{author/editor+others/translator+others}%
\setunit{\addcomma\space}\newblock
\usebibmacro{title}%
\setunit{\addcomma\space}\newblock
\printdate}
新\printbiblist
调用。使用以下方式指定环境env=shorthand
:
\printbiblist[env=shorthand,title={Shorthands by Kant}, heading=subbibliography, category=bykant]{author}
\printbiblist[env=shorthand,title={Shorthands by Elk}, heading=subbibliography, category=byelk]{author}
\printbiblist[env=shorthand,title={Shorthands by other authors}, heading=subbibliography, notcategory=byelk, notcategory=bykant]{title}
新过滤器:
\DeclareBiblistFilter{author}{
\filter[type=field,filter=shorthand]
}
\DeclareBiblistFilter{title}{
\filter[type=field,filter=shorthand]
}
完整 MWE:
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{russell:denoting,
Title = {On Denoting},
Author = {Russell, Bertrand},
Year = {1905},
Number = {56},
Pages = {479-493},
Volume = {14},
Journal = {Mind}
}
@book{elk:bronto,
author = {Anne Elk},
title = {Theory of Brontosauruses},
shorthand = {Bronto},
date = {1972},
publisher = {Monthy and Co.},
location = {London},
}
@book{elk:diplo,
author = {Anne Elk},
title = {Theory of Diplodocuses},
shorthand = {Diplo},
date = {1974},
publisher = {Monthy and Co.},
location = {London},
}
@book{frege,
author = {Frege, Gottlob},
title = {Kleine Schriften},
date = {1967},
shorthand = {\emph{KS}},
location = {Hildesheim},
publisher = {Georg Olms},
}
\end{filecontents}
\addbibresource{biblatex-examples.bib}
\addbibresource{\jobname.bib}
\newcommand*{\generateauthorcategory}[3]{%
\DeclareBibliographyCategory{by#1}%
\DeclareIndexNameFormat{cat#1}{%
\ifboolexpr{test {\ifdefstring{\namepartfamily}{#2}}
and test {\ifdefstring{\namepartgiven}{#3}}}
{\addtocategory{by#1}{\thefield{entrykey}}}
{}}%
\AtDataInput{\indexnames[cat#1][1-999]{author}}}
\generateauthorcategory{elk}{Elk}{Anne}
\generateauthorcategory{kant}{Kant}{Immanuel}
\DeclareBibliographyDriver{author}{%
\usebibmacro{title}%
\newunit\newblock
\printdate}
\DeclareBibliographyDriver{title}{%
\renewbibmacro*{date+extradate}{}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\addcomma\space}\newblock
\usebibmacro{title}%
\setunit{\addcomma\space}\newblock
\printdate}
\DeclareBiblistFilter{author}{
\filter[type=field,filter=shorthand]
}
\DeclareBiblistFilter{title}{
\filter[type=field,filter=shorthand]
}
\begin{document}
\nocite{kant:ku,kant:kpv,elk:diplo,elk:bronto,frege,russell:denoting}
\section*{Shorthands}
\thispagestyle{empty}
Introductory notes on shorthands. Full details can be found in the bibliography.
\printbiblist[env=shorthand,title={Shorthands by Kant}, heading=subbibliography, category=bykant]{author}
\printbiblist[env=shorthand,title={Shorthands by Elk}, heading=subbibliography, category=byelk]{author}
\printbiblist[env=shorthand,title={Shorthands by other authors}, heading=subbibliography, notcategory=byelk, notcategory=bykant]{title}
\printbibliography
\end{document}