我知道firstinits=true
biblatex 中有缩写名字和所有中间名的选项。我想要实现的是只缩写中间名。因此 egauthor = {Smith, John Ethan Jacob}
应该打印为Smith, John E. J.
请参阅基于 Jonathan 回答的 MWE这在这个问题的末尾发布。我得到以下输出:
[SD95] Smith, John EJ/Doe, Jain L. 一些书名。A Publisher,1995 年。
但我希望看到的输出是:
[SD95] Smith, John EJ;Doe, Jain L:一些书名。A Publisher,1995 年。
;
作者姓名之间的 以及作者:
姓名与书名之间的 特定于我使用的 bib 样式(自定义)。但下面的解决方案不尊重这种自定义样式。有什么想法可以实现所需的缩写,但不丢失 bib 样式吗?
梅威瑟:
\documentclass{article}
\usepackage[backend=biber,style=din, autocite=footnote]{biblatex}
\begin{filecontents*}{bibliography.bib}
@BOOK{SD1995,
author = {Smith, John Ethan Jacob and Doe, Jain Lauren},
title = {Some book title},
year = {1995},
publisher = {A Publisher}
}
\end{filecontents*}
\addbibresource{bibliography.bib}
\usepackage[T1]{fontenc}
\def\bibnamedelima{ }%
\def\bibnamedelimb{ }%
\DeclareNameFormat{author}{%
\ifblank{#5}{}{#5\addspace}% prefix if applicable
#1% last name
\edef\firstname{#3}%
\ifblank{#3}{}{\addcomma\addspace\expandafter\first{\firstname}}%
\ifthenelse{\value{listcount}<\value{liststop}}%
{\addslash}{}%
}
\DeclareNameFormat{labelname}{%
\ifblank{#5}{}{#5\addspace}% prefix if applicable
#1% last name
\edef\firstname{#3}%
\ifblank{#3}{}{\addcomma\addspace\expandafter\first{\firstname}}%
\ifthenelse{\value{listcount}<\value{liststop}}%
{\addslash}{}%
}
\makeatletter
\def\@empty{}
\def\first#1{\expandafter\@first#1 \@nil}
\def\@first#1 #2\@nil{#1\addspace%
\if\relax\detokenize{#2}\relax\else\@initials#2\@nil\fi}
\def\initials#1{\expandafter\@initials#1 \@nil}
\def\@initials#1 #2\@nil{%
\initial{#1}%
\def\NextName{#2}%
\ifx\@empty\NextName\relax%
\else\@initials#2\@nil\fi}
\def\initial#1{\expandafter\@initial#1\@nil}
\def\@initial#1#2\@nil{#1.\addspace}
\makeatother
\begin{document}
\null
\vfill
How the citation look like: \cite{SD1995}
\clearpage
\printbibliography
\end{document}
编辑
敬请期待这里对于我在 MWE 中使用的 din 样式。使用这种样式;
时,当我使用 Andrew Swann 的修改时,我会在第一作者和分隔符之间得到两个空格。如果不进行修改,则只有一个空格。我现在正在寻找此问题的解决方案。
答案1
这里有一个比您尝试过的解决方案侵入性更小的方法。它依赖于调整调用的宏\mkbibnamegiven
来格式化名字和中间名,而不是完全重写姓名格式:
\documentclass{article}
\usepackage[backend=biber,style=alphabetic,autocite=footnote]{biblatex}
\begin{filecontents*}{bibliography.bib}
@BOOK{SD1995,
author = {Smith, John Ethan Jacob and Doe, Jain Lauren},
title = {Some book title},
year = {1995},
publisher = {A Publisher}
}
\end{filecontents*}
\addbibresource{bibliography.bib}
\usepackage[T1]{fontenc}
\renewcommand*{\mkbibnamegiven}[1]{\edef\firstname{#1}\expandafter\first{\firstname}}
\def\bibnamedelima{ }%
\def\bibnamedelimb{ }%
\makeatletter
\def\@empty{}
\def\first#1{\expandafter\@first#1 \@nil}
\def\@first#1 #2\@nil{#1\addspace%
\if\relax\detokenize{#2}\relax\else\@initials#2\@nil\fi}
\def\initials#1{\expandafter\@initials#1 \@nil}
\def\@initials#1 #2\@nil{%
\initial{#1}%
\def\NextName{#2}%
\ifx\@empty\NextName\relax%
\else\bibinitdelim \@initials#2\@nil\fi}
\def\initial#1{\expandafter\@initial#1\@nil}
\def\@initial#1#2\@nil{#1\bibinitperiod}
\makeatother
\begin{document}
How the citations appear: \cite{SD1995}.
\printbibliography
\end{document}
更新din
您应该在更新中指出样式并添加
\AtBeginBibliography{\renewcommand*{\multinamedelim}{\addsemicolon\addspace}}
到你的序言。din
风格包含定义
\renewcommand*{\multinamedelim}{\mbox{ }\addspace\addsemicolon\addspace}
在分号前添加一个空格。获取单个空格的另一种方法是
\AtBeginBibliography{\renewcommand*{\multinamedelim}{\addspace;\addspace}}