[Tex/LaTex] Bibtex ignores edition field

bibtex

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

Best Answer

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}
Related Question