[Tex/LaTex] How to abbreviate author’s firstname in bibliography

bibliographiesbibtex

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.

Best Answer

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).