9

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}
Fabio Lamanna
  • 233
  • 1
  • 3
  • 8
  • 2
    Try \setcounter{enumiv}{9}, at least enumiv is the counter used by the article.cls version of \thebibliography for the numbering –  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

2 Answers2

7

\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
            \advance\leftmargin\labelsep
            \@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}

enter image description here

1

Taken from: https://latex.org/forum/viewtopic.php?t=15487

\begin{document}

\let\oldthebibliography=\thebibliography \let\oldendthebibliography=\endthebibliography \renewenvironment{thebibliography}[1]{ \oldthebibliography{#1} \setcounter{enumiv}{9} % Start reference from [10] }{\oldendthebibliography}

\end{document}

Nirmal
  • 121