[Tex/LaTex] Biblatex: How to insert dots into abbreviated journal names in bibliography

biblatexformattingjournal

For example: "Philos Trans R Soc" should become "Philos. Trans. R. Soc."

Best Answer

I prepared a solution using the new biber feature. Please update your biber to 0.9.6 first.

I prepared this minimal input file:

\documentclass{article}

\usepackage[backend=biber, style=numeric-comp]{biblatex}
\addbibresource{manuell.bib}

\begin{document}
\fullcite{Reynolds:1950p3730}
\end{document}

with this manuell.bib-file

@article{Reynolds:1950p3730,
author = {C. Reynolds and B. Serin and W. Wright and L. Nesbitt}, 
journal = {Philos Trans R Soc},
title = {Superconductivity of isotopes of mercury},
pages = {487},
volume = {78},
year = {1950}
}

LaTeX, biber, LaTeX leads to:

nobiberconf which is the unchanged output. Now, we use the biber regular expression matching to change the journal name to a new version with periods. The file named biber.conf has the following content:

<map>
  <bibtex>
  BMAP_OVERWRITE 1
    <globalfield journal>
      BMAP_MATCH Philos\sTrans\sR\sSoc
      BMAP_REPLACE "Philos. Trans. R. Soc."
       </globalfield>
       </bibtex>
</map>

It is explained in the biber manual section 3.1.1 The map option. Please note the regular expression \s to match a white space. After putting the biber.conf file in the actual directory, we get (LaTeX, biber, LaTeX):

withbiberconf which is the desired change. It is most likely not possible to do this fully automatic for all journals with one regular expression, because (cp. comment @Michael Palmer) CNS Drugs rev would become CNS Drugs. rev. if a period is simply added after every word.

Also note, the input file format will change in 0.9.7 and this solution has to be updated once the new version is out.

Quote @PLK:

The config file format will change for biber 0.9.7 as it was too restrictive.

taken from his answer to this question.

Here is the config file format for biber 0.9.8 and above:

<config>
  <sourcemap>
    <maps datatype="bibtex" map_overwrite="1">
      <map>
        <map_step
          map_field_source="journal"
          map_match="Philos\sTrans\sR\sSoc"
          map_replace="Philos. Trans. R. Soc." />
      </map>
    </maps>
  </sourcemap>
</config>
Related Question