Take the 2-minute tour ×
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 am currently finalizing the bibliography of my thesis. I am using

\bibliographystyle{unsrtdin}
\bibliography{bibtex/library}

Now, my problem is that my Zotero library sometimes has the full first name of the authors and sometimes just the initials. This leads to an inconsistend bibliography. I don't feel that the right solution is to remove information from my Zotero library, so I would like to have BibTeX abbreviate all first names.

The style is not fixed, I only need unsrt behavior and included URLs, since I cite online resources. (That's why I use -din, the fact that some things are German is unde sired but not too critical.)

If Biber or other more sophisticated implementations simplify the solution: I tried to get it to work, but TeXlipse told me that \cite was undefined, so I gave it up, as I didnt see too many advantages in this case.

If all that is too complicated, I could still hack the Zotero translator for .bib export.

share|improve this question
1  
If the style ist't fixed maybe you could make a own bibtex style with makebst. It supports making first names into initials. –  Storm Feb 17 '13 at 11:00
    
I would not abbreviate the name of the authors. If you do abbreviate then somebody else may not be able to find the reference because of lack of information. You should make sure the name matches the exact name in the original reference. Sometimes online BibTeX entries are wrong: don't trust them; only trust the original reference. –  Marc van Dongen Feb 17 '13 at 12:28
1  
So you think it is not consistent to to have mixed abbreviated and unabbreviated names in the bibliography? I never thought about that, but it does not sound implausible. Can I read that somewhere? –  mcandril Feb 17 '13 at 14:17
    
If your question is for me, I do think it may look inconsistent but that's not relevant. What is important is that the information is consistent with the references. That's what the bibliography is for. Read Mary-Claire Van Leunen's A Handbook for Scholars if you want to learn more about preparing a bibliography. For example, Page 159: "It is an elementary courtesy to an author to give her name as it appears on her work." –  Marc van Dongen Feb 17 '13 at 16:59
    
Sorry, of course I wanted to write inconsistent. Yeah, you did make a point and I will go with that. Just needed a reference if anyone comments on this style. I think I will have a look at the whole book. Thanks. –  mcandril Feb 17 '13 at 21:21

2 Answers 2

up vote 6 down vote accepted

Here are some possible alternatives for the solution. You can choose the one that fits you best.

1- switch to biblatex. It is a newer package to deal with bibliography; it is much easier to configure than bibtex styles. The manual might look scary, but you only have to change a few lines to get it working.

2- as already suggested in the comments, you can use an automated tool to generate a new bst file from scratch, if you have some liberty. You can use makebst, or the GUI program included in bib-it.

3 - hacking the bst files directly is also possible. You will need some programming experience to be able to understand what is going on, but since you speak of hacking Zotero, I guess this won't be a problem; keep in mind that bst files are written in a rather unusual stack-based language which might be difficult to understand at first. In your case, you probably only have to copy the format.name function used in abbrv.bst into unsrt.bst, replacing the existing one.

EDIT: maybe I should clarify what a bst file is. Bibliography styles in bibtex are handled through style files with extension .bst. If you use \bibliographystyle{unsrtdin}, then the file that will be loaded is unsrtdin.bst. The default styles can be found inside the tex install directory (on my Ubuntu for instance it's /usr/share/texlive/texmf-dist/bibtex/bst/); but, if you wish, you can create a new one by yourself and drop it in the same folder as your .tex file (or use some more involved "local install" method, if you think you need it for multiple tex files).

share|improve this answer
    
Ok, thanks so far! I think I will go in the order 1, 3, 2. I assume I will run into the same problems as before when switching to biblatex, i.e. \cite is reported to be undefined. Is that a known and easy to solve issue, by chance? Also, can you give some hint what lines to look at and were, so I don't have to go through the whole manual? –  mcandril Feb 17 '13 at 12:15
1  
It should be enough to load the package in the preamble \usepackage[sorting=none,url=true]{biblatex}, then replace the \bibliography{somefile} line with \addbibresource{somefile}, remove \bibliographystyle, and finally add a \printbibliography where you want the bibliography to appear. This assuming that you do not need any additional customization. –  Federico Poloni Feb 17 '13 at 12:21
2  
Oh - and of course I forgot the most important thing: in addition to sorting and url, you also need the option firstinits=true when you load the package, which should abbreviate authors' names. –  Federico Poloni Feb 17 '13 at 12:27

Assuming that you're otherwise satisfied with the formatted output produced by the bibliography style unsrtdin -- i.e., if the only thing you want to change in the style file is to force BibTeX to always abbreviate first names down to their initials -- you could proceed as follows:

  • Make a copy of the file unsrtdin.bst and call it, say, myunsrtdin.bst. (Never edit the original style file directly.)

  • Open the file myunsrtdin.bst in your favorite text editor.

  • Search for the following line (in the function format.names):

    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
    

    and change it to

    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
    
  • Next, in the function format.crossref.editor, search for the line

        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
    

    and change it to

        { editor #2 "{f. }{vv }{ll}{ jj}" format.name$ "others" =
    
  • Save the file and start using it by issuing the instruction \bibliographystyle{unsrtdin}.


I can't help but make a few remarks about the use of Zotero. You've already discovered one inconsistency: Sometimes the tool provides full first names of authors and editors, at other times it provides only abbreviated first names. Sadly, this is likely going to be the least of your worries with Zotero's output. Be sure to always check the .bib file (or files) generated by this tool for correctness of all input fields. In my own experience with Zotero, its output can contain quite a few embarrassing typos and, much worse, outright errors, such as missing authors in a multi-author publication.

This piece of advice about double-checking the validity of the files generated by Zotero (or any other online tool like it!) is independent of whether you end up using unsrtdin/BibTeX or biblatex/biber: BibTeX and bibLaTeX can do nothing about errors contained in the inputs they operate on.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.