[Tex/LaTex] Two Bibliographies: one for main text and one for appendix

appendicesbibliographiesbibtexsubdividing

I have a manuscript in which has the following structure:

Main Text
Bibliography
Appendix

However, there are citations which are only cited in the appendix, and they show up in the main bibliography. I would like to split my Bibliography into two different sections, so that the structure of the paper would look like this:

Main Text
Bibliography for Main Text
Appendix
Bibliography for Appendix

I'm currently using bibtex and a single .bib file, and creating the bibliography with

\bibliographystyle {someBibStyleFile}
\bibliography {bibFileName}

I'm interested in a method to split my single bibliography into main bibliography and appendix bibliography with minimal changes to the rest of the document.
I'm aware that biblatex is more powerful than bibtex, but I'm not prepared to make the switch before the deadline of this project. There are many related bibliography-with-multiple-sections type of questions, but I didn't see one that covers this case.

Best Answer

Here's a solution with the biblatex package. The following shows how to do it. Make sure you run bibtex on all auxiliary files, all *[0-9]-blx.aux files.

\documentclass{article}

\usepackage{filecontents}
\usepackage{biblatex}

\begin{filecontents}{myrefs.bib}
@Book{Knuth:1990,
    author    = {Knuth, Donald E.},
    title     = {The {\TeX}book},
    year      = {1990},
    isbn      = {0-201-13447-0},
    publisher = {Addison\,\textendash\,Wesley},
}

@Book{Lamport:94,
    author    = {Lamport, Leslie},
    title     = {\LaTeX: A Document Preparation System},
    year      = {1994},
    isbn      = {0-021-52983-1},
    publisher = {Addison\,\textendash\,Wesley},
}
\end{filecontents}

\addbibresource{myrefs.bib}
\begin{document}

\section{First}
    {\LaTeX} is aTuring-complete
    (procedural) markup language and
    typesetting processor~\parencite{Lamport:94}.


\printbibliography
\appendix
\section{Second}
\begin{refsection}
   The ultimate reference of {\TeX} is~\parencite{Knuth:1990}.
\printbibliography[heading=subbibliography]
\end{refsection}

\end{document}

example output