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.

So I'm trying to get \DeclareSourcemap working according to the biblatex manual. Here's my code:

\RequirePackage{filecontents}
\begin{filecontents*}{p.bib}
  @article{A1,
  author={Aa, A and Bb, B},
  title={Title},
  abstract={abs},
  journal={J BS},
  year={1999},
  }
  @conference{A2,
  author={Aa, A and Ab, S},
  title={Title},
  abstract={abs},
  journal={J BS},
  year={2009},
  }
\end{filecontents*}
\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\addbibresource{p.bib}
\DeclareSourcemap{
  \maps[datatype=bibtex,overwrite]{
    \map{
      \step[fieldsource=title]
      \step[fieldset=title, fieldvalue=Test]
}}}    
\begin{document}
\textcite{A1,A2}
\printbibliography
\end{document}

Running this through latex/biber doesn't change the title field to 'Test'. In the .bcf file, the sourcemap rules are created, here is a relevant snippet:

<!-- SOURCEMAP -->
<bcf:sourcemap>
  <bcf:maps datatype="bibtex" map_overwrite="1">
    <bcf:map>
      <bcf:map_step map_field_source="title"/>
      <bcf:map_step map_field_set="title" map_field_value="Test"/>
    </bcf:map>
  </bcf:maps>
  <bcf:maps datatype="bibtex" driver_defaults="1">
    <bcf:map>
      <bcf:map_step map_type_source="conference" map_type_target="inproceedings"/>
      <bcf:map_step map_type_source="electronic" map_type_target="online"/>
      <bcf:map_step map_type_source="www" map_type_target="online"/>
  […]

It seems my additional block does not get processed because there is another maps block for bibtex (And this does get processed, as it changes @conference to @inproceedings)? If I copy the map block into biber.conf, it works as expected. So here is my question: How do I use \DeclareSourcemap correctly ensuring that the map gets executed, independent of possible other blocks?

share|improve this question

closed as too localized by lockstep, Stefan Kottwitz Oct 18 '12 at 12:22

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Strange, your example works for me and changes the titles as expected. You don't need the \step[fieldsource=title] line by the way, it isn't doing anything in your example. –  PLK Oct 8 '12 at 9:27
    
Since the example works and the problem was not updated, the question will be closed as too localized. It can be reopened if further information would be provided in the question. –  Stefan Kottwitz Oct 18 '12 at 12:21

Browse other questions tagged or ask your own question.