1

Is it possible with biber to convert

@misc{example,
  month = {04},
}

to

@misc{example,
  month = apr,
}

in which apr is a BibTeX macro?

I am aware of the mapping facilities, but the closest I can currently get, using

<map_step map_field_source="MONTH" map_match="04" map_replace="apr" />

is

@misc{example,
  month = {apr},
}
2

You can try the option --nostdmacros on an earlier run to stop biber defining these macros internally in first place? If this doesn't work, I will address this in the biber dev version as this biblatex -> bibtex conversion is quite important.

There is a new option in 1.7 (currently in dev folder on SourceForge) called --tool_macro_fields which can be set to a csv list of fields to output without quoting (that is, their value is a bibtex macro). You will need biblatex 2.6. See the biber help output or the PDF manual.

So, in your case, you'll call biber like this:

biber --tool --tool_resolve --tool_macro_fields=month -g <conf> file.bib
  • I am unclear on what you mean exactly. I start from a bibliography in biblatex format, with DATEs actually, which I can straightforwardly convert to YEAR and MONTH, in the form of my initial example. So I never had the BibTeX format of my second example. – equaeghe May 21 '13 at 7:31
  • 1
    Ah, ok. I was wondering if you had ever had them in the macro form to begin with. I'll look into this shortly as an enhancement. – PLK May 21 '13 at 9:39
  • Updated answer with new option in 1.7 – PLK May 21 '13 at 14:15
  • Using --tool_macro_fields=MONTH in the last (of three) biber --tool runs does what I want. Thanks! (N.B.: I used biber from the git dev branch, as provided by a Gentoo live ebuild.) – equaeghe May 23 '13 at 11:11

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.