这是对两个已回答问题的后续回答:可以在 biblatex 中设置 2 种简写列表吗?和可以使用 biblatex 仅打印参考书目中相关条目的标题吗?
我试图将这些答案结合起来,生成一个分段的缩写列表和一个分段的参考书目。
我希望弗雷格著作的缩写部分不要给出德文标题,而是给出相关的英文标题。
David Purton 对第二个问题的回答,即定义 arelatedtype={englishtitle}
和 a ,\newbibmacro*{related:englishtitle}
解决了参考书目中的弗雷格条目给出英文标题的问题。
在下面的 MWE 中,我尝试放入\usebibmacro{related:englishtitle}
一个新的驱动程序\DeclareBibliographyDriver{fregeabbrevs}
,以在缩写列表部分打印英语弗雷格标题:
\documentclass{book}
\usepackage[backend=biber,style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Inproceedings{Frege1897a,
author = {Frege, Gottlob},
title = {Über die Begriffsschrift des Herrn Peano und meine eigene},
booktitle = {Berichte über die Verhandlungen der Königlich Sächsischen Gesellschaft der Wissenschaften zu Leipzig: Mathematisch-physische Klasse},
date = {1897},
pages = {361--378},
volume = {48},
related = {Frege1984h},
relatedtype = {englishtitle},
shorthand = {PCN},
}
@Inbook{Frege1984h,
author = {Frege, Gottlob},
title = {On Mr. Peano's Conceptual Notation and My Own},
date = {1984},
pages = {234--248},
crossref = {Frege1984},
}
@Book{Frege1984,
author = {Frege, Gottlob},
title = {Collected Papers on Mathematics, Logic, and Philosophy},
date = {1984},
location = {Oxford},
publisher = {Blackwell},
translator = {Black, Max},
editor = {McGuinness, Brian},
shorthand = {CP},
}
@Article{Moore1899,
author = {Moore, G. E.},
title = {The Nature of Judgment},
journaltitle = {Mind},
date = {1899},
volume = {8},
number = {30},
pages = {176--193},
shorthand = {NJ},
}
@Book{Lewis1918,
author = {Lewis, C. I.},
title = {A Survey of Symbolic Logic},
date = {1918},
location = {Berkeley, CA},
publisher = {University of California Press},
series = {Semicentennial publications of the University of California, 1868-1918},
shorthand = {SL}
}
@Collection{Beaney2013,
editor = {Michael Beaney},
title = {The Oxford Handbook of the History of Analytic Philosophy},
date = {2013},
publisher = {Oxford University Press},
location = {Oxford},
}
\end{filecontents}
\addbibresource{\jobname.bib}
% Main primary sources categories
\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{moore}{Moore}{G.\bibnamedelimi E.}
% Filter for other, i.e., not main, primary sources
\defbibfilter{notmainprimary}{%
not category=byfrege %
and not category=bymoore %
}
% Check to distinguish primary from secondary sources
\defbibcheck{primarysource}{%
\iffieldint{year}
{\ifnumless{\thefield{year}}{1936}
{}
{\skipentry}}
{\skipentry}}
\defbibcheck{secondarysource}{%
\iffieldint{year}
{\ifnumgreater{\thefield{year}}{1935}
{}
{\skipentry}}
{\skipentry}}
% Generating entries for the 3 abbreviations lists
\DeclareBiblistFilter{fregeabbrevs}{
\filter[type=field,filter=shorthand]
}
\DeclareBiblistFilter{mainabbrevs}{
\filter[type=field,filter=shorthand]
}
\DeclareBiblistFilter{moreabbrevs}{
\filter[type=field,filter=shorthand]
}
% Sorting the abbreviations lists
\DeclareSortingTemplate{fregeabbrevs}{ \sort[final]{ \field{sortshorthand} } \sort{ \field{shorthand} } }
\DeclareSortingTemplate{mainabbrevs}{ \sort[final]{ \field{sortshorthand} } \sort{ \field{shorthand} } }
\DeclareSortingTemplate{moreabbrevs}{ \sort[final]{ \field{sortshorthand} } \sort{ \field{shorthand} } }
%
\newbibmacro*{related:englishtitle}[1]{%
\entrydata{#1}{%
\printtext{English title:}%
\setunit{\addspace}%
\usebibmacro{title}}}
% Drivers for printing abbreviations lists
\DeclareBibliographyDriver{fregeabbrevs}{%
\usebibmacro{related:englishtitle}%
\newunit\newblock
\printdate}
\DeclareBibliographyDriver{mainabbrevs}{%
\usebibmacro{title}%
\newunit\newblock
\printdate}
\DeclareBibliographyDriver{moreabbrevs}{%
\renewbibmacro*{date+extradate}{}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\addcomma\space}\newblock
\usebibmacro{title}%
\setunit{\addcomma\space}\newblock
\printdate}
% Environment for abbreviation lists, to italicize by \emph the shorthands
\defbibenvironment{abbrevs}
{\list
{\printfield[shorthandwidth]{shorthand}}
{\setlength{\labelwidth}{\shorthandwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}%
\renewcommand*{\makelabel}[1]{\emph{##1}\hss}}}
{\endlist}
{\item}
% Titles for 4 parts of Bibliography: two main authors, other primary sources, secondary sources
\defbibheading{subbibtitleonly}[\bibname]{%
\section*{#1}}
\begin{document}
\chapter*{Abbreviations}
Full details of these works are in the Bibliography.
\printbiblist[env=abbrevs,title={Works of Frege}, heading=subbibtitleonly, category=byfrege]{fregeabbrevs}
\printbiblist[env=abbrevs,title={Works of Moore}, heading=subbibtitleonly, category=bymoore]{mainabbrevs}
\printbiblist[env=abbrevs,title={Other Primary Works}, heading=subbibtitleonly, check=primarysource, notcategory=byfrege, notcategory=bymoore]{moreabbrevs}
\nocite{Frege1897a,Moore1899,Lewis1918,Beaney2013}
\chapter*{Bibliography}
\printbibliography[title={Works by Frege}, heading=subbibtitleonly, category=byfrege]
\printbibliography[title={Works by Moore}, heading=subbibtitleonly, category=bymoore]
\printbibliography[title={Other Primary Sources}, heading=subbibtitleonly, check=primarysource, notcategory=byfrege, notcategory=bymoore]
\printbibliography[title={Secondary Sources}, heading=subbibtitleonly, check=secondarysource, notcategory=byfrege, notcategory=bymoore]
\end{document}
但结果根本没有任何标题:
那么,如何把英文标题《论皮亚诺先生的概念符号和我自己的概念符号》聚碳酸酯,并且在此日期之前?
另外几个问题:
- “The Nature of Judgment”后面有一个句号,但后面有一个逗号符号逻辑概述;我怎样才能使它们统一变成逗号?
- 逗号是否可以出现在标题的结束引号内,例如:“判断的本质”?
答案1
使用
\DeclareBibliographyDriver{fregeabbrevs}{%
\iffieldequalstr{relatedtype}{englishtitle}
{\entrydata{\thefield{related}}{\usebibmacro{title}}}
{}%
\newunit\newblock
\printdate}
得到英文标题。
您的标点符号不统一,因为\DeclareBibliographyDriver
除了 s 之外的所有标点符号\DeclareBibliographyDriver{moreabbrevs}
都使用\newunit
,而后者使用\setunit{\addcomma\space}
。您可以定义\renewcommand*{\newunitpunct}{\addcomma\space}
并使用\newunit
; ,也可以\setunit{\addcomma\space}
在任何地方使用。哪种方式更好取决于您在实际参考书目中想要什么。如果您也想在那里使用逗号,请使用\renewcommand*{\newunitpunct}{\addcomma\space}
; 如果您想在那里保留句号,您需要\setunit{\addcomma\space}
在其他地方明确使用。
babel
如果使用语言选项加载,逗号将移动到引号内american
。