BibTeX, biblatex and biberBibliography: how can I define a new field?

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Linguist
Posts: 43
Joined: Mon Nov 07, 2011 12:07 pm

Bibliography: how can I define a new field?

Post by Linguist »

I’m wondering how I can define a new bibtex field which will behave like the author or editor field. Specifically I want to add a “collector” field so that authors, editors and collectors of references which have the same name end up sorted correctly in the reference list.

So if I have one work which has author = {Author, Arthur} and another with editor = {Author, Arthur} they get sorted correctly in the reference list (according to year or, if that is the same, by title) and the second gets a nice little note saying that Arthur Author is an editor. I also want to have collector = {Author, Arthur} and have this get sorted correctly.

The dumb way to do this is to make the author field author = {Author, Arthur (collector)} but this will be treated as an author with the name Arthur (collector) Author and thus appear after all instances of Arthur Author, even if the year field, title field etc. mean that it should get sorted before them.

I’m guessing I’ll need to make a custom bibliography style, so let me know how I’d go about doing this.

A minimal working example is something like this:

Code: Select all

\begin{filecontents}{shortbib.bib}
@Book{book1,
  author    = {Author, Arthur},
  year      = {2000},
  title     = {The first book in the list},
  publisher = {Publisher},
}

@Book{book2,
  author    = {Author, Arthur},
  year      = {3000},
  title     = {The last book in the list},
  publisher = {Publisher},
}

@Book{book3,
  editor    = {Author, Arthur},
  year      = {2050},
  title     = {Book which was edited not written},
  publisher = {Publisher},
}
\end{filecontents}

\documentclass{article}
\usepackage{natbib}

\begin{document}

\cite{book2}
\cite{book1}
\cite{book3}
%\cite{book4}

\bibliographystyle{apalike}
\bibliography{shortbib}
\end{document}

% I want to be able to cite this reference with a note: ", collector"
% (much like the editor note) and have it sorted correctly in the reference list.
% In this case the year field would mean it appears second last in the list.

%@Book{book4,
%  collector = {Author, Arthur},
%  year      = {2075},
%  title     = {Collection by Arthur Author},
%  publisher = {Publisher},
%}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply