使用 biblatex (footcite) 添加作者姓名首字母

使用 biblatex (footcite) 添加作者姓名首字母

我使用\footcite命令。第一次key使用 a 时,我获得了完整的参考资料,但第二次使用时,我获得了简短版本。问题是,在简短版本中,我希望有作者的首字母,但目前我还没有。

梅威瑟:

\documentclass{article} 
\listfiles
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{article,
  author = {Nachname, Vorname},
  title = {Titel des Zeitschriftenartikels},
  journal = {Zeitschrift},
  year = {2006},
  volume = {6},
  translator = {Talu, Jean},
  pages = {19--75}
}
@BOOK{book,
  author = {Buchautor, Hans-Wilhelm},
  title = {Irgendein Buch},
  address = {Buch am Wald},
  year = {2000}
}
\end{filecontents}


\usepackage[main=french,ngerman,english]{babel}




%bibliographie
\usepackage[
bibstyle=verbose,
citestyle=verbose-ibid,
autocite=footnote, 
language=french]{biblatex}
\bibliography{\jobname} 


\begin{document}
\cite{book}
\cite{article}
\newpage
\autocite{article}
\autocite{article}
\newpage
\autocite{article}
\newpage
\printbibliography

\end{document}

答案1

您可以使用以下方式重新定义详细内容cite:short

\renewbibmacro*{cite:short}{%
  \printnames[mygiveninit-family]{labelname}%
  \setunit*{\printdelim{nametitledelim}}%
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}}}

这假设了一个定义的名称格式mygiveninit-family,可以定义为(我不认为存在一种无论全局选项如何都会打印首字母的名称格式giveninits,因此我定义了一种,假设您不想篡改该选项):

\DeclareNameFormat{mygiveninit-family}{%
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}%
    \usebibmacro{name:andothers}}

完整工作示例:

\documentclass{article} 

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{article,
  author = {Nachname, Vorname},
  title = {Titel des Zeitschriftenartikels},
  journal = {Zeitschrift},
  year = {2006},
  volume = {6},
  translator = {Talu, Jean},
  pages = {19--75}
}
@BOOK{book,
  author = {Buchautor, Hans-Wilhelm},
  title = {Irgendein Buch},
  address = {Buch am Wald},
  year = {2000}
}
\end{filecontents}

\usepackage[main=french,ngerman,english]{babel}

%bibliographie
\usepackage[
bibstyle=verbose,
citestyle=verbose-ibid,
autocite=footnote, 
language=french]{biblatex}
\addbibresource{\jobname.bib} 


\renewbibmacro*{cite:short}{%
  \printnames[mygiveninit-family]{labelname}%
  \setunit*{\printdelim{nametitledelim}}%
  \printtext[bibhyperlink]{%
    \printfield[citetitle]{labeltitle}}}

\DeclareNameFormat{mygiveninit-family}{%
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}%
    \usebibmacro{name:andothers}}

\begin{document}
\cite{book}
\cite{article}
\newpage
\autocite{article}
\autocite{article}
\newpage
\autocite{article}
\newpage
\printbibliography

\end{document}

这将产生以下简短的引文:

enter image description here

相关内容