9

I'm trying to move everything nonessential into the margins. But I couldn't find how BibLaTeX generates the entries' labels (like [1] generated by \cite and in front of the item in the list, don't know the exact term).

I want these labels in the margin (by surrounding them with \llap).

Inserting the following after \usepackage{biblatex} just lets the labels disappear:

\defbibenvironment{bibliography}{\list{%
    \llap{here}%
    \hspace{0.5em}%
}{%
    \setlength\leftmargin{0pt}%
}}{\endlist}{\item}

What code do I have to insert here to print the label? (Regardless of the style, this should work with style=alphabetic and style=numeric for example)

(complete example seems like overkill?)

Intended result at the bottom

Here, the [1] is hardcoded.

Werner
  • 603,163
pascal
  • 2,122

1 Answers1

5

Each style loads its .bbx file which defines its own bibliography (bib)environment, so I think that a solution working for all the styles it's not easy to achieve. In the case of the numeric style, you could define (in the preamble of your document) the bibliography (bib)environment like this:

\makeatletter
\defbibenvironment{bibliography}
{\list{\printtext[labelnumberwidth]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}}}
{\setlength{\bibhang}{0pt}%
\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\item}
\makeatother
Gonzalo Medina
  • 505,128
  • didn't think of that… I actually wanted something that would work with any style (since it's only layout) though. But I found the bbx'es now, it seems they just use \defbibenvironment, too, piecing together the label there. I thought there was a common macro… – pascal Jul 22 '11 at 23:20