1

Some of the standard bibliography styles, like plain, append the literal string edition to the value provided in the BibTeX database file.

For example, consider the following,

\documentclass{article}
\usepackage{filecontents}

\begin{filecontents}{refs.bib}
  @book{tufte,
    title     = {The Visual Display of Quantitative Information},
    author    = {Edward R. Tufte},
    year      = {1983},
    edition   = {2nd},
    publisher = {Graphics Press}
  }
\end{filecontents}

\begin{document}
  \nocite{*}
  \bibliographystyle{plain}
  \bibliography{refs}  
\end{document}

which outputs something like

Output of MWE provided before

Note how the edition has been changed from 2nd to 2nd edition.

 

How can I change the value of edition in the output?

I would like to be able to abbreviate this to ed., for example. Getting rid of the string altogether may also be useful. I'd like to stick with BibTeX if at all possible, but am open to alternative solutions.

One solution I am aware of is to take the contents of the generated bbl file and replace the \bibliography call in my TeX source by those, then editing them. I'd like to avoid such a manual and tedious step if possible.

0

1 Answer 1

4

I definitely wouldn't get rid of the word "edition" without providing some kind of replacement. After all, bare strings such as 2nd and 3rd may be rather ambiguous if they're not accompanied by some kind of qualifier.

To shorten the string edition to just ed., I suggest you proceed as follows:

  • Find the file plain.bst in your TeX distribution. Make a copy of this file and call the copy, say, plain-ed.bst. (Do not edit an original file of the TeX distribution.)

  • Open the file plain-ed.bst in a text editor; the editor you use to edit your tex files will do fine.

  • In plain-ed.bst, locate the function called format.edition. (In my copy of the file, the function starts on line 334.)

  • In this function, change both instances of " edition" to "~ed.". Observe that the space in the original string gets changed to ~ in the replacement string.

  • Save the file plain-ed.bst, either in the directory where the main tex file is located or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution suitably.

  • In your main tex file, change the instruction \bibliographystyle{plain} to \bibliographystyle{plain-ed} and perform a complete recompile cycle -- latex, bibtex, and latex twice more -- to fully propagate all changes.

Happy BibTeXing!

3
  • 1
    Thanks a lot, that absolutely worked like a charm! I'd like to clarify that I only asked about removing it so that I could put "~ed." in the BibTeX file, I fully agree with only having 2nd be ambiguous. Finally, maybe a small addendum to your excellent answer: finding plain.bst can be done by running kpsewhere plain.bst, for example. It was located at /usr/share/texlive/texmf-dist/bibtex/bst/base/plain.bst on my machine. This may be something you want to add. Again, I appreciate your detailed answer! Commented Dec 19, 2017 at 10:20
  • @Justastudent - You're most welcome! Just a very minor point: I think the name of the file search command is kpsewhich, not kpsewhere. :-) (Incidentally, I chose not to mention the kpsewhich-based search method in my answer as it works for some TeX distributions -- mainly, TeXlive and MikTeX -- but not for some other TeX distributions.)
    – Mico
    Commented Dec 19, 2017 at 10:58
  • 1
    Right, kpsewhich is more commonly known/used, I suppose. kpsewhere came with TeXlive on my system. I was not aware that it does not work with all TeX distributions, thank you for informing me! Commented Dec 19, 2017 at 11:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .