.bst 文件中的错误“---文字堆栈不为空,无法输入……”

.bst 文件中的错误“---文字堆栈不为空,无法输入……”

因此,我正在修改现有的 .bst,使其包含一些特定的哈佛风格参考文献,到目前为止,除了我的之外,一切似乎都正常@incollection 函数(见下文),我收到了“空文字堆栈”消息。我使用的是 [authoryear]natbib 包

FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.bracket
  format.title "title" output.check
  new.sentence
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.edition output
      new.sentence
      format.bvolume output
      format.number.series output
      new.sentence
      format.publisher.address output
      format.chapter.pages output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.chapter.pages output
    }
  if$
  format.pages "pages" output.check
  fin.entry
}

我试图找出错误的来源,似乎与我的“格式.发布者.地址“ 或者 ”格式.org.or.pub“函数(不确定是哪一个),我将其粘贴在下面。然而,我无法确定代码的哪个特定位给出了错误。

FUNCTION {format.org.or.pub}
{ 't :=
  ""
  address empty$ t empty$ and
    'skip$
    {
      t empty$
        { address empty$
          'skip$
          { address * }
          if$
        }
        { t *
          address empty$
            'skip$
            { ", " * address * }
          if$
        }
      if$
    }
  if$
}

FUNCTION {format.publisher.address}
{ publisher empty$
    { "empty publisher in " cite$ * warning$
      ""
    }
    {format.org.or.pub}
  if$ 
 } 

为了清楚起见,下面是出现错误的 @incollection bib 条目的示例:

@incollection{illeris_comprehensive_2018,
    address = {Abingdon, Oxon; New York, NY},
    edition = {2},
    title = {A comprehensive understanding of human learning},
    isbn = {978-1-138-55048-3 978-1-138-55049-0},
    abstract = {None},
    booktitle = {Contemporary theories of learning: learning theorists... in their own words},
    publisher = {Routledge},
    author = {Illeris, Knud},
    editor = {Illeris, Knud},
    year = {2018},
    keywords = {Adult learning, Learning, Philosophy},
    pages = {1--14},
}

提前感谢您的时间和帮助!

相关内容