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'm using biblatex and biber, and trying to modify the usual styles to include a field for the AMS MathReviews number. My BibTeX file (well, I guess it's a Biber file now) has mrnumber fields, and I've modified the relevant .bbx files, but when I run Biber, it doesn't do anything with the mrnumber field -- and so those never appear in the bibliography.

I manually modified the .bbl file (I put in \field{mrnumber}{123456}) and the MR number gets printed. So, in addition to modifying the .bbx files, how do I get Biber to pass the relevant fields into the .bbl file?

share|improve this question

2 Answers 2

up vote 10 down vote accepted

Good question. What you really need here is to be able to modify the biblatex internal data model which isn't currently possible directly. In fact, this is possible in biber but currently has no biblatex interface. This is planned for biblatex version 2.x.

However, you can work around this by re-mapping the "mrnumber" field into a supported biblatex field like "usera" and then using "usera" in your .bbx as the fieldname.

Put this in your biber.conf to perform the remapping (see biber manual, section 3.1.1):

<map>
  <bibtex>
    BMAP_OVERWRITE 1
    <globalfield>
      MRNUMBER USERA
    </globalfield>
  </bibtex>
</map>      

By the way, your .bib file is still a bibtex data file - biber has no data format of its own (yet ...). There is a distinction between bibtex the program and bibtex the data format. As of biblatex 2.x, bibtex the program will probably no longer be supported but the bibtex data format always will be.

EDIT: The config file format will change in Biber 0.9.8 because the current format is too restrictive. Mapping will be less confusing. Here is the same solution in the new format:

<config>
  <sourcemap>
    <maps datatype="bibtex" map_overwrite="1">
      <map>
        <map_step map_field_source="MRNUMBER" map_field_target="USERA"/>
      </map>
    </maps>
  </sourcemap>
</config>
share|improve this answer
    
"What you really need here is to be able to modify the biblatex internal data model which isn't currently possible directly." That's an unfortunate drawback of biblatex; even with BibTeX, I can work with new fields just by writing the appropriate stuff in a .bst file. Good to hear improvements are on the horizon. –  Dan Drake Sep 2 '11 at 9:21
    
"By the way, your .bib file is still a bibtex data file". Yes, I know. I called it a biber file simply because I'm using biber to process it, instead of BibTeX. :) –  Dan Drake Sep 2 '11 at 9:22
    
It's already implemented in biber that it can be passed the entire biblatex data model in the .bcf file. When there are biblatex macros to change this, you'll be able to pass a customised data model to biber and have it use that. The data model passed can have validation clauses defined too and so biber will be able to validate the data sources against the model. You can even try this now against the default model with the biber "--validate_structure" option. –  PLK Sep 2 '11 at 10:48
    
Your solution works, btw. Oh, and offtopic: the Zotero data source is very intriguing. Haven't tried to use it, but I would love to forget about .bib files and just point Biber to my Zotero directory. (Although Zotero has its own troubles with data models, though...) –  Dan Drake Sep 2 '11 at 11:02
    
The Zotero support is (probably very) beta and is limited to the exported RDFXML format at the moment. I will probably make a direct SQLite driver to read a Zotero db when Zotero implements static, user-defined citation keys. This is a major headache which people have been trying to get implemented for years in Zotero. The other problem, as you say, is the data model in Zotero which isn't tuned to typesetting (particularly names). To play with Zotero RDF/XML, you'll need to look at the default mapping .dcf file documentation for the Zotero driver, see the biber manual. –  PLK Sep 2 '11 at 11:20

With BibLaTeX 2.x it suffices to add the following lines to your biblatex-dm.cfg:

\DeclareDatamodelFields[type=field,datatype=literal,nullok=false]{mrnumber}
\DeclareDatamodelEntryfields[article,book]{mrnumber}
share|improve this answer

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.