BibTeX, biblatex and biberBrackets in BibTeX Database Entry Field

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
mcswell
Posts: 9
Joined: Sun Apr 08, 2012 4:15 pm

Brackets in BibTeX Database Entry Field

Post by mcswell »

I'm going to post a problem I had, with my solution, in case it's of use to someone, since I couldn't find any references to this anywhere. (Or in case someone has a better solution; conceivably this solution would cause problems for sorting an author's entries by date.)

I have a BiBTeX entry something like this:

Code: Select all

@Book{Bell2004,
  author = "H.C.P. Bell",
  title = "blaa...",
  publisher = "so-and-so",
  address = "somewhere",
  year = "2004 [1883]"
}
Running this through LaTeX (actually XeLaTeX, but I doubt that is the problem), I got the error msg:

Code: Select all

Package bibtopic Error: Can't parse brackets in key `Bell2004' properly
The problem is of course with the 'year' field. I solved it by putting the dates inside curly braces:

Code: Select all

year = "{2004 [1883]}"
Last edited by localghost on Sun Apr 08, 2012 4:50 pm, edited 2 times in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Brackets in BibTeX Database Entry Field

Post by localghost »

mcswell wrote:[…] (Or in case someone has a better solution; conceivably this solution would cause problems for sorting an author's entries by date.) […]
It has become a common practice to group the field values by braces instead of quotation marks.

Code: Select all

\begin{filecontents*}{\jobname.bib}
@book{author2004,
  author = {Author Name},
  title = {Book Title},
  publisher = {Publisher},
  year = {2004 [1883]}
}
\end{filecontents*}
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}

\bibliographystyle{unsrt}

\begin{document}
  \nocite{*}
  \bibliography{\jobname}
\end{document}
Presumably the issue with sorting by date would persist.


Best regards and welcome to the board
Thorsten
mcswell
Posts: 9
Joined: Sun Apr 08, 2012 4:15 pm

Brackets in BibTeX Database Entry Field

Post by mcswell »

localghost wrote: It has become a common practice to group the field values by braces instead of quotation marks.
Interesting, our own bibref files are starting to look like that as we fixed things up that we didn't like (another instance where we had to do this was double quotes inside a title).

One bracing effect would be that (afaik) it prevents the formatting program(s) from tweaking capitalization. I'm not sure whether I would consider that a bug or a blessing; the amount of cleanup I have had to do (putting proper names in {}) is possibly balanced by the fact that I Tend To Over-Capitalize Titles.

Is there somewhere a list of tips/ common practices of this sort for LaTeX and BiBTeX? Things which are not documented in the ordinary literature. None of the forum titles jumped out at me as having this sort of lore.
Post Reply