Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,29 @@
\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}
\newrobustcmd*{\mkbibdesc}[1]{%
\number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}
% Fix label width so every line of every reference is indented consistently,
% regardless of whether the displayed number has one, two, or three digits.
% With reversed numbering, internal label N maps to displayed "1" and internal
% label 1 maps to the highest displayed number (= entrycount). biblatex sizes
% \labelnumberwidth from the largest *internal* number, which after reversal is
% the *smallest* displayed number, making the box too narrow for double-digit
% (or larger) displayed labels. Redefining the bibliography environment here
% forces the box width to match the actual maximum displayed number.
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}}
{\settowidth{\labelnumberwidth}{[\csuse{entrycount:\therefsection}]}%
\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\newcommand{\bibliofont}{\small}
\setlength{\bibitemsep}{0.22\baselineskip}

Expand Down
Loading