4

I have downloaded and using a package from Elsevier. To cite a reference I export a .bib from Web of Science in the following format. Deliberately I changed "absolute" to "ABsolute" to test whether second capital letter will be corrected or not. I realized that if a pair of single curly braces {} or double quotation marks "" were used the correction was made but in case of double curly braces {{}} it was not. I do not want to make changes in the format after copying .bib due to ease of copying from Web of Science. Is there a way to solve this problem?

Case 1:

@article{ Label,
  title = {ABsolute}
}

Case 2:

@article{ Label,
  title = "ABsolute"
}

Case 3:

@article{ Label,
  title = {{ABsolute}}      
}

Output:

Case 1: Absolute

Case 2: Absolute

Case 3: ABsolute

Edit 1: Unfortunately, Web of Science provides title in upper cases.

Edit 2: To clarify, I have no other way to avoid double curly braces. Is there a way to still use double curly braces but make Latex to decapitalize as in the cases of 1 and 2.

Edit 3: The same problem is explained here. But it is said to avoid double curly braces which is not possible for me.

Edit 4: Below is what someone from Web of Science wrote to me:

According to our software development engineers, we need to keep these double braces within the BibTex export syntax, a full explanation of which is provided below.

  1. The outer braces are simply quote marks. In other words, in BibTeX this:

title = {Getting cold feet}

means exactly the same as this:

title = "Getting cold feet"

  1. The additional inner braces prevent BibTeX from adjusting the capitalization of the letters within them. They are used in many common cases where the choice of placement directly affects the output of data, as illustrated below with this made-up example article title:

"AIDS in Sub-Saharan Africa"

Here are some examples of capitalization schemes that BibTeX might be asked to apply:

  1. AIDS in Sub-Saharan Africa (same as above - with only short prepositions and some other special words in lower case)
  2. AIDS in sub-Saharan Africa (all but proper nouns and acronyms in lower case, reputedly common usage in Europe)
  3. AIDS In Sub-Saharan Africa (all words capitalized - a possible default to cover difficult cases)
  4. AIDS IN SUB-SAHARAN AFRICA (all letters capitalized - some notable journals do require this)

The inner braces are used to mark letters and words whose capitalization is significant, like this:

title = {{AIDS} in sub-{S}aharan {A}frica}

If we simply omit the inner braces, the styles 2 and 3 above, one or both of which are reputedly very common in European usage, may be interpreted as something like this:

  1. Aids in sub-saharan africa
  2. Aids In Sub-saharan Africa

Web of Science output would not be able to place the inner braces automatically, consistently, and correctly on the basis of the databases that we use and in a manner that would satisfy everyone. Therefore our current implementation forces BibTeX to present the only capitalization that we know is more-or-less correct, which is the exact capitalization of the data that is actually present within the databases. For the above example, it means we output the data like this (hence the reason for the double braces):

title = {{AIDS in sub-Saharan Africa}}

A researcher who needs a different capitalization could perhaps inspect the capitalization that we provide, or possibly the item to which it refers, and then make an informed judgment about where they feel the inner braces actually belong. In our example already displayed above, the inner braces might be considered to belong in the following locations:

title = {{AIDS} in sub-{S}aharan {A}frica}

  • 2
    I don't understand the question. You made changes deliberately just to see whether they would be incorporated using changes in your input? If you don't want to make change, then don't. I'm not sure what you want to correct (or solve) here... – Werner Feb 19 '16 at 18:57
  • 2
    ...by the way, the behaviour of BibTeX in your example is accurate, as using braces are synonymous to using quotes. Additionally, bracing content within the exterior delimitation (either via ".." or {..}) prohibits any automated (de)capitalization. – Werner Feb 19 '16 at 18:59
  • 2
    What is the question? – Mico Feb 19 '16 at 19:05
  • So you download Web of Science BibTeX titles and they are provided with double braces and all capital letters in the title field? – Werner Feb 19 '16 at 19:37
  • 1
    Script it. Just write a shell script (or whatever you prefer) to parse the entries after download. Just be aware that you'll probably have to tweak periodically as the export algorithm gets modified and produces entries containing different varieties of problems. – cfr Feb 20 '16 at 0:08
2

As you noted yourself double curly braces prevent the case changing function to change the wrapped text. This is intended bahviour and and actually quite useful as BibTeX loses capitals when creating .bbl file demonstrates. This behaviour is well known and documented (see for example Designing BibTeX Styles: change.case$ on p. 5 and BibTeX Tips and FAQ: Q5)

If your software exports doubly-braced fields that should not be case-protected then that should be considered a sub-par design decision.

It is however quite hard to do the needed capitalisation protection automatically. So software that wishes to not involve the user in this is often either left with the option of not protecting anything at all (i.e. use only single braces and hope that the case changing algorithm doesn't do too much harm) or to protect the entire title (with double braces, thus rendering the case changing algorithm useless; the plus is that the title is always displayed as given in the software which probably leads to less complaints by users).

I believe that doubly bracing the entire field is never a good idea, curly braces should be added only around certain words that must never lose their capitalisation. That is still best done manually. The software is seriously broken if it adds double curly braces to the DOI field (as you mention in your comment), since biblatex will think the inner pair of braces form part of the DOI.

With Biber there is a way to remove the unnecessary outer pair of braces

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

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.