13

Background: I have all bibliographic entries in one giant .bib file. In my CV, I'd like to have a section that lists all my articles and another section that lists all my conference presentations. My current approach is this: I tag my own entries with the keyword "own" and then use biblatex:

\printbibliography[type=article,keyword=own,heading="Articles"]
\printbibliography[type=inproceedings,keyword=own,heading="Conference Presentations"]

This approach has two drawbacks. First, I have to tag all my entries and it happened that I missed some. Second, I have to nocite all my entries, which is another great opportunity to make mistakes.

The first problem can be addressed using bib2bib, which allows me to extract my own articles from the big .bib file by specifying a filter for the author field. However, I was wondering if there is a simpler solution using only tools within LaTeX. \printbibliography already seems to have some filtering facility but from reading the manual I couldn't figure out how to filter entries based on the values of their fields.

7
  • The filtering is not explained in detail in the manual but we have some nice answers here already, does this answer cover you question?
    – Alexander
    Jul 28, 2013 at 9:58
  • Thanks, Alex, that answers the first part. The second part about the nociting is still open.
    – tmalsburg
    Jul 28, 2013 at 12:26
  • @tmalsburg In that post you should use PLK's answer, which is pretty much the same as Henrique's below. If you insist on using BibTeX, the question links to a solution. For citing, why not just use \nocite{*}?
    – Audrey
    Jul 28, 2013 at 15:48
  • I'm sorry for the incomplete and redundant answer; since PLK's previous answer to another question already answer the first requirement (as pointed by Alexander and Audrey), I'm deleting my answer.
    – henrique
    Jul 29, 2013 at 0:24
  • @Audrey I can't use \nocite{*} because the same document also contains a list of other references at the end (it's one document that contains my CV in one section and a research proposal in another section). If I would nocite everything, the final list of references would include all entries in my database.
    – tmalsburg
    Jul 29, 2013 at 11:52

2 Answers 2

13

You could use regexp to map a keyword = {own}, field to all entries with a given pattern in author field via \DelclareSourcemap, as shown in PLK's answer to biblatex: separating publications of a specific author in the bibliography (there's also an example in the documentation that adds a keyword to every entry with a given title, check §4.5.2.). Something like:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=author,
            match=Kant,
            final]
      \step[fieldset=keywords, fieldvalue=own]
    }
  }
}

After this, you could use \printbibliography[keyword={own}] within a refsection environment in order to have all entries marked with your keyword (called via \nocite{*}) printed, like shown in Marco Daniel's answer to the same question:

\begin{refsection}
\nocite{*}
\printbibliography[keyword=own,title={These are my Works}]
\end{refsection}

Here's a MWE

\documentclass{article}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=author,
            match=Kant,
            final]
      \step[fieldset=keywords, fieldvalue=own]
    }
  }
}
\begin{document}
\null\vfill
\thispagestyle{empty}
Hi, I'm Kant.
\autocites{knuth:ct,knuth:ct:a,companion}
\begin{refsection}
\nocite{*}
\printbibliography[keyword=own,title={These are my Works}]
\end{refsection}
\printbibliography[notkeyword=own,title={These are awesome works by other people I like}]
\end{document}

mwe

* Edit: I have removed the \regexp from match=Kant inside the \DeclareSourceMap since it's not needed.

1
  • 1
    I used this solution but with two modifications: 1.) I used \map[overwrite=true] because otherwise entries that already have keywords are ignored. 2.) I didn't replace the pre-existing keywords with own but appended own to the list of keywords. This can be done with the following command: \step[fieldset=keywords, fieldvalue={, own}, append] This was necessary because I also use other keywords to select the relevant entries. Thanks for providing me with a solution!
    – tmalsburg
    Jul 30, 2013 at 11:43
0

I experienced a similar problem like tmalsburg with the current EXPORT function for the .bib file of CITAVI.

The issue is CITAVE generally uses a ";" as a separator while LATEX uses a ","

so if you EXPORT from CITAVI the keywordlines in the .bib look like:

 keywords = {Result CV;wearable},

But what you would need is:

 keywords = {Result CV,wearable},

So with the direct export result you can select the keyword "Result CV;wearable" in latex then it prints you the respective reference... so it sees this as one keyword...

I haven't found a solution in citavi to change this, but will report the issue to them.

The best solution I could give at the moment is:

Assign your keywords in Citavi

Export .bib file from Citavi

Open the .bib file with notepad++ and in the replace function do the following

Find what: ^(.*keywords.*);

Replace with:$1,

Run repeatedly until you get 0 occurrences.

2
  • Welcome to TeX.SE!
    – Mensch
    Aug 9, 2023 at 17:20
  • the separator can be changed: the export definition in Citavi can be configured to suit your needs. Go to File > Export > BibTeX and click on the blue "Edit BibTeX export definition..." First you can define the mapping of the reference types, then you can define the fields for each reference type, and in the third window, you can define the "Keyword separator" Replace the ";" by a comma, here and click "Next". Save the BibTeX export definition by giving it a name, "BibTeX [comma between keywords]. You do not need to save the "export preset" in the next window.
    – egninge
    Aug 11, 2023 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .