3

I have an extensive list of references(mostly journal articles) exported from Mendeley to a .bib file automatically.

The issue that I have currently is the IEEE style uses sentence case and thus I lose capitalisation of my acronyms in my title. Considering the following example,

@article{Paik2007,
author = {Paik, Bu Geun and Kim, Jin and Park, Young Ha and Kim, Ki Sup and Yu, Kwon Kyu},
doi = {10.1016/j.oceaneng.2005.11.022},
isbn = {00298018},
issn = {00298018},
journal = {Ocean Engineering},
keywords = {Convection velocity,Phase-averaging,Propeller wake,Swirling strength,Tip vortex,Trailing vorticity,Two-frame PIV},
mendeley-groups = {Msc Research},
pages = {594--604},
title = {Analysis of Wake Behind a Rotating Propeller using PIV Technique in a Cavitation Tunnel},
url = {http://202.114.89.60/resource/pdf/679.pdf},
volume = {34},
year = {2007}
}

I use the following settings for biblatex

\usepackage[url=false,        % Ignore url field
            backend=biber,    % Not bibtex
            sorting=none,     % Order of appearence in text
            bibencoding=utf8, % For those special characters
            maxbibnames=10,   % Use et all only for more than 10
            style  =numeric-comp]{biblatex}

With the biblatex style set to ieee, the title is produced as

Analysis of wake behind a rotating propeller using piv technique in a cavitation tunnel

I'd like the title to be represented as

Analysis of wake behind a rotating propeller using PIV technique in a cavitation tunnel

If I change the style to numeric-comp, I then get the title field as an exact representation of the the bib file, but the bib file isn't of a uniform standard. Some journals follow sentence case, while others don't.

I do know that I can manually edit the bib file and wrap all acronyms in {} to preserve the case, but is there a smarter way of automatically maintaining the case if there are two or more subsequent uppercase letters in the title?

7
  • 1
    Tada: BibTeX loses capitals when creating .bbl file. You want something like title = {Analysis of Wake Behind a Rotating Propeller using {PIV} Technique in a Cavitation Tunnel},
    – moewe
    Apr 11, 2015 at 13:20
  • Is it really burdensome to edit the title fields of a few bibliographic entries by hand, to prevent certain uppercase letters from being lowercased?
    – Mico
    Apr 11, 2015 at 13:24
  • 1
    Besides the case of multi-letter acronyms, there are potentially many other situations where uppercase letters must be preserved. Proper names of people, names of corporations, place names, names of countries, and various standing expressions -- e.g., "The Great Depression and the Great Recession" -- can (and do) all occur in title fields. How will a script ever be able to catch all of these cases?
    – Mico
    Apr 11, 2015 at 13:30
  • 3
    If the rule is just 'anything with two or more consecutive uppercase letters', t could be done with sed or awk (though I don't use the latter). That said, a bibliography file is one of the places where manual human intervention is often called for. Invest the time (even if not for this task) to cultivate a good and compliant bibliography. Most data sucked up from other sources is defective in subtle and non-so-subtle ways....
    – jon
    Apr 11, 2015 at 14:58
  • 1
    I notice that one of the tags is biber but are you actually biber or are you still using bibtex. Using biber should respect the capitalisation of your fields.
    – ArTourter
    Apr 11, 2015 at 15:05

1 Answer 1

6

I wholeheartedly agree with jon that a bibliography file is something a lot of thoughts and manual labour should go into to make sure the information is as accurate as possible; there are so many subtleties and corner cases that a script or other automation cannot catch. I also agree fully with his advice

Invest the time (even if not for this task) to cultivate a good and compliant bibliography. Most data sucked up from other sources is defective in subtle and non-so-subtle ways....

That said, it is possible to protect acronyms with curly braces using Biber's sourcemapping and Regex

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
       \step[fieldsource=title, match=\regexp{\b([A-Z]{2,})\b}, replace={{}{$1}}]
    }
  }
}

This will match all groups of two or more uppercase letters surrounded by word breaks (spaces, newlines and the like) and wrap them in curly braces (for some reason the empty group is needed for this to work, heaven knows why).

MWE

\documentclass[american]{article}
\usepackage{babel}
\usepackage[style=ieee, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Paik2007,
author = {Paik, Bu Geun and Kim, Jin and Park, Young Ha and Kim, Ki Sup and Yu, Kwon Kyu},
doi = {10.1016/j.oceaneng.2005.11.022},
journal = {Ocean Engineering},
pages = {594--604},
title = {Analysis of Wake Behind a Rotating Propeller using PIV and CIV Technique in a Cavitation Tunnel},
url = {http://202.114.89.60/resource/pdf/679.pdf},
volume = {34},
year = {2007}
}
@article{un,
author = {Ban Ki-moon},
journal = {Ocean Engineering},
title = {I Quite like the UN},
year = {2007}
}
@article{faq,
author = {Anne Uthor},
journal = {Ocean Engineering},
title = {FAQ and Other Questions Answered},
year = {2007}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
       \step[fieldsource=title, match=\regexp{\b([A-Z]{2,})\b}, replace={{}{$1}}]
    }
  }
}

\begin{document}
\nocite{*}


\printbibliography
\end{document}

enter image description here


Bonus,

sed "s/\([A-Z]\{2,\}\)/{\1}/g" <file>

should do the same thing as sed script.

2
  • I agree that the Bibliography needs attention to detail, but as Mendeley overwrites instead of appending each time I add a new paper, this will save me quite some time during the draft stages of my thesis. PS: A. Uthor = winning!
    – Ash
    Apr 11, 2015 at 18:33
  • @Ash You could make sure that Mendeley automatically exports the correct format (i.e. with curly braces around acronyms and other words in need of protection), I have no idea how to do that though. This is one of the reasons I'm wary of these bibliography managers.
    – moewe
    Apr 11, 2015 at 19:06

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.