3

When downloading bibtex records from the web most databases list the journal entry with commas such as the following:

journal={Information Theory, IEEE Transactions on}

However in the references it needs to be listed without the comma in between, in this case "IEEE Transactions on Information Theory". Do we need to edit all of the journal entries by hand to remove the commas, or is there a particular bibtex command that can do it for us?

If the latter is the case, it would be very helpful working with a reference management system that downloads the records from the web.

4
  • 5
    I think that storing the wrong journal name is bad practice. – egreg Mar 11 '14 at 14:35
  • I agree with @egreg. Is there any context where you'd actually use "Information Theory, IEEE Transactions on"? If not, I'd be inclined to fix them in your .bib and forego any ongoing translations during bibtex processing. For what it's worth, when I get bibtex entries from online database, they almost always need some corrections or additions when I insert them into my .bib file. – Tyler Mar 11 '14 at 15:14
  • 1
    Keep in mind that if you are writing for an IEEE pub, you should review all the references and rewrite them to IEEE standards anyhow. This one should really be IEEE Trans. Inf. Theory. See IEEE Abbreviations for Transactions, Journals, Letters, and Magazines. – cslstr Mar 11 '14 at 15:47
  • Keep in mind that if you are writing for an IEEE pub, you should review all the references and rewrite them to IEEE standards anyhow. This one should really be IEEE Trans. Inf. Theory. See IEEE Abbreviations for Transactions, Journals, Letters, and Magazines. – cslstr Mar 11 '14 at 15:51
2

You can use a source map to do a search and replace. These takes regular expressions with bracket expressions (...) being assigned to $1, $2, ... The \s* collects any spaces. So search for

 \s*(.+),\s*(.+)

(which is spaces something=$1 comma spaces something=$2) and replacing with

 $2 $1

within the journal field is what you need.

Sample output

\documentclass{article}

\usepackage[backend=biber]{biblatex}
\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
     \step[fieldsource=journal,match=\regexp{\s*(.+),\s*(.+)},replace={$2 $1}]
}}}
\addbibresource{ref.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

with ref.bib:

@Article{Author:Title-One,
  author =   {Author, A.},
  title =    {Title One Title},
  journal =  {Information Theory, IEEE Transactions on},
  year =     2000
}

@Article{Author:Title-Three,
  author =   {Author, C.},
  title =    {Title Three Title},
  journal =  {Journal, Unknown},
  year =     2000
}

@Article{Author:Title-Two,
  author =   {Author, B.},
  title =    {Title Two Title},
  journal =  {Ord. J. Title},
  year =     2000
}

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.