# \bibliography{} starting from any number

I'm aware of a previous question about changing bibliography starting number, but my problem is that I'm not using \begin{thebibliography} to build the bibliography, but directly reading it from a bibtex file. Is there any method of changing the default numbering, e.g. starting from 10 instead of 1 when compiling? The end of my file is as follows:

% REFERENCES AND NOTES
\bibliography{bibtextfile}
\bibliographystyle{style}

\end{document}

• Try \setcounter{enumiv}{9}, at least enumiv is the counter used by the article.cls version of \thebibliography for the numbering – user31729 Jan 26 '16 at 11:46
• Thanks but it doesn't work in my case. How can I check my counter type? – Fabio Lamanna Jan 26 '16 at 12:53

\setcounter{enumiv}{9} would work if the the \thebibliography wouldn't apply \usecounter{enumiv} which in turn resets the enumiv counter.

From article.cls

\newenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\@openbib@code
\usecounter{enumiv}%   This is the 'culprit'!!!!!
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty thebibliography' environment}}%
\endlist}


and from latex.ltx

\def\usecounter#1{\@nmbrlisttrue\def\@listctr{#1}\setcounter{#1}\z@}


i.e. \setcounter{#1}{0} effectively.

The following code uses a dummy counter mybibstartvalue and sets the enumiv counter after \usecounter{enumiv} using a patch.

However, this code is only meant for article.cls.

\documentclass{article}

\usepackage{xpatch}

\newcounter{mybibstartvalue}
\setcounter{mybibstartvalue}{9}

\xpatchcmd{\thebibliography}{%
\usecounter{enumiv}%
}{%
\usecounter{enumiv}%
\setcounter{enumiv}{\value{mybibstartvalue}}%
}{}{}

\begin{document}

\cite{Lam94}

\cite{GSM97}

\bibliography{biblio}
\bibliographystyle{unsrt}

\end{document}


• thanks for this elegant answer! – Libavius Oct 16 at 12:24