Use a refsection
environment instead of refsegment
, then you can \nocite{*}
all bibliography entries without affection the main bibliography:
\documentclass{article}
\begin{filecontents*}{mybib.bib}
@ARTICLE{notminenotcited,
author = {Somebody Else},
title = {Not Mine -- Not Cited}
}
@ARTICLE{notminecited,
author = {Somebody Else},
title = {Not Mine -- Cited}
}
@ARTICLE{minenotcited,
author = {Me},
title = {Mine -- Not Cited},
keywords = {myPapers}
}
@ARTICLE{minecited,
author = {Me},
title = {Mine -- Cited},
keywords = {myPapers}
}
\end{filecontents*}
\usepackage[natbib=true, style=numeric-comp, backend=bibtex8,defernumbers, maxnames=99]{biblatex}
\bibliography{mybib}
\begin{document}
\cite{notminecited}, \cite{minecited}
\printbibliography
\appendix
\begin{refsection}
\nocite{*}
\printbibliography[keyword=myPapers,title={My papers}, prefixnumbers={P.}, heading=bibnumbered]
\end{refsection}
\end{document}
(The filecontents*
environment is for demonstration purposes only in order to create a self-contained MWE - you can delete it and use your own bibliography file, of course.)
Please note: In this configuration, biblatex
creates several auxiliary files, so you'll have to run bibtex8 <filename>.aux
and bibtex8 <filename>1-blx.aux
- information which commands to call can be found in the log file. (latexmk
can do all necessary compiling automatically - also with biblatex
.)
If you're using an older version of biblatex
(e.g. the one shipped with TeX Live 2010), you'll have to upgrade it to the latest version on CTAN, otherwise the example won't work as expected.
I didn't know how you want to handle the numbering of the entries in the bibliography - I used the defernumbers
package option in order to reset the numbers in the list of your own papers - like this, the numbering of the main bibliography and the appendix are completely independent, both start with [1]
(this might, however, cause some confusion).
The biblatex
manual states that \finentry
should used at the end of every entry. Applying this rule resolves the spacing issue. Another problem is that the keys in usera
aren't being treated as separate items in enumerate
. To fix this you can iterate on each key using \forcsvfield
.
Entries in the same set are printed in a similar manner; the command \entry{<precode>}{<postcode>}
executes <precode>
, the bibliography driver and then <postcode>
for each @set
entry. So an alternative using entry sets isn't obvious.
I've updated the answer to resolve some additional spacing issues and allow you to specify the author of "own papers" in the tex
file. The "cited by" entries and their print order still needs to be specified in the bib
file, unfortunately.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[defernumbers=true]{biblatex}
\usepackage{filecontents}
% Variants of each could be added
\newcommand{\firstinit}{D.~E.}
\newcommand{\firstname}{Donald~E.}
\newcommand{\lastname}{Knuth}
\begin{filecontents}{\jobname.bib}
@Book{knuth:new,
hyphenation = {american},
sortyear = {1984-0},
sorttitle = {Computers & Typesetting},
author = {Knuth, Donald E.},
title = {Computers \& Typesetting},
volumes = {5},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
date = {1984/1986},
usera = {companion,bertram,reese}}
\end{filecontents}
\addbibresource{\jobname.bib}
\bibliography{biblatex-examples}
\DeclareBibliographyCategory{byname}
\newcounter{bynamecount}
\setcounter{bynamecount}{0}
\DeclareIndexNameFormat{byname}{% Test could be refined
\ifboolexpr{ test {\ifdefstring{\lastname}{#1}}
and ( test {\ifdefstring{\firstname}{#3}}
or test {\ifdefstring{\firstinit}{#4}} ) }
{\addtocategory{byname}{\thefield{entrykey}}%
\addtocounter{bynamecount}{1}}
{}}
\defbibcheck{byname}{%
\indexnames[byname]{author}%
\ifcategory{byname}
{}
{\skipentry}}
\renewbibmacro*{finentry}{%
\finentry%
\ifbibliography
{\iffieldundef{usera}
{}
{\vskip\bibitemsep Cited by:
\begin{enumerate}
\forcsvfield{\itemcite}{usera}
\end{enumerate}}}
{}}
\newcommand*{\itemcite}[1]{\item \fullcite{#1}\finentry}
% Adjust horizontal spacing - necessary only when the initial
% labelnumbers of entries in byname are large
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\newlength{\maxlabelnumberwidth}
\settowidth{\maxlabelnumberwidth}{\mkbibbrackets{\arabic{bynamecount}}}
\defbibenvironment{byname}
{\list
{\printfield[labelnumberwidth]{labelnumber}}
{\setlength{\labelwidth}{\maxlabelnumberwidth}%
\setlength{\leftmargin}{\maxlabelnumberwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\begin{document}
\nocite{*}
\printbibliography[check=byname,env=byname]
\end{document}
Best Answer
OK. Here's an example (apologies for just ripping off part of my own bibliography, rather than coming up with witty fake bibliography items):
Unfortunately, it's not possible to sort different parts of the bibliography differently, although it will be possible soon.
If you want another category, just
\DeclareBibliographyCategory
and then\addtocategory
in the same way...