biblatex:结合作者年份和详细样式

biblatex:结合作者年份和详细样式

我想修改作者年份citestyle 的方式第一次出现引用时,会在引用中添加一个脚注,提供完整的参考资料. 行为将类似于标准冗长citestyle,只是,它不是为每个引用创建脚注条目,而是在任何地方都使用 authoryear 样式,只在第一次出现引用时(最好是在章节中)添加脚注。

我想要如下内容:

[...] 正如 Sagan (1997)^1 所描述的那样。事实上,Sagan (1997) 和 Schulze-Makuch 和 Irwin (2004)^2 完美地描述了我们试图传达的感觉。

[1] Sagan, C., (1997). 暗淡蓝点:人类在太空的未来愿景。兰登书屋数字公司。

[2] Schulze-Makuch,D.,&Irwin,LN(2004 年)。宇宙中的生命。 Springer-Verlag.版本。

非常感谢您的帮助

答案1

您可能想尝试以下方法。宏定义改编自 中的原文authoryear.cbx。不幸的是,需要一些技巧才能使 中的括号和脚注的顺序正确\textcite。(这应该适用于authoryear,对于更复杂的样式,authoryear-comp它会复杂得多)。

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, citetracker, backend=biber]{biblatex}

\newbibmacro*{first:fullcite}{%
  \ifciteseen
    {}
    {\mkbibfootnote{%
       \usedriver
         {\DeclareNameAlias{sortname}{default}}
         {\thefield{entrytype}}}}}

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}%
     \usebibmacro{cite:labeldate+extradate}}
    {\usebibmacro{cite:shorthand}}%
  \usebibmacro{first:fullcite}}

\makeatletter
\newbibmacro*{textcite:first:fullcite:check}{%
  \ifciteseen
    {\global\undef\cbx@fullcitekey}
    {\savefield{entrykey}{\cbx@fullcitekey}}}

\newbibmacro*{textcite:first:fullcite:print}{%
  \ifundef\cbx@fullcitekey
    {}
    {\entrydata{\cbx@fullcitekey}{%
       \mkbibfootnote{%
         \usedriver
           {\DeclareNameAlias{sortname}{default}}
           {\thefield{entrytype}}}}}}
\makeatother

\renewbibmacro*{textcite}{%
  \ifnameundef{labelname}
    {\iffieldundef{shorthand}
       {\usebibmacro{cite:label}%
        \setunit{%
          \global\booltrue{cbx:parens}%
          \printdelim{nonameyeardelim}\bibopenparen}%
        \ifnumequal{\value{citecount}}{1}
          {\usebibmacro{prenote}}
          {}%
        \usebibmacro{cite:labeldate+extradate}}
       {\usebibmacro{cite:shorthand}}}
    {\printnames{labelname}%
     \setunit{%
       \global\booltrue{cbx:parens}%
       \printdelim{nameyeardelim}\bibopenparen}%
     \ifnumequal{\value{citecount}}{1}
       {\usebibmacro{prenote}}
       {}%
     \usebibmacro{citeyear}}%
  \usebibmacro{textcite:first:fullcite:check}}

\renewbibmacro*{textcite:postnote}{%
  \iffieldundef{postnote}
    {\ifbool{cbx:parens}
       {\bibcloseparen}
       {}%
     \usebibmacro{textcite:first:fullcite:print}}
    {\ifbool{cbx:parens}
       {\setunit{\printdelim{postnotedelim}}}
       {\setunit{\printdelim{extpostnotedelim}\bibopenparen}}%
     \printfield{postnote}\bibcloseparen
     \usebibmacro{textcite:first:fullcite:print}}}

\DeclareCiteCommand{\textcite}
  {\boolfalse{cbx:parens}}
  {\usebibmacro{citeindex}%
   \iffirstcitekey
     {\setcounter{textcitetotal}{1}}
     {\stepcounter{textcitetotal}%
      \textcitedelim}%
   \usebibmacro{textcite}}
  {\ifbool{cbx:parens}
     {\bibcloseparen\global\boolfalse{cbx:parens}%
      \usebibmacro{textcite:first:fullcite:print}}
     {}}
  {\usebibmacro{textcite:postnote}}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \textcite{sigfridsson}
ipsum \textcite{nussbaum}
dolor \textcite{sigfridsson}
sit \textcite{worman}
amet \textcite{geer,pines}
\printbibliography
\end{document}

带脚注的引文

相关内容