0

I generated a custom bst file using "latex makebst.tex" [2003/09/08 4.1 (PWD, AO)], with no obvious errors, but bibtex gives an "You can't pop an empty literal stack for entry" error for every @BOOK, @INBOOK and @INCOLLECTION entry of my bib file. I've read several remedies for this error message on the web but none seem to apply here. Is there any way I can make the dbj and bst files available to someone who can figure out what I did wrong with makebst, or how to patch the bst file? The 30000 character limit precludes posting them here.

2

1 Answer 1

0

This looks like an issue in FUNCTION {format.org.or.pub}.

The following version works for me

FUNCTION {format.org.or.pub}
{ 't :=
  ""
  year empty$
    { "empty year in " cite$ * warning$ }
    'skip$
  if$
  address empty$ t empty$ and
  year empty$ and
    'skip$
    {
      t empty$
        { address "address" bibinfo.check *
        }
        { t *
          address empty$
            'skip$
            { ", " * address "address" bibinfo.check * }
          if$
        }
      if$
      year empty$
        'skip$
        { t empty$ address empty$ and
            'skip$
            { ", " * }
          if$
          year "year" bibinfo.check
          *
        }
      if$
    }
  if$
}

The only change is from { ", " swap$ * * } to

{ ", " * }

In the <false> branch of the t empty$ address empty$ and conditional.


That said, the combination

pub-date,pub-xpar

among

%<<PUBLISHER IN PARENTHESES:
%   %: (def) Publisher as normal block without parentheses
% pub-par,%: Publisher in parentheses 
% pub-date,%: Publisher and date in parentheses (Oxford, 1994)
% pub-date,pub-xc,%: Publisher and date in parentheses, no comma (Oxford 1994)
  pub-date,pub-xpar,%: Publisher and date without parentheses Oxford, 1994
% pub-date,pub-xpar,pub-xc,%: Publisher and date, no parentheses, no comma Oxford 1994
%------\ans=f(==pub-date,pub-xpar)-------
%>>PUBLISHER IN PARENTHESES:

looks pretty odd on first glance.

If you select neither option, you get a .bst whose FUNCTION {format.org.or.pub} looks much saner. The only difference between pub-date,pub-xpar and not giving the two options is the position of the year with respect to the edition. With the options, the year comes before the edition, without the options the edition would be wedged in between year and publisher/address.

1
  • Yes, that does seem to have fixed it; thank you! I agree that my choice of options is odd, but the way this journal formats references is also a bit odd. I still have to figure out a way to quote the book titles, for example (or add them by hand). The following post seems to show how: tex.stackexchange.com/questions/120722/… Feb 19, 2023 at 17:29

You must log in to answer this question.

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