I have created a custom .bst file using makebst such that it is as per my univeristy PhD guidelines. When I run BibTex, it works perfectly for articles, conference proceedings etc. cited. However BibTeXfails when I am citing a book. The error I get is
This is BibTeX, Version 0.99d (TeX Live 2015)
The top-level auxiliary file: example.aux
The style file: thbibstyle.bst
Database file #1: books.bib
You can't pop an empty literal stack for entry Arnett96
while executing---line 1720 of file thbibstyle.bst
You can't pop an empty literal stack for entry Spitzer78
while executing---line 1720 of file thbibstyle.bst
An example .tex file is as follows:
\documentclass[a4paper,11pt]{tanvirTU}
\begin{document}
\title{Title}
\maketitle
Read \cite{Spitzer78, Arnett96}
\bibliography{books}
\bibliographystyle{thbibstyle}
\end{document}
Here is my .bst file: thbibstyle
Also the bibliography entry are as follows
@BOOK{Spitzer78,
author = {{Spitzer}, L.},
title = "{Physical processes in the interstellar medium}",
publisher = {New York Wiley-Interscience, 1978.~333 p.},
year = 1978,
adsurl = {http://adsabs.harvard.edu/cgi-bin/nph-bib_query? bibcode=1978ppim.book.....S&db_key=AST},
adsnote = {Provided by the Smithsonian/NASA Astrophysics Data System}
}
@BOOK{Arnett96,
author = {{Arnett}, D.},
title = "{Supernovae and Mucleosynthesis: An Investigation of the History of Matter from the Big Bang to the Present}",
publisher = {Supernovae and Mucleosynthesis: An Investigation of the History of Matter, from the Big Bang to the Present, by D.~Arnett.~Princeton: Princeton University Press, 1996.},
year = 1996,
adsurl = {http://adsabs.harvard.edu/abs/1996snih.book.....A},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
Also the document class is customized which is: tanvirTU
Can anyone tell me why this is happening and how to fix it?
For a solution, please refer to this
Debugging a custom-bib bst file that crashes on book items
@bookentry with keySpitzer78. – Mico Sep 12 '16 at 13:11format.book? If you did, did you by chance save a copy of the file originally produced bymakebst? – Mico Sep 12 '16 at 13:21bookeither? – Mico Sep 12 '16 at 20:22book. I have checked the code again. – Tanvir Sep 13 '16 at 06:03TanvirTUclass file couldn't open. Please check – ssr1012 Sep 14 '16 at 13:43tanvirTUclass file should open now. – Tanvir Sep 15 '16 at 00:46http://tex.stackexchange.com/questions/112195/debugging-a-custom-bib-bst-file-that-crashes-on-book-items?rq=1
I have modified the
– Tanvir Sep 15 '16 at 01:23thbibstyle.bstby going through the above solution. The modifiedbstfile is thbibstyle_mod.bst . Please let me know if this fix is alright.format.publisher.address. With your current bst, you should also get compilation problems withInCollection,InBook,InProceedings,Proceedings. – user94293 Sep 15 '16 at 01:30bstfile. There are no issues as of now. – Tanvir Sep 15 '16 at 01:41