将“and others”改为“et al”

将“and others”改为“et al”

我有一个包含 4 位以上作者的参考文献列表,并且我设置了,maxcitenames=3,我的脚注参考现在如下所示:

Alberto Garcia-Garcia 等。Appl. Soft Comput. J.,70:41–65,2018。

但是,我想将“和其他人”替换为“等”。

我目前正在使用biblatex以下选项

\usepackage[hyperref=true,
            url=false,
            isbn=false,
            backref=false,
            style=custom-numeric-comp,
            citereset=chapter,
            maxcitenames=3,
            maxbibnames=100,
            uniquename=false, 
            uniquelist=false,
            backend=bibtex, % This option was needed to generate bibliography for new systems
            block=none]{biblatex}

请问我怎样才能获得“et al.”?

在此处输入图片描述

%  \sjcitep (superscript citation number, short cite info in footnote).

    \documentclass[a4paper,11pt]{book}
    \usepackage{charter} % optional: activate bitstream charter font
    \usepackage[hyperref=true,
                url=false,
                isbn=false,
                backref=true,
                style=custom-numeric-comp,
                citereset=chapter,
                maxcitenames=3,
                maxbibnames=100,
                backend=bibtex, % while checking on one of my (newest) systems, this option was needed to generate bibliography
                block=none]{biblatex}
    \usepackage{hyperref}
    
    % back reference text preceding the page number ("see p.")
    \DefineBibliographyStrings{english}{%
        backrefpage  = {see p.}, % for single page number
        backrefpages = {see pp.} % for multiple page numbers
    }
    
    % the followings activate 'custom-english-ordinal-sscript.lbx'
    % in order to print ordinal 'edition' suffixes as superscripts,
    % and adjusts (reduces) spacing between suffix and following "ed."
    \DeclareLanguageMapping{english}{custom-english-ordinal-sscript}
    \DeclareFieldFormat{edition}%
                       {\ifinteger{#1}%
                        {\mkbibordedition{#1}\addthinspace{}ed.}%
                        {#1\isdot}}
    
    % removes period at the very end of bibliographic record
    \renewcommand{\finentrypunct}{}
    
    % removes period after DOI and suppresses capitalization
    % of the word following DOI ("See p. xx" -> "see p. xx")
    \renewcommand{\newunitpunct}{\addspace\midsentence}
    
    \DeclareFieldFormat{journaltitle}{\mkbibemph{#1},} % italic journal title with comma
    \DeclareFieldFormat[inbook,thesis]{title}{\mkbibemph{#1}\addperiod} % italic title with period
    \DeclareFieldFormat[article]{title}{#1} % title of journal article is printed as normal text
    \DeclareFieldFormat[article]{volume}{\textbf{#1}\addcolon\space} % makes volume of journal bold and adds colon
    \DeclareFieldFormat{pages}{#1} % removes pagination (p./pp.) before page numbers
    
    %%%%%%%%%
    % the command \sjcitep defined below prints footnote citation above punctuation
    \newlength{\spc} % declare a variable to save spacing value
    \newcommand{\sjcitep}[2][]{% new command with two arguments: optional (#1) and mandatory (#2)
            \settowidth{\spc}{#1}% set value of \spc variable to the width of #1 argument
            \addtolength{\spc}{-1.8\spc}% subtract from \spc about two (1.8) of its values making its magnitude negative
            #1% print the optional argument
            \hspace*{\spc}% print an additional negative spacing stored in \spc after #1
            \supershortnotecite{#2}}% print (cite) the mandatory argument
    %%%%%%%%%
    
    \bibliography{example_ref_list}  % includes file "example_ref_list.bib" with data on the cited references
    
    
    \begin{document}
    
    This is an example of how to reference in LaTeX\sjcitep[.]{Garcia-Garcia2018}.
    
    % prints author names as small caps
    \renewcommand{\mkbibnamefirst}[1]{\textsc{#1}}
    \renewcommand{\mkbibnamelast}[1]{\textsc{#1}}
    \renewcommand{\mkbibnameprefix}[1]{\textsc{#1}}
    \renewcommand{\mkbibnameaffix}[1]{\textsc{#1}}
    
    \printbibliography
    
    \end{document}

答案1

以下文档重现了该问题

\documentclass[a4paper,11pt]{article}

\usepackage[maxcitenames=3,]{biblatex}
\DeclareLanguageMapping{english}{custom-english-ordinal-sscript}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,aksin}

\printbibliography
\end{document}

当它与custom-english-ordinal-sscript.lbx可用的http://www.khirevich.com/latex/biblatex/http://www.khirevich.com/downloads/example_latex_bib_foot.rarcustom-english-ordinal-sscript.lbx包含

\ProvidesFile{custom-english-ordinal-sscript.lbx}


% This file redefines '\mkbibordinal' command, and contains
% its standard definition (from english.lbx) with the only 
% difference in one line with '\mkbibsuperscript{...}'


\InheritBibliographyExtras{english}
\DeclareBibliographyExtras{%
  \protected\def\mkbibordinal#1{%
    \begingroup%
    \@tempcnta0#1\relax\number\@tempcnta%
    \@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
    \ifnum\@tempcnta>20%
      \@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
    \fi%
    \mkbibsuperscript{\ifcase\@tempcnta th\or st\or nd\or rd\else th\fi}%
    \endgroup}%
  \protected\def\mkbibmascord{\mkbibordinal}%
  \protected\def\mkbibfemord{\mkbibordinal}%
}

\endinput

.lbx文件缺少字符串声明/继承规则。因此它根本没有定义任何字符串。这意味着您只会得到字符串的粗体名称和警告。


.lbx我们可以通过向文件添加字符串继承规则来解决这个问题

\InheritBibliographyStrings{english}

然后文件将会显示

\ProvidesFile{custom-english-ordinal-sscript.lbx}


% This file redefines '\mkbibordinal' command, and contains
% its standard definition (from english.lbx) with the only 
% difference in one line with '\mkbibsuperscript{...}'


\InheritBibliographyExtras{english}
\DeclareBibliographyExtras{%
  \protected\def\mkbibordinal#1{%
    \begingroup%
    \@tempcnta0#1\relax\number\@tempcnta%
    \@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
    \ifnum\@tempcnta>20%
      \@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
    \fi%
    \mkbibsuperscript{\ifcase\@tempcnta th\or st\or nd\or rd\else th\fi}%
    \endgroup}%
  \protected\def\mkbibmascord{\mkbibordinal}%
  \protected\def\mkbibfemord{\mkbibordinal}%
}

\InheritBibliographyStrings{english}

\endinput

或者,由于该.lbx文件本质上只包含三个宏的重新定义,我们可以完全删除它,并.lbx直接在前言中执行文件所做的事情。删除

\DeclareLanguageMapping{english}{custom-english-ordinal-sscript}

从您的文档中将其替换为

\makeatletter
\DefineBibliographyExtras{english}{%
  \protected\def\mkbibordinal#1{%
    \begingroup%
    \@tempcnta0#1\relax\number\@tempcnta%
    \@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
    \ifnum\@tempcnta>20%
      \@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
    \fi%
    \mkbibsuperscript{\ifcase\@tempcnta th\or st\or nd\or rd\else th\fi}%
    \endgroup}%
  \protected\def\mkbibmascord{\mkbibordinal}%
  \protected\def\mkbibfemord{\mkbibordinal}%
}
\makeatother

获得

\documentclass[a4paper,11pt]{article}

\usepackage[maxcitenames=3,]{biblatex}
\makeatletter
\DefineBibliographyExtras{english}{%
  \protected\def\mkbibordinal#1{%
    \begingroup%
    \@tempcnta0#1\relax\number\@tempcnta%
    \@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
    \ifnum\@tempcnta>20%
      \@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
    \fi%
    \mkbibsuperscript{\ifcase\@tempcnta th\or st\or nd\or rd\else th\fi}%
    \endgroup}%
  \protected\def\mkbibmascord{\mkbibordinal}%
  \protected\def\mkbibfemord{\mkbibordinal}%
}
\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,aksin}

\printbibliography
\end{document} 

相关内容