作品的第二次引用目前如下所示:
它应该看起来像
巴宾顿,1933 年,第 310 页。
某期刊,2013,40-41页。
Farindon,1993,第 10 页。
这种风格适用于书籍、文章和文集。
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{article,
organization = {The Minimal Music Organization},
title = {Minimal music},
journal = {Some journal},
year = {2013},
number = {12},
pages = {40-41},
}
@book{book,
author = {Peter Babington},
title = {The title of the work},
year = 1993,
pages ={310},
}
@incollection{incollection,
author = {Peter Farindon},
title = {The title of the work},
booktitle = {The title of the book},
publisher = {The name of the publisher},
year = 1993,
pages ={10},
}
\end{filecontents}
\documentclass{article}
\usepackage[style=verbose]{biblatex}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\DeclareSortingTemplate{nty}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{organization}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{volume}
\literal{0}
}
}
\DeclareListFormat{organization}{%
\usebibmacro{list:delim}{#1}%
\mkbibemph{#1}\isdot
\usebibmacro{list:andothers}}
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\printdelim{nametitledelim}}\newblock
\printlist{organization}%
\newunit\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{version}%
\newunit
\printfield{note}%
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\addbibresource{\jobname.bib}
\begin{document}
Let's cite! \footcite{article} \footcite{incollection} \footcite{book} \footcite{article} \footcite{incollection} \footcite{book}
\printbibliography
\end{document}
答案1
这可以类似地完成Biblatex:第一次引用为完整参考文献,后续引用同上,或 - 中断时 - 简短的作者年份引用,但由于您想要的风格略有不同,并且已经进行了很多额外的修改,因此必须小心谨慎。
我想指出的是,通常当引用使用作者-年份标签标识时,年份应该在参考书目(和长引用)中占据更突出的位置,以便一眼就能轻松找到。使用当前布局,必须在条目末尾附近搜索年份,而名称则在开头。通常,对于此引用设置,参考书目也会按名称-年份排序,但 MWE 按名称-标题排序。
以下 MWE 中针对此问题的相关修改已用 标记https://tex.stackexchange.com/q/467022/35864
。其他代码已从许多链接问题中收集。
主要思想是将cite:short
宏修改为打印labeldate
而不是labeltitle
。为了使用,labeldate
我们需要使用选项来请求它labeldateparts
。如果从中复制一些代码,其余部分就非常简单了authoryear.cbx
。我们只需要确保消歧义字母也出现在参考书目中,因此重新定义宏date
。
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=verbose, labeldateparts, autocite=footnote]{biblatex}
%%%%% https://tex.stackexchange.com/q/467022/35864
\newbibmacro*{cite:labeldate+extradate}{%
\iffieldundef{labelyear}
{\iffieldundef{label}
{\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\printtext[bibhyperref]{\printfield{label}}}}
{\printtext[bibhyperref]{\printlabeldateextra}}}
\renewbibmacro*{cite:short}{%
\ifbibmacroundef{cite:short:\strfield{entrytype}}
{\printnames{labelname}%
\setunit*{\printdelim{nametitledelim}}%
\usebibmacro{cite:labeldate+extradate}}
{\usebibmacro*{cite:short:\strfield{entrytype}}}}
\renewbibmacro*{date}{%
\iflabeldateisdate
{\printdateextra}
{\iffieldundef{extradate}
{}
{\PackageWarning{biblatex}{Nonempty 'extradate' in entry
\thefield{entrykey}, but labeldate is not date.}}%
\printdate}}
%%%%% 467022 END
%%%%% https://tex.stackexchange.com/q/466985/35864
\DeclareFieldFormat[online]{shorttitle}{\mkbibquote{#1\dots\isdot}}
\newbibmacro*{cite:short:online}{%
\printnames{labelname}%
\setunit{\addcomma\space}%
\printlist{organization}%
\setunit{\addcomma\space}%
\printdate
\setunit{\addcomma\space}%
\printtext[bibhyperlink]{%
\iffieldundef{shorttitle}
{\printfield[citetitle]{labeltitle}}
{\printfield{shorttitle}}}}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=false]{
\step[fieldsource=title, match=\regexp{\A(\w+\s+){2}(\w+)}, final]
\step[fieldset=shorttitle, origfieldval, final]
\step[fieldsource=shorttitle, match=\regexp{\A(\w+\s+)(\w+\s+)(\w+).*}, replace={$1$2$3}]
}
}
}
%%%%% 466985 END
%%%%% https://tex.stackexchange.com/q/464205/35864,
%%%%% https://tex.stackexchange.com/q/464166/35864
\DefineBibliographyStrings{english}{
urlseen = {visited at}
}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\DeclareListWrapperFormat{organization}{\mkbibemph{#1}}
\DeclareBibliographyDriver{online}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\newunit\newblock
\printlist{organization}%
\newunit\newblock
\usebibmacro{date}%
\newunit\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{version}%
\newunit
\printfield{note}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\usebibmacro{url+urldate}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
%%%% 464205 & 464166 END
%%%%% https://tex.stackexchange.com/q/464911/35864
\DeclareSortingTemplate{nty}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{organization}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
\sort{
\field{sortyear}
\field{year}
}
\sort{
\field{volume}
\literal{0}
}
}
%%%%% 464911 END
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{article,
author = {Hans Zimmer},
title = {Minimal music},
journal = {Some journal},
year = {2013},
number = {12},
pages = {40-41},
}
@book{book,
author = {Peter Babington},
title = {The title of the work},
year = 1993,
}
@incollection{incollection,
author = {Peter Farindon},
title = {The title of the work},
booktitle = {The title of the book},
publisher = {The name of the publisher},
year = 1993,
pages = {10},
}
@online{gates,
author = {Bill Gates},
title = {Save the world!},
date = {2016-05-04},
url = {https://www.gatesfoundation.org/de/},
urldate = {2018-12-04},
organization = {Bill {and} Melinda Gates Foundation},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem\autocite{article} ipsum\autocite{incollection} dolor\autocite{book}
sit\autocite{article} amet\autocite{incollection} concesctur\autocite{book}
aut\autocite{gates} lorem\autocite{gates}.
Lorem\autocite{knuth:ct:b} ipsum\autocite{knuth:ct:c}
dolor\autocite{knuth:ct:b} sit\autocite{knuth:ct:c}.
\printbibliography
\end{document}