footcite 等于 texcite,但采用特殊格式(年份和名字首字母周围有括号)

footcite 等于 texcite,但采用特殊格式(年份和名字首字母周围有括号)

我需要为我的硕士论文使用特殊的footcite和格式。它们都应该看起来像textcite

Cite with footnote and textcite.\footnote{Vgl. \textcite{A01}, S. 23.}
Cite with footcite.\footcite[Vgl.][S. 23]{A01}

在此处输入图片描述

我尝试了 中首字母的不同解决方案footcite,但它们会破坏 的输出textcite。这是没有首字母的版本。

在此处输入图片描述

最小工作示例:

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage[
backend=biber,
bibencoding=utf8,
style=ext-authoryear,
giveninits=true,
dashed=false,
doi=false,
date=year,
isbn=false,
uniquename=init]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{A01,        
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  journaltitle = {A Journal},
  volume = {1},
  number = {1},
}
\end{filecontents}
\addbibresource{\jobname.bib}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% footnotestyle format
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Parathenthesis around year in footcite
\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}

% indentation
\usepackage[hang,bottom,stable]{footmisc}
\setlength{\footnotemargin}{5mm}
\interfootnotelinepenalty=10000 

% given name initials for footcite and textcite
% ???

\begin{document}
Cite with footnote and textcite.\footnote{Vgl. \textcite{A01}, S. 23.}
Cite with footcite.\footcite[Vgl.][S. 23]{A01}
\printbibliography
\end{document}

答案1

您可以修改labelname名称格式。原始定义可以在biblatex.def(版本 3.16 中第 955-981 行)(另参阅在使用作者年份引用格式(哈佛)和 biblatex 时如何包含首字母?

\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[
  backend=biber,
  style=ext-authoryear,
  giveninits=true,
  uniquename=init,
  dashed=false,
  date=year,
  doi=false,
  isbn=false,
]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareInnerCiteDelims{footcite}{\bibopenparen}{\bibcloseparen}
\DeclareInnerCiteDelims{cite}{\bibopenparen}{\bibcloseparen}

\DeclareNameFormat{labelname}{%
  \ifnum\value{uniquename}<2
    \usebibmacro{name:family-given}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}%
  \else
    \usebibmacro{name:family-given}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \fi
  \usebibmacro{name:andothers}}

\begin{document}
Cite with foonote and textcite.\footnote{\Cite[Vgl.][23]{nussbaum},
  and much more text.}
Cite with footcite.\footcite[Vgl.][23]{nussbaum}
\printbibliography
\end{document}

Vgl. Nussbaum, M. (1978),第 23 页//Vgl. Nussbaum, M. (1978),第 23 页


我不会\textcite在这里使用它,因为您不希望它放置前后注释。但您可以轻松地重新利用它\cite来完成这项工作。

在这个例子中,我绝对更喜欢

 \footcite[Vgl.][23]{nussbaum}

超过

 \footnote{\Cite[Vgl.][23]{nussbaum}.}

但如果包含附加文本(如在 MWE 中),使用后一种形式可能更有意义。

相关内容