biblatex:\textcite 作者格式与参考书目作者格式

biblatex:\textcite 作者格式与参考书目作者格式

对于 LaTeX 引用,我使用 biblatex/babel。我撰写文章的期刊要求参考书目和作者格式如下:

盖顿 AC、霍尔 JE。

也就是说,最后一位作者之前没有“and”。我确实做到了这一点(见下面的例子),然而,在 中\textcite,“and”现在也消失了……

问题

  1. 是否可以删除参考书目中的“和”,但将其保留在\textcite
  2. 以前,我使用\textcite与 authoryear 样式一起使用。使用解决方案也发布在这个网站上,我能够将多个来源放在一个中\textcite,并将biblatex逗号和“and”放在适当的位置。是否可以将此解决方案调整为数字引用样式?
  3. 有没有办法让参考书目中的所有作者(以及他们之间的逗号)都变为粗体?
\documentclass[a4paper]{article}
\usepackage[american]{babel}
\usepackage[
  terseinits=true,
  firstinits=true,
  backend=biber,
  style=numeric
]{biblatex}

%Put initials after names...
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}    

%Remove "and" before last name. However, this also removes "and" in a textcite...
\renewcommand*{\finalnamedelim}{\addcomma\space}

%I also removed the commas between last names and initials (https://tex.stackexchange.com/questions/17583/biblatex-remove-commas-between-last-and-first-names-in-bibliography). This is however not needed for a minimum working example.

%Generate a test bibliography
\usepackage{filecontents}
\begin{filecontents*}{database.bib}
@BOOK{Guyton2006,
  title = {Textbook of Medical Physiology},
  publisher = {W.B. Saunders},
  year = {2006},
  author = {Arthur C. Guyton and John E. Hall},
  address = {Philadelphia, Pennsylvania},
  edition = {11th Edition}
}
\end{filecontents*}

\bibliography{database.bib}

%Some biber compatibility things (from https://tex.stackexchange.com/questions/21711/setting-up-winedt-6-0-and-miktex-to-run-biblatex-and-biber)...
\makeatletter
    \providecommand\bibstyle@faked{}
    \providecommand\bibdata@faked{}
    \AtBeginDocument{%
    \immediate\write\@mainaux{\noexpand\bibstyle@faked}%
    \immediate\write\@mainaux{\noexpand\bibdata@faked}}
\makeatother

\begin{document}
The following sentence contains a textcite example. \textcite{Guyton2006} wrote a comprehensive textbook.
\printbibliography
\end{document}

答案1

广告问题 1:只需使用

\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{\addcomma\space}%
}

答案2

问题 2 可以通过升级到最新的 biblatex 版本来解决。

问题 1 已通过新的 biblatex 功能得到部分解决,但为了确保使用and中的字符串,\citeauthor您可以\ifcurrentname在 的重新定义中纳入测试\finalnamedelim

对于问题 3,请注意参考书目中的排序名称列表对应于 、authoreditortranslator可以通过使用 xpatch 包中的命令修补相应的宏来获得粗体排序名称列表。

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=numeric,terseinits,firstinits]{biblatex}
\usepackage[colorlinks]{hyperref}
\usepackage{xpatch}

% All names reversed
\DeclareNameAlias{default}{last-first}
\DeclareNameAlias{sortname}{last-first}

% Set sort name list in boldface
\AtBeginBibliography{%
  \renewcommand*{\labelnamepunct}{\textbf{\newunitpunct}}%
  \xpretobibmacro{author}{\bgroup\bfseries}{}{}%
  \xapptobibmacro{author}{\egroup}{}{}%
  \xpretobibmacro{editor+others}{\bgroup\bfseries}{}{}%
  \xapptobibmacro{editor+others}{\egroup\clearname{editor}}{}{}%
  \xpretobibmacro{translator+others}{\bgroup\bfseries}{}{}%
  \xapptobibmacro{translator+others}{\egroup\clearname{translator}}{}{}}

% Omit commas in reversed names
\renewcommand*{\revsdnamepunct}{}

% Omit "and" from \finalnamedelim except in name labels
\renewcommand*{\finalnamedelim}{%
  \ifcurrentname{labelname}
    {\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
     \addspace\bibstring{and}\space}
    {\addcomma\space}}

\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill\noindent
Filler text.\footfullcite{companion}
\textcite{companion,coleridge,gaonkar} show that...
\textcite{coleridge,aristotle:poetics,aristotle:rhetoric} show that...
\citeauthor{companion} show that...
\printbibliography
\end{document}

在此处输入图片描述

答案3

将此添加到您的序言中:

% delimiter switching for cite and textcite
\let\olddelim\finalnamedelim
\let\oldtextcite\textcite

\newcommand{\switchdelim}[1]{\renewcommand*{\finalnamedelim}{#1}}

% set up the default
\switchdelim{\addcomma\space}

% wrap the textcite command to reversibly switch the delimiter
\renewcommand{\textcite}[1]{%
{%
\renewcommand{\textbf}{}% suppress bold faced names in the running text
\switchdelim{\olddelim}%
\oldtextcite{#1}%
\switchdelim{\addcomma\space}%
}%
}

% format the author names
\renewcommand{\mkbibnamelast}{\textbf}
\renewcommand{\mkbibnamefirst}{\textbf}
\renewcommand{\mkbibnameprefix}{\textbf}
\renewcommand{\mkbibnameaffix}{\textbf}

% sneak a textbf into the definition of addcomma. This may be
% too much of a low-level hack, I hope there is a cleaner 
% way for doing this, but it seems to work.  
\makeatletter 
\protected\def\blx@imc@addcomma{\textbf{\blx@addpunct{comma}}}
\makeatother

得出:

在此处输入图片描述

相关内容