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.

With biblatex you can split a bibliography based on keywords using

\printbibliography[keywords=mykeyword]  

as documented in Sectioning bibliography by type of refered item.

This seems to be hardwired to use the keywords field. Is there a way to divide the bibliography based on another field? Specifically, Mendeley inserts a mendeley-tags field that looks like:

mendeley-tags = {mytag1,mytag2,mytag3},

I have tried

\printbibliography[mendeley-tags=mytag3]

but that doesn't work.

Is there a way to set this up?

share|improve this question
    
Have a look at my edit of your question to see how marking text as a code sample works. Bascially, you have to insert an empty line before the code block. –  doncherry Aug 8 '12 at 13:12

2 Answers 2

up vote 8 down vote accepted

With biblatex 2+ and biber 1+, you can do this in your preamble:

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
       \step[fieldsource=mendeley-tags, fieldtarget=keywords]
    }
  }
}
share|improve this answer
    
That gives me an error: ! Package keyval Error: fieldsource {mendeley-tags} undefined. –  user8786 Aug 8 '12 at 14:37
    
I had a feeling my method was dated. Looks like it is time to read the BibLaTeX and Biber manuals again. –  StrongBad Aug 8 '12 at 14:41
    
It does work though, even if it gives an error! Thanks. –  user8786 Aug 8 '12 at 16:27
    
Try the editeed version - I don't think you need the braces I put in. –  PLK Aug 9 '12 at 8:35

This is probably a dated answer as I have not really explored the potentially new data model in Biber 1.1.

If you create a new .conf file for Biber you should be able to map mendeley-tags to keywords

<config>
  <sourcemap>
    <maps datatype="bibtex" map_overwrite="1">
      <map>
        <map_step map_field_source="mendeley-tags" map_field_target="keywords"/>
      </map>
    </maps>
  </sourcemap>
</config>
share|improve this answer
    
Thanks. Where would I put that .conf file so that biber see's it? –  user8786 Aug 8 '12 at 14:18
1  
@user8786 you can put the file wherever you want (within reason) and then you point biber at the file with the -g option: biber -g /path/to/myconf/file/myconf.conf –  StrongBad Aug 8 '12 at 14:38
    
@DanielE.Shub Your answer is still valid. PLK's answer just uses the new, convenient feature of specifying a source map in the document preamble instead of the configuration file. –  Audrey Aug 9 '12 at 16:28
    
Yes, in some ways this is better if you want this to always happen to any document - that's what the biber config file is for. –  PLK Sep 28 '12 at 20:10

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.