如何在使用自定义 bib 样式时避免出现“文字堆栈不为空”错误?

如何在使用自定义 bib 样式时避免出现“文字堆栈不为空”错误?

我正在使用从 abbrvdin 样式派生的自定义 bib 样式。不幸的是,我收到了以下错误消息:

This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit)
The top-level auxiliary file: master.aux
The style file: abbrvdinAnsgarDiss.bst
Database file #1: 04_Bib/MK_Diss.bib
ptr=1, stack=
% this bibliography is generated by abbrvdin.bst [8.2] from 2005-12-21
---the literal stack isn't empty
while executing---line 2034 of file abbrvdinAnsgarDiss.bst
(There was 1 error message)

关注的 2034 行正在运行此功能:

FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  newline$
  "% this bibliography is generated by abbrvdin.bst [8.2] from 2005-12-21"
  newline$
  "%\protect\thispagestyle{Kapitelbeginnseite}"  %% (AR)
  write$ newline$ newline$
  "\providecommand{\url}[1]{\texttt{#1}}"
  write$ newline$
  "\expandafter\ifx\csname urlstyle\endcsname\relax"
  write$ newline$
  "  \providecommand{\doi}[1]{doi: #1}\else"
  write$ newline$
  "  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
  write$ newline$
}

EXECUTE {begin.bib} %<-- This is line 2034

生成的.bbl文件如下所示:

\begin{thebibliography}{1}


%\protect\thispagestyle{Kapitelbeginnseite}

\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi: #1}\else
  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi

\bibitem[1]{Casanova.2015}
\textsc{Casanova}, M.; \textsc{Nodari}, L.; \textsc{Sagar}, A.;
  \textsc{Schermanz}, K.; \textsc{Trovarelli}, A.:
\newblock Preparation, characterization and NH3--SCR activity of FeVO4
  supported on TiO2--WO3--SiO2.
\newblock {In: }\emph{Applied Catalysis B: Environmental} 176-177 (2015), S.
  699--708

\bibitem[2]{Kleinhenz.2018}
\textsc{Kleinhenz}, M.; \textsc{Fiedler}, A.; \textsc{Lauer}, P.;
  \textsc{D{\"o}ring}, A.:
\newblock SCR Coated DPF for Marine Engine Applications.
\newblock {In: }\emph{Topics in Catalysis}  (2018)

\end{thebibliography}

“文字堆栈不为空”这个错误消息是什么意思?这会以任何方式改变最终的参考书目吗?还是无关紧要?我该如何摆脱这个错误消息?

答案1

由于没有提供测试代码,因此未经测试,但看起来你缺少

write$

  "% this bibliography is generated by abbrvdin.bst [8.2] from 2005-12-21"

错误消息表明此字符串位于非空stack,并且您的输出显示它没有写入bbl文件。

相关内容