我在 Tufte-book 文档类中使用 BibLateX,我想将包含作者、日期、标题的样式应用于脚注中的参考文献。我找到了一种接近此的样式,但缺少年份,如下所示:
\documentclass[nobib,symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage[style=authortitle-icomp,sorting=nyt]{biblatex}
我如何创建一种特定的样式以包含作者、日期和标题?
答案1
可以在以下网址找到非常相似的问题在同一文档中使用 biblatex 进行部分和完整引用。
在这里,我选择选项 3 来定义一个我们可以映射到 的新命令\autocite
。根据您的设置和所需的输出,似乎适合以此为基础确定样式authoryear-ibid
(我没有选择,style=authortitle-icomp
因为您排序了nyt
,这表明年份比标题更重要,并且您还希望在引用中将日期放在标题之前)。
\documentclass[british,nobib,symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear-icomp]{biblatex}
\makeatletter
\newbibmacro*{adtcite}{%
\iffieldundef{shorthand}
{\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
{\usebibmacro{cite:ibid}}
{\iffieldequals{namehash}{\cbx@lasthash}
{\setunit{\compcitedelim}}
{\printnames{labelname}%
\setunit*{\printdelim{nameyeardelim}}%
\printlabeldateextra
\setunit*{\printdelim{nametitledelim}}%
\savefield{namehash}{\cbx@lasthash}}%
\usebibmacro{cite:title}}}%
{\usebibmacro{cite:shorthand}%
\usebibmacro{cite:reinit}}%
\setunit{\multicitedelim}}
\makeatother
\newbibmacro*{cite:title}{%
\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
\DeclareCiteCommand{\fadtcite}[\mkbibfootnote]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{adtcite}}
{}
{\usebibmacro{cite:postnote}}
\DeclareMultiCiteCommand{\fadtcites}[\mkbibfootnote]{\fadtcite}{\setunit{\multicitedelim}}
\DeclareAutoCiteCommand{fadt}{\fadtcite}{\fadtcites}
\ExecuteBibliographyOptions{autocite=fadt}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem\autocite{sigfridsson}
ipsum\autocite{sigfridsson}
dolor\autocite{cicero}
sit\autocite{worman}
amer\autocite{geer,nussbaum}
\printbibliography
\end{document}