biblatex 中的格式化等

biblatex 中的格式化等

这是强调“et al.”,新要求具体针对biblatex

考虑以下最小示例:

在此处输入图片描述

\documentclass{article}

\usepackage[maxcitenames = 2]{biblatex}

\addbibresource{biblatex-examples.bib}  

\begin{document}

\citeauthor{companion}

\printbibliography

\end{document}

maxcitenames = 2当有 3 位或更多作者时,会引入“et al.”。我该如何格式化“et al.”以满足我的需求(斜体, 或者大胆的, 或者 ...)?

答案1

更新

使用 的当前版本biblatex,您可以使用 bibstring 集。请参阅https://tex.stackexchange.com/a/644877/35864

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

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

\DefineBibliographyExtras{british}{%
  \DeclareBibstringSet{latin}{andothers,ibidem}%
  \DeclareBibstringSetFormat{latin}{\mkbibemph{#1}}%
}
\UndefineBibliographyExtras{british}{%
  \UndeclareBibstringSet{latin}%
}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{aksin}

\printbibliography
\end{document}

重新定义宏就足够了name:andothers

\renewbibmacro*{name:andothers}{%
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \andothersdelim\bibstring[\mkandothers]{andothers}}
    {}}

与默认值唯一的变化是,我们有\bibstring[\mkandothers]{andothers},以便“andothers”字符串被包裹在\mkandothers,可以定义为

\newcommand*{\mkandothers}{\mkbibemph}

总共

\documentclass{article}

\usepackage[maxcitenames = 2]{biblatex}

\addbibresource{biblatex-examples.bib}  

\newcommand*{\mkandothers}{\mkbibemph}
\renewbibmacro*{name:andothers}{%
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \andothersdelim\bibstring[\mkandothers]{andothers}}
    {}}

\begin{document}
\citeauthor{companion}

\printbibliography
\end{document}

Goossens 等人

答案2

可能最简单的方法是定义:

\DefineBibliographyStrings{english}{%
  andothers = {\textbf{et al}\adddot}
}

梅威瑟:

\documentclass{article}

\usepackage[maxcitenames = 2]{biblatex}

\DefineBibliographyStrings{english}{%
  andothers = {\textbf{et al}\adddot}
}

\addbibresource{biblatex-examples.bib}

\begin{document}

\citeauthor{companion}

\printbibliography

\end{document} 

输出:

在此处输入图片描述

相关内容