I am currently finalizing the bibliography of my thesis. I am using


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.

  • 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. – user10274 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." – user10274 Feb 17 '13 at 16:59
  • 1
    @MarcvanDongen, while I'm inclined to agree that it's courteous to give names in the style the author does, as journals rarely do this, (for example the Applied Physics Letters RevTeX style always abbreviates to first initials in the references section) I'm not going to worry about it. – Chris H Dec 31 '13 at 11:33

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

  • 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
  • 2
    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
  • 7
    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.


Edit : For the current version (3.12) of biblatex, firstinits argument is depreciated. Use giveninits instead (cf. this question).

When using biblatex, just state this in your preamble:


If you want to add an unsorted style use this:


I currently use this line:


This allows for multiple bibliographies, limits the amount of reference names to 5, and uses a different citing and bibliography style.

  • Welcome to TeX.SX! Does your proposed setup automatically incorporate all features of the unsrtdin bibliography style, including (a) providing German-language adaptations (such as "und" instead of "and" as the conjunction) and (b) not sorting the bibliographic entries? – Mico Feb 10 '15 at 6:48
  • As long as you set your babel package correctly, it should be able to cope with German as well. If you want to add a sorting style do this: \usepackage[backend=bibtex,style=unsrt,sorting=none,firstinits=true]{biblatex} I currently use this line: \usepackage[backend=bibtex,defernumbers=true,style=numeric-comp,sorting=none,minbibnames=5,maxbibnames=5,firstinits=true]{biblatex} This allows for multiple bibliographies, and limits the amount of reference names to 5. – Caspar Feb 12 '15 at 23:30
  • This information belongs in the body of the answer, not a follow-up comment. – Mico Feb 13 '15 at 3:53
  • 1
    Added to main answer. – Caspar Feb 18 '15 at 4:07

I tried to follow the description of Mico but needed some addaptions. This is the patch I applied to the current version of unsrtdin.bst (http://www.ctan.org/tex-archive/biblio/bibtex/contrib/german/din1505) to obtain abbreviated first names:

diff --git a/unsrtdin_mod.bst b/unsrtdin_mod.bst
index 5505961..5134bfb 100644
--- a/unsrtdin_mod.bst
+++ b/unsrtdin_mod.bst
@@ -448,7 +448,7 @@ FUNCTION {format.names}
        s nameptr "{ll}" format.name$ 't :=
        t capitalize 't :=
        s nameptr "{ jj}" format.name$ 'w :=
-       s nameptr "{, ff}{ vv}{ jj}" format.name$ 'u :=
+       s nameptr "{, f.}{ vv}{ jj}" format.name$ 'u :=
        u  text.length$  'lang :=
        #1 'zahl :=
        "" 'v :=
@@ -1192,7 +1192,7 @@ FUNCTION {format.crossref.editor}
     { pop$ ua.etal * }%% --->u. a.
     { #2 <
-        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+        { editor #2 "{f. }{vv }{ll}{ jj}" format.name$ "others" =
             { ua.etal }

             { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }

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.