Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Move biblatex label into margin

Is there a simple solution to force the numerals of biblatex's bibliography list (via \printbibliography) into the left column such that text of the entry will align with the rest of the text in the document?

I'd like to produce

   References
1. Last, F. M.; Last, F. M., Title; Publisher: City, Year, pages.
2. Last, F. M.; Last, F. M., Title; Publisher: City, Year, pages.

instead of the usual

References
1. Last, F. M.; Last, F. M., Title; Publisher: City, Year, pages.
1. Last, F. M.; Last, F. M., Title; Publisher: City, Year, pages.

It seems that using the solution from my earlier question "How can I align section titles and list environments in the left margin?" does not work, so I'm assuming that generating the bibliography list goes beyond declaring a simple enumerate list.

share|improve this question
    
This question has mostly been answered here. To omit square brackets around the label numbers you'd use \DeclareFieldFormat{labelnumberwidth}{#1\adddot} –  Audrey Mar 7 '12 at 14:27
add comment

marked as duplicate by domwass, Thorsten, Torbjørn T., Werner, lockstep Mar 7 '12 at 21:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 4 down vote accepted

The answer depends on which bibliography style you are using for biblatex; in this case it looks like you're thinking of numeric, so:

\documentclass[12pt]{article}

\usepackage[showframe]{geometry}
\usepackage[backend=biber, style=numeric]{biblatex}
\addbibresource{biblatex-examples.bib}% from biblatex

\DeclareFieldFormat{labelnumberwidth}{#1\adddot}% forgot this; from Audrey's comment 

% default bibliography environment (from biblatex.sty)
\defbibenvironment{bibliography} 
  {\list{}{%
     \leftmargin\bibhang 
     \itemindent-\leftmargin 
     \itemsep\bibitemsep
      \parsep\bibparsep}}
  {\endlist}
  {\item}

% 'numeric' bibliography environment (from numeric.bbx)
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{prefixnumber}%
        \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
%      \addtolength{\leftmargin}{\labelsep}%
      \addtolength{\leftmargin}{-\labelsep}% <-- changed
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\begin{document}

\nocite{companion,cotton,gonzalez,hammond,iliad,knuth:ct,knuth:ct:a,
  knuth:ct:b, knuth:ct:c, knuth:ct:d, knuth:ct:e}%
\printbibliography

\end{document}
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.