Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing a document in which I want to distinguish between my own references and others'. (I am using biblatex.) I'd like to make the distinction as follows: My own citations use the classical \cite command (and therefore are printed where the \printbibliography appears) while other references are cited using \footfullcite and appear as footnotes. Yet, doing just this, all references including the \footfullcite'd ones are printed by \printbibliography. How may I automatically make a distinction between the two kinds of references, namely \cite'd vers \footfullcite'd ones?

[EDIT]
Just a clarification: What I am looking for is to distinguish between my papers (= I am one of the authors) and the other papers. I think in my case we can use three possibilities to make the distinction:

  • My papers and papers of others are in separate .bib files;
  • I am an author of my papers (ok, you could have guessed ;-));
  • I cite my papers using \cite and other papers using \footfullcite.

I originally thought the last point was the easiest to use, but I may be wrong.
[/EDIT]

Here is an example:

\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
Reference A01 should appear in a "References" section~\cite{A01}.

Reference C03 should only appear as a footnote~\footfullcite{C03}.

Reference B02 should'nt appear anywhere.

\printbibliography
\end{document}

I am aware of the \AtEveryCitekey command, but it does not seem to help me here since it does not distinguish between the different citation commands.

share|improve this question
    
I think there's some way to set up something like \defbibcheck{self}, where those works in which your name is not in the list of authors get the \skipentry command passed to them (and your bibliography would then be called by \printbibliography[check=self]), but I can't figure out how to make it work. –  James Clawson Mar 27 '13 at 16:01

2 Answers 2

up vote 5 down vote accepted

First, declare the new category in your preamble before redefining the \cite command to automate the categorizing:

\DeclareBibliographyCategory{references}
\DeclareCiteCommand{\cite}
    {\usebibmacro{prenote}}
    {\addtocategory{references}{\thefield{entrykey}}\usebibmacro{citeindex}%
    \usebibmacro{cite}}
    {\multicitedelim}
    {\usebibmacro{postnote}}

Then call the bibliography like this:

\printbibliography[category=references]

Below is the full document, which works for me. I had to base my redefinition on something, so I went with authoryear, but it should work as well in other scenarios:

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
    author = {Author, A.},
    year = {2001},
    title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
    year = {2002},
    title = {Bravo},
}
@misc{C03,
    author = {Cuthor, C.},
    year = {2003},
    title = {Charlie},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareBibliographyCategory{references}

\DeclareCiteCommand{\cite}
    {\usebibmacro{prenote}}
    {\addtocategory{references}{\thefield{entrykey}}\usebibmacro{citeindex}%
    \usebibmacro{cite}}
    {\multicitedelim}
    {\usebibmacro{postnote}}

\begin{document}
Reference A01 should appear in a ``References'' section~\cite{A01}.

Reference C03 should only appear as a footnote~\footfullcite{C03}.

Reference B02 should'nt appear anywhere.

\printbibliography[category=references]
\end{document}
share|improve this answer
    
Works like a charm, thanks! –  Bruno Mar 27 '13 at 15:49

I'm not aware of a possibility to make biblatex distinguish between different used \cite commands. For the mentioned task of having different sources of references you could use "Bibliography Categories". Excerpt from the biblatex manual V2.5:

3.6.6 Bibliography Categories

Bibliography categories allow you to split the bibliography into multiple parts dedicated to different topics or different types of references, for example primary and secondary sources.

For your example you could add a category for external references in the preamble:

\DeclareBibliographyCategory{external}
\addtocategory{external}{C03}

Finally output the bibliography without the "external" references:

\printbibliography[notcategory=external]

Depending on the number of references in the categories you could either do it the other way around or perhaps use a keyword or filter which also can be given to narrow down bibliographies (see biblatex manual for \printbibliography).

share|improve this answer
    
Thanks for this answer. Manually adding the external references to a category works, but I was more thinking of an automation of this task. As for filters, I kind of remember that filtering by name of authors is not really easy to do, isn't it? –  Bruno Mar 27 '13 at 15:30
    
Depends on what you exactly want to do, perhaps automatically assigning keywords may solve the thing. Could you please update your question and be a bit more precise on what distinguishes "own" from "other" references (e.g. name of an author, entrytype, bibfile, ...) –  Quincy Mar 27 '13 at 15:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.