BibTeX You can't pop an empty literal stack
Asked Answered
B

7

14

I know just the basic of latex, and I got an error inside the bibliography files iet.bst a bibliography file modified by IET and offered as latex files to write a paper to be published. The error is in @webpage bibliography entry type, as I already searched, I think it is about some field that should be optional and after, maybe wrongly being poped, the error appears. error message

line 1838 from iet.bst is this:

ITERATE {call.type$}

The code about the webpage entry type is this:

% Title and url fields required;
% author, note, year, month, and lastchecked fields optional
STRINGS {database}
FUNCTION {webpage}
{ output.bibitem
  author empty$
    { editor empty$
        'skip$  % author and editor both optional
        { format.editors output.nonnull }
      if$
    }
    { editor empty$
        { format.authors output.nonnull }
        { "can't use both author and editor fields in " cite$ * warning$ }
      if$
    }
  if$
%  author empty$
%    'skip$
%    { format.authors output.nonnull }
%  if$
  new.block
  format.title "title" output.check
  journal empty$
    {
      format.type "type" output.check
      publisher empty$
        'skip$
        { format.publisher.address output }
      if$
      "database on the Internet" 'database :=
      type database =
        { format.journal.date "year" output.check }
        { format.date "year" output.check }
      if$
      lastchecked empty$
        'skip$
        { format.lastchecked output }
      if$
      new.block
      part empty$
        'skip$
        { part output }
      if$
      pages empty$
        'skip$
        { pages bracket.check output }
      if$
    }
    { journal
      remove.dots
      "journal" bibinfo.check
      "journal" output.check
      format.type "type" output.check
      format.journal.date "year" output.check
      lastchecked empty$
        'skip$
        { format.lastchecked output
      ";" no.blank.or.punct output
    }
      if$
      no.blank.or.punct format.vol.num output
      pages empty$
        'skip$
    { ":" no.blank.or.punct output
      no.blank.or.punct pages bracket.check output
    }
      if$
      new.block
    }
  if$
  format.url "url" output.check
  new.block
  note output
  fin.entry
}
% ...urlbst to here

The reason that points me the error is in that part, is because when I remove the entry @webpage referent of Arduino:2020 from the main.tex the error disappear, but as I already said i only knows the basic of latex :( The strange thing is that even with this error, the pdf is rendered apparently with no problem. if someone helps me I appreciate it. Thank you

Briarroot answered 8/8, 2020 at 14:17 Comment(0)
T
9

I got the same error with an @article entry type.

In my case, it seems that when the fields volume={volume number}, and number={issue number}, are not added to the article's entry despite being optional, this error pops up. After adding the mentioned fields to my entry, the error disappeared. Try adding the related optional fields to your entry. Also, maybe changing your entry to another entry type such as misc solves your problem.

Tartaglia answered 6/3, 2021 at 17:52 Comment(2)
Can confirm had the same problem while preparing a paper for PNAS. The solution above fixes it.Inwards
Also happened for theapa.bst. After adding the volume it worked again.Casals
R
1

Changing the entry from article to misc solved the problem for me.

I tried adding fields to the entry, but it would not fix the problem.

Rigger answered 26/1, 2023 at 14:32 Comment(1)
To change that field isn't a solution. You need to fill in all the fields necessary: Example: @article{met78, title = "Basic principles of {ROC} analysis", author = "Charles Metz", year = "1978", journal = "Seminars in Nuclear Medicine", volume = 2, pages = "283-298", note = {This is a sample entry for an article in a magazine} }Footpad
L
0

It happened to me once, and I added the volume of the article manually to the BibTeX file then the error was resolved.

Lesson answered 8/11, 2022 at 16:14 Comment(0)
T
0

I changed the compile commannd from bibtex to pbibtex, and it was solved.

Toponym answered 2/2, 2023 at 20:56 Comment(0)
H
0

Adding to @AreumBae's solution, I had a similar problem with the @inproceedings entry type. This error was caused by having the fields that the .bst file wasn't expecting, specifically the 'volume' field type. Removing this entry fixed the issue.

Hooghly answered 26/9, 2023 at 1:23 Comment(0)
K
0

In my case, for @inproceedings, I added "editor" field, which solved the problem

Kuo answered 2/12, 2023 at 20:24 Comment(0)
H
0

I got the same error in @inproceedings entry type. Removing 'organization' field solved the problem.

Hyponitrite answered 18/2 at 18:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.