[Tex/LaTex] How to number the references in a bibliography irrespective of their order of appearance in a document

bibliographiesbibtexformattingnumbering

I'm putting together a linguistics bibliography using lsalike.bib and lsalike.sty. I'm generating it by using \nocite{*} and would like the references to be numbered (but kept in the usual order).

I'm fairly new to LaTeX, but here's my attempt at a MWE. This is as close as I've been able to get so far.

Document:

\documentclass{article}
\usepackage{lsalike}

\makeatletter
\renewcommand\@biblabel[1]{\@arabic\c@enumi}
\makeatother

\begin{document}

\nocite{*}

\bibliographystyle{lsalike}
\bibliography{mwe-bib}
\end{document}

Bibliography file:

@phdthesis{Nossalik:2009aa,
    Author = {Larissa Nossalik},
    School = {McGill University},
    Title = {L2 Acquisition of {R}ussian Aspect},
    Year = {2009}
    }

 @article{Bermel:1995aa,
    Author = {Neil Bermel},
    Journal = {{R}ussian {L}inguistics},
    Number = {3},
    Pages = {333--348},
    Title = {Aspect and the Shape of Action in {O}ld {R}ussian},
    Volume = {19},
    Year = {1995}
    }

This gives me a list of references with a 0 before each one. Is there a way to display 1 before the first reference in the list, 2 before the second, et c.?

Best Answer

The lsalike package is meant to do author-year citations:

The "lsalike" bibliography style (lsalike.bst) creates citations with labels like

  \citeauthoryear{author-info}{year}

These labels are processed by the following commands: [...]

So the bibliography is meant not to have numbers. If you'd like to have numbers anyway, you can do a different patch:

\usepackage{etoolbox}
\patchcmd{\thebibliography}{\setlength}{\usecounter{enumiv}\setlength}{}{}
\makeatletter
\renewcommand\@biblabel[1]{\stepcounter{enumiv}[\arabic{enumiv}]}
\makeatother

The numbers will appear in the margin.

enter image description here

With Guido's suggestion the numbers can be pushed inside the margin:

\renewcommand\@biblabel[1]{\stepcounter{enumiv}\hspace{\bighang}[\arabic{enumiv}] }
Related Question