6

I am using a bibtex style that I cannot change (wmaainf). I have the following entry:

@incollection{expranksel,
  title     = {A Comparison of Selection Schemes used in Genetic Algorithms},
  author    = {Tobias Blickle and Lothar Thiele},
  booktitle = {TIK Report},
  publisher = {Swiss Federal Institute of Technology ETH},
  volume    = {11},
  year      = {1995},
  month     = 12,
  edition   = 2
}

It is crucial to have the edition listed, as the part I am referencing was added in the second edition. I obtain this output:

[Blic 95]
T. Blickle and L. Thiele. “A Comparison of Selection Schemes used in Ge-
netic Algorithms”. In: TIK Report, Swiss Federal Institute of Technology
ETH, 12 1995.

What can I do to obtain the desired output (the edition field being printed).

  • 1
    This BibTeX style is very old (1989) and as you note cannot be changed (license-restricted). If this is not changeable then you are stuck: the output of a BibTeX style depends on that style alone. If you just need to get close to the same style then perhaps something like makebst can help. – Joseph Wright Dec 9 '14 at 19:58
  • @JosephWright - I'm not a lawyer and I know you aren't either, but let me ask a licensing-related question anyway. The bst file says that no changes to the file are allowed without first consulting the author, but who knows where Walter M"ulner might be now, 25 years after the fact. In your opinion, is it OK to copy the existing style file to a new style file called, say, mywmaainf.bst, and to edit the new file lightly, e.g., by inserting an instruction to print the contents of the edition field for entries of type @incollection? – Mico Dec 9 '14 at 20:13
  • 2
    @Mico I'm not a lawyer either, but the license note in the file seems quite clear; whatever the file is named, you can't change its contents. Modifying it is a breach of copyright, in my opinion. – egreg Dec 9 '14 at 22:04
  • 1
    @egreg - Thanks. I've managed to come up with an alternative approach, which does not involve modifying the bibliography style file; instead, I suggest augmenting the the booktitle field to incorporate the information about the book's edition. :-) – Mico Dec 9 '14 at 22:35
5

As you've discovered, the wmaainf bibliography style for some reason sees fit not to process the field edition for entries of type @incollection. (It only processes the edition field for entries of type @book, @inbook, and @manual.) Given that you're apparently stuck with having to use this style file, I suggest you do the following:

  • Make a copy of wmaainf.bst, and call the copy (say) mywmaainf.bst. Do not edit the original file directly.

  • Open the file mywmaainf.bst in a text editor; the editor you use for your tex files will do fine. Locate the function called incollection (it starts on line 465 in my copy).

  • In that function, locate the line

      "booktitle" format.in.ed.booktitle output.check
    

    Immediately after this line, insert the following line:

      format.edition output
    
  • Save the file mywmaainf.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter method, be sure to update the filename database of your TeX distribution after saving the file.

After saving the updated bibliography style file, be sure to run LaTeX, BibTeX, and LaTeX twice more to propagate all changes.

Incidentally, you may to change the value of the edition field from 2 to "2nd".

enter image description here

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{expranksel,
  title     = {A Comparison of Selection Schemes used in Genetic Algorithms},
  author    = {Tobias Blickle and Lothar Thiele},
  booktitle = {TIK Report},
  publisher = {Swiss Federal Institute of Technology ETH},
  volume    = {11},
  year      = {1995},
  month     = 12,
  edition   = "2nd",
}
\end{filecontents}
\begin{document}
\nocite{*}
\bibliographystyle{mywmaainf.bst}
\bibliography{\jobname}

\end{document}

Addendum: If you're not comfortable with editing a bst file, or if you're not entirely sure about the legal ramifications of doing so, you could keep using wmainf but edit the booktitle field as follows:

  booktitle = {TIK Report, \emph{2nd Ed.}},

i.e, add information about the book's edition to the booktitle field. An MWE illstrates that the resulting output is the same as if the style file processed the edition field:

enter image description here

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{expranksel,
  title     = {A Comparison of Selection Schemes used in Genetic Algorithms},
  author    = {Tobias Blickle and Lothar Thiele},
  booktitle = {TIK Report, \emph{2nd Ed.}},
  publisher = {Swiss Federal Institute of Technology ETH},
  volume    = {11},
  year      = {1995},
  month     = 12,
  edition   = "2nd",
}
\end{filecontents}
\begin{document}
\nocite{*}
\bibliographystyle{wmaainf.bst}
\bibliography{\jobname}

\end{document}

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.