(Answer adapted from Printing only one bib file. Thanks to @moewe for the original answer and @Ulrike Fischer for pointing it to me.)
One solution is:
- Add a keyword to each entry coming from a given file
- Filter on this keyword when printing the bibliography
This solution requires biber
and won't work with a plain bibtex
.
A complete example:
\documentclass{article}
\usepackage{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}
\usepackage{hyperref}
\begin{filecontents*}{self.bib}
@book{mine1,
author = {Myself},
title = {My first paper},
}
@book{mine2,
author = {Myself and My Coauthor},
title = {My second paper},
}
\end{filecontents*}
\begin{filecontents*}{external.bib}
@online{Dijk:Numbering,
author = {Edsger W. Dijkstra},
title = {Why numbering should start at zero},
editor = {Kevin Hely},
date = {1982-08-11},
url = {https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html},
urldate = {2013-08-19},
gender = {sm},
keywords = {numbering},
}
@book{priest:IntNonClassLogic,
title = {An Introduction to Non-Classical Logic},
subtitle = {From If to Is},
author = {Graham Priest},
edition = {2},
year = {2012},
isbn = {978-0-521-67026-5},
publisher = {Cambridge University Press},
location = {Cambridge},
}
\end{filecontents*}
\addbibresource{self.bib}
\addbibresource{external.bib}
% Add the keyword "self" to everything coming from self.bib.
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{
\perdatasource{self.bib}
\step[fieldset=keywords, fieldvalue={,self}, append]
}
}
}
\begin{document}
I wrote several papers like \cite{mine1} and \cite{mine2} and other
people did too \cite{Dijk:Numbering,priest:IntNonClassLogic}.
% Disable automatic title for \printbibliography, we'll display it
% ourselves.
\defbibheading{bibliography}[\refname]{}
\section{List of publications}
\printbibliography[keyword={self}]
\section{External bibliography}
\printbibliography[notkeyword={self}]
\end{document}
The resulting PDF file: