如何在 biblatex authoryear 样式中将数字括在方括号中

如何在 biblatex authoryear 样式中将数字括在方括号中

我在 biblatex 中使用 authoryear 样式,并希望在条目前创建一个数字,就像在数字样式中一样。我设法获取了数字,但也希望在它们周围加上方括号,并去掉数字后的点。

\documentclass{article}
\usepackage[style=authoryear,dashed=false,backend=biber,eprint=false,doi=false,isbn=false,url=false]{biblatex}
\defbibenvironment{bibliography}
{\enumerate
    {}
    {\setlength{\leftmargin}{\bibhang}%
        \setlength{\itemindent}{-\leftmargin}%
        \setlength{\itemsep}{\bibitemsep}%
        \setlength{\parsep}{\bibparsep}}}
{\endenumerate}
{\item}
\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{DiGiuseppe2016,
    Title                    = {{Borrowed Time: Sovereign Finance, Regime Type, and Leader Survival}},
    Author                   = {DiGiuseppe, Matthew and Shea, Patrick E.},
    Journal                  = {Economics and Politics},
    Year                     = {2016},
    Number                   = {3},
    Pages                    = {342--367},
    Volume                   = {28},
    Doi                      = {10.1111/ecpo.12081},
    ISBN                     = {1468-0343},
    ISSN                     = {14680343}
}

@Article{Dixit2000,
    Title                    = {{Political Power and the Credibility of Government Debt}},
    Author                   = {Dixit, Avinash and Londregan, John},
    Journal                  = {Journal of Economic Theory},
    Year                     = {2000},
    Number                   = {1},
    Pages                    = {80--105},
    Volume                   = {94},

    Doi                      = {10.1006/jeth.2000.2684},
    ISSN                     = {00220531}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Text \cite{Dixit2000} More Text \cite{DiGiuseppe2016}
\printbibliography
\end{document}

答案1

使用该包enumitem您可以自定义enumerate环境。使用以下代码修改您的 MWE:

\usepackage{enumitem}
\defbibenvironment{bibliography}
{\enumerate[label={[\arabic*]}]

结果:

在此处输入图片描述

答案2

我不知道这在 2016 年 1 月是否可用,但现在你可以拥有一个单独的bibstylecitestyle。例如:

\usepackage[citestyle=authoryear,bibstyle=numeric,backend=biber,eprint=false,doi=false,isbn=false,url=false]{biblatex}

相关内容