BibTeX, biblatex and biberHow to lowercase capitals automatically?

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
daantje
Posts: 11
Joined: Wed Aug 12, 2009 1:22 pm

How to lowercase capitals automatically?

Post by daantje »

Hi everybody,

I am using the natbib package together with an ecology.bst style file for my references. Some of the older entries in my BiBTeX database (the entries of which were all downloaded from Web of Science) have author, title and journal name in all-capitals. Is there a way to downcase these automatically when I cite them?

Here's an example entry from my database:

@Article{ ISI:A1985ABU3900006,
Author = "GJ BUTLER and GSK WOLKOWICZ",
Title = "{A MATHEMATICAL-MODEL OF THE CHEMOSTAT WITH A GENERAL-CLASS OF FUNCTIONS DESCRIBING NUTRIENT-UPTAKE}",
Journal = "{SIAM JOURNAL ON APPLIED MATHEMATICS}",
Year = "{1985}",
Volume = "{45}",
Number = "{1}",
Pages = "{138--151}",
ISSN = "{0036-1399}",
Unique-ID = "{ISI:A1985ABU3900006}"
}

Thanks!
Last edited by daantje on Wed Sep 09, 2009 8:16 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: How to lowercase capitals automatically?

Post by josephwright »

This can be done using the BibTeX style but in general I'd probably prefer to clean things up at the database level. Tools such as JabRef can do case changing for the database, which can then be checked.
Joseph Wright
daantje
Posts: 11
Joined: Wed Aug 12, 2009 1:22 pm

Re: How to lowercase capitals automatically?

Post by daantje »

Thanks for your advice, Jospeh.

How do I get JabRef to change the case?
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

How to lowercase capitals automatically?

Post by kaiserkarl13 »

If you have access to VIM (any GNU/Linux computer should have it, and you can download it for Windows-based machines), you can try the following search and replace (which replaces all words with title case):

Code: Select all

:%s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g
(code ripped off from http://vim.wikia.com/wiki/Switching_case_of_characters)

This will, however, change your cite keys to title case as well. If you want the substitution to occur only on the current line, omit the % sign. You can then run the command per line (a . repeats the last command).
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

How to lowercase capitals automatically?

Post by josephwright »

daantje wrote:Thanks for your advice, Jospeh.

How do I get JabRef to change the case?
In JabRef, you can right-click on a field and choose Change Case, then the change to make.
Joseph Wright
daantje
Posts: 11
Joined: Wed Aug 12, 2009 1:22 pm

How to lowercase capitals automatically?

Post by daantje »

Thanks kaiserkarl13 and Joseph. Changing the entries in the .bib database file seems like quite a bit of work either way, and I would prefer it if I can be done by the ecology.bst style file I am using (downloaded from bst.maururu.net). I am now using JabRef to manage my BiBTeX database (before I used KBiBTeX), and the entry above has changed to

Code: Select all

@ARTICLE{ISI:A1985ABU3900006,
  author = {GJ BUTLER and GSK WOLKOWICZ},
  title = {A MATHEMATICAL-MODEL OF THE CHEMOSTAT WITH A GENERAL-CLASS OF FUNCTIONS
	DESCRIBING NUTRIENT-UPTAKE},
  journal = {SIAM JOURNAL ON APPLIED MATHEMATICS},
  year = {1985},
  volume = {45},
  pages = {138--151},
  number = {1},
  issn = {0036-1399},
  unique-id = {ISI:A1985ABU3900006}
}
In my compiled LaTeX document I still get capitals:

BUTLER, G., and G. WOLKOWICZ. 1985. A MATHEMATICAL-MODEL OF THE CHEMOSTAT WITH A GENERAL-CLASS OF FUNCTIONS DESCRIBING NUTRIENT-UPTAKE. SIAM JOURNAL ON APPLIED

Also, the initials of the authors are improperly abbreviated. There's no way for the computer to know whether it is dealing with initials or a full name, so I guess hand work is inevitable. I'll change case by hand.

Still I would like to know how downcase automatically. I think the ecology.bst has this capability, because my colleague says it has and because the file contains the text "change.case".
Post Reply