10

With biblatex you can split a bibliography based on keywords using

\printbibliography[keywords=mykeyword]  

as documented in Sectioning bibliography by type of referred 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?

10

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

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
       \step[fieldsource=mendeley-tags, fieldtarget=keywords]
    }
  }
}
  • 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
5

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>
  • 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
  • 1
    @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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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