将 Biblatex 项目左对齐

将 Biblatex 项目左对齐

如同这个问题这个问题我正在寻找一种方法来将数字对齐到左侧。我正在使用biblatex。有什么想法吗?

答案1

标签格式由书目环境控制。要更改标签对齐方式,请更改\renewcommand*{\makelabel}[1]{\hss##1}\renewcommand*{\makelabel}[1]{##1}

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

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

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{##1}}
  {\endlist}
  {\item}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,geer,nussbaum,
worman,knuth:ct:a,aksin,gaonkar:in,
moraux,pines,westfahl:space,jaffe}

\printbibliography
\end{document}

左对齐数字。

相关内容