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].