Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm looking to change the actual entry in a .bib file, NOT the bibliography.

For instance I have

@{key1, author = {Last1, First and Last2, Second ...}

Instead, I want a .bib file that is written as,

@{key1, author = {Last1, F. and Last2, S. ...}

I don't want to go the whole regular expression approach. Is there a program that simply allows you to export the .bib file that way?

share|improve this question
4  
might be a silly question, but why would you want to do that since the bibliography format will do that for you when compiled into your document? – ArTourter Apr 12 '12 at 1:20
I knew someone would ask that :p. I have a web application where I'm trying to create a database and it needs to accept data in that form. Since a lot of bib entries come in without the full name, I figure it's just easier to use only the first initial. – dchandler Apr 12 '12 at 2:47
@dchandler I cannot answer you, just a small comment: It's better so say exactly why you need to do something, because it's 99.9% sure that someone will ask you for it, especially when your question is kind of "strange". See XY Problem ;) – tohecz Apr 12 '12 at 9:15
and, please, provide a .bib file with 2 or 3 entries exactly as you format them. The full bib grammar is really complicated and it's impossible to do conversions in it using regular expressions since the language is not regular, but context-free. However, I'm sure that you use only small parts of the grammar and then it should be quite easy to do this conversion by a REGEX. – tohecz Apr 12 '12 at 9:19
I think this question is off topic because it has no direct relation to latex. you want to modify a simple text file. – Marco Daniel Apr 14 '12 at 15:57
show 2 more comments

closed as off topic by Marco Daniel, Joseph Wright Apr 14 '12 at 16:06

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.