1

In my document's appendix, I refer to some previously used and some new references. Hence, I need to have a separate bibliography for the appendix section, in which only new references are listed. However, the numbering must continue from the main bibliography.

Here is a MWE:

\documentclass{article}
\usepackage{filecontents}

\begin{filecontents}{myrefs.bib}
    @Book{Knuth:90,
        author    = {Knuth, Donald E.},
        title     = {The {\TeX}book},
        year      = {1990},
        publisher = {Addison\,\textendash\,Wesley},
    }
    @Book{Lamport:94,
        author    = {Lamport, Leslie},
        title     = {\LaTeX: A Document Preparation System},
        year      = {1994},
        publisher = {Addison\,\textendash\,Wesley},
    }
\end{filecontents}

\begin{document}
    \section{Main Section}
        The first ref \cite{Knuth:90} is cited in the main text.    
        \bibliographystyle{ieeetr}
        \bibliography{myrefs}

    \section{Appendix}
        The first \cite{Knuth:90} and the second \cite{Lamport:94} are both cited in the appendix.
        \bibliographystyle{ieeetr}
        \bibliography{myrefs}       
\end{document}

I need ref [Knuth:90] to only show up in Main Ref list and numbered as [1], and ref [Lamport:94] to only show up in the Appendix Ref list and numbered as [2].

Salman
  • 299

1 Answers1

1

Here is what I did to solve this problem. It is not the cleanest solution, but it does work!

I put the bibtiems for the main and appendix sections at the end of each section, and changed the starting number for the appendix refs. See this link regarding the starting number: Change bibliography starting number

Here is the code:

\documentclass{article}

\begin{document}
    \section{Main Section}
        The first ref \cite{Knuth:90} is cited in the main text.    

    \renewcommand\refname{Main References}
    \begin{thebibliography}{1}
        \bibitem{Knuth:90}
        D.~E. Knuth, {\em The {\TeX}book}.
        \newblock Addison\,\textendash\,Wesley, 1990.
    \end{thebibliography}

    \section{Appendix}
        The first \cite{Knuth:90} and the second \cite{Lamport:94} are both cited in the appendix.     

    \renewcommand\refname{Appendix References}
    \begin{thebibliography}{1}
        \makeatletter
        \addtocounter{\@listctr}{1}
        \makeatother

        \bibitem{Lamport:94}
        L.~Lamport, {\em \LaTeX: A Document Preparation System}.
        \newblock Addison\,\textendash\,Wesley, 1994.
    \end{thebibliography}

\end{document}
Salman
  • 299