未定义控制序列。\bstctlcite

未定义控制序列。\bstctlcite

我只是想改变 URL 的显示样式IEEEtran。因此,我在参考书目文件中添加了以下内容Literaturverzeichnis.bib

@IEEEtranBSTCTL{IEEEexample:BSTcontrol,
    CTLuse_forced_etal       = "yes",
    CTLmax_names_forced_etal = "3",
    CTLnames_show_etal       = "2",
    CTLname_url_prefix = "\par [Online]. Available:"

在我使用的文档中:

\bstctlcite{IEEEexample:BSTcontrol}
\bibliography{IEEEabrv,Literaturverzeichnis}
\bibliographystyle{IEEEtran}

我总是收到错误未定义控制序列。\bstctlcite


这是一个仅包含包、一些文本、引文和参考书目小例子:

\documentclass[12pt, a4paper, english, ngerman, numbers=noenddot, openany, titlepage, intoc, BCOR=10mm, headsepline]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{ngerman}
\usepackage{blindtext}
\usepackage{url}
\usepackage{hyperref}

\begin{document}    
    \blindtext
    \cite{Braggins:Fingerprint_sensing_and_analysis}
    \bstctlcite{IEEEexample:BSTcontrol}
    \bibliography{IEEEabrv,Literaturverzeichnis}\thispagestyle{empty}
    \bibliographystyle{IEEEtran}
\end{document}

这是 .bib 文件:

@IEEEtranBSTCTL{IEEEexample:BSTcontrol,
    CTLuse_forced_etal       = "yes",
    CTLmax_names_forced_etal = "3",
    CTLnames_show_etal       = "2",
    CTLname_url_prefix = "\par[Online]. Available:"
}

@article{Braggins:Fingerprint_sensing_and_analysis,
    author = {Braggins, Don},
    journal = {Sensor Review},
    month = {December},
    number = {4},
    pages = {272--277},
    title = {{Fingerprint sensing and analysis}},
    url = {http://www.emeraldinsight.com/doi/10.1108/02602280110406909 https://www.emeraldinsight.com/doi/10.1108/02602280110406909},
    volume = {21},
    year = {2001}
}

以下是我收到的消息:

错误信息

答案1

该命令由文档类 ( ) 或支持包\bstctlcite提供。您未加载其中任何一个,因此无法使用该命令。ieeetranieeetran.clsieeetrantools

您可以加载ieeetrantools,或者直接从中\usepackage{ieeetrantools}获取定义\bstctlciteieeetran.bst

\makeatletter
\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
\def\@bstctlcite[#1]#2{\@bsphack
  \@for\@citeb:=#2\do{%
    \edef\@citeb{\expandafter\@firstofone\@citeb}%
    \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
  \@esphack}
\makeatother 

此外,\bstctlcite{IEEEexample:BSTcontrol}必须是您文档中的第一个引用,因此我建议您在之后直接调用它\begin{document}

您的文档将看起来像(整个filecontents块只是为了使示例自包含,它在您的实际文档中不需要)

\documentclass[12pt, a4paper,numbers=noenddot, openany, titlepage, BCOR=10mm, headsepline]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\usepackage{hyperref}

\makeatletter
\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
\def\@bstctlcite[#1]#2{\@bsphack
  \@for\@citeb:=#2\do{%
    \edef\@citeb{\expandafter\@firstofone\@citeb}%
    \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
  \@esphack}
\makeatother

%\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@IEEEtranBSTCTL{IEEEexample:BSTcontrol,
    CTLuse_forced_etal       = "yes",
    CTLmax_names_forced_etal = "3",
    CTLnames_show_etal       = "2",
    CTLname_url_prefix = "\par[Online]. Available:"
}

@article{Braggins:Fingerprint_sensing_and_analysis,
    author = {Braggins, Don},
    journal = {Sensor Review},
    month = {December},
    number = {4},
    pages = {272--277},
    title = {Fingerprint sensing and analysis},
    url = {http://www.emeraldinsight.com/doi/10.1108/02602280110406909},
    volume = {21},
    year = {2001}
}
\end{filecontents}

\begin{document}
    \bstctlcite{IEEEexample:BSTcontrol}
    \blindtext
    \cite{Braggins:Fingerprint_sensing_and_analysis}
    \bibliography{IEEEabrv,\jobname}
    \bibliographystyle{IEEEtran}
\end{document}

给出

在此处输入图片描述

请注意,ULR 很混乱,因为url字段中只能有一个 URL。两个 URL 太多了。

相关内容