我从别人那里收到了一份 bib 文件,里面有我必须使用的参考书目。我还必须使用它IEEEtran
作为参考书目样式。我知道它之前曾与 amsrefs 一起使用过。对我来说,它会产生错误。
Bibtex 仅发出警告:
This is BibTeX, Version 0.99d (MiKTeX 2.9.6960 64-bit)
....
Warning--entry type for "OpenMP" isn't style-file defined
--line 18 of file parallel.bib
Warning--entry type for "OmpSs17" isn't style-file defined
--line 97 of file parallel.bib
....
Warning--to sort, need author or key in OpenMP
Warning--missing date in OpenMP
(There were 4 warnings)
使用 LaTeX 编译时,这些条目会产生错误,其他条目也会产生错误:
! Package amsrefs Error: Undefined entry type: .
See the amsrefs package documentation for explanation.
...
l.5 \bib{OpenMP}{}
{
?
Package amsrefs Warning: No authors, editors or translators on input line 9.
...
! Package amsrefs Error: Undefined entry type: booklet.
See the amsrefs package documentation for explanation.
Type H <return> for immediate help.
...
l.362 \bib{STFC17}{booklet}
{
?
以及其他一些。
该 bib 文件中的一些有问题的条目:
@STANDARD{OpenMP,
title = {{OpenMP 4.5 Specifications}},
url = {http://www.openmp.org/mp-documents/openmp-4.5.pdf},
note = {{A}ccessed on Oct~13, 2017}
},
@INBOOK{Chamberlain15,
author = {Bradford L.~Chamberlain},
editor = {Pavan Balaji},
title = {Programming Models for Parallel Computing},
chapter = {Chapel},
publisher = {{MIT} Press},
year = {2015},
month = nov,
}
我的问题:关于 bibtex 警告to sort, need author or key
- 显然有些条目没有作者。但是是什么key
?
至于其余部分 - 显然在某处定义了类似booklet
或 的条目类型inbook
。如何搜索此类内容?
满足请求的示例如下
\documentclass{article}
\usepackage{amsrefs}
\begin{document}
Sample citations: \cites{OpenMP,Chamberlain15}.
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,example}
\end{document}
这里的文件example.bib
与上面复制的完全一样,bibtex
日志是
Command Line: bibtex.exe "example"
Startup Folder: C:\Users\me\Desktop\example
This is BibTeX, Version 0.99d (MiKTeX 2.9.6960 64-bit)
The top-level auxiliary file: example.aux
The style file: amsrn.bst
Database file #1: IEEEabrv.bib
Database file #2: example.bib
Warning--entry type for "OpenMP" isn't style-file defined
--line 1 of file example.bib
Warning--to sort, need author or key in OpenMP
Warning--missing date in OpenMP
(There were 3 warnings)
并且 pdflatex 日志是
Command Line: pdflatex.exe --interaction=errorstopmode --synctex=-1 "example.tex"
Startup Folder: C:\Users\me\Desktop\example
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.6960 64-bit)
entering extended mode
(example.tex
LaTeX2e <2018-12-01>
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\size10.clo"))
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/amsrefs\amsrefs.sty"
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/url\url.sty")
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/amsrefs\pcatcode.sty"
) ("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/amsrefs\ifoption.st
y")
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/amsrefs\rkeyval.sty")
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/amsrefs\textcmds.sty
")
("C:\Users\me\AppData\Local\Programs\MiKTeX 2.9\tex/latex/amsrefs\mathscinet.st
y")) (example.aux) (example.bbl
! Package amsrefs Error: Undefined entry type: .
See the amsrefs package documentation for explanation.
Type H <return> for immediate help.
...
l.5 \bib{OpenMP}{}
{
?
Package amsrefs Warning: No authors, editors or translators on input line 9.
! Package amsrefs Error: Undefined entry type: inbook.
See the amsrefs package documentation for explanation.
Type H <return> for immediate help.
...
l.11 \bib{Chamberlain15}{inbook}
{
?
) [1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(example.aux) )<C:/Users/me/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/publi
c/amsfonts/cm/cmbx12.pfb><C:/Users/me/AppData/Local/Programs/MiKTeX 2.9/fonts/t
ype1/public/amsfonts/cm/cmr10.pfb><C:/Users/me/AppData/Local/Programs/MiKTeX 2.
9/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/Users/me/AppData/Local/Programs/M
iKTeX 2.9/fonts/type1/public/amsfonts/cm/cmti8.pfb>
Output written on example.pdf (1 page, 50285 bytes).
SyncTeX written on example.synctex.
Transcript written on example.log.
_____________________________________________________________________
PDFTeXify Compilation Report (Pages: 1)
Errors: 2 Warnings: 1 Bad Boxes: 0
_____________________________________________________________________
答案1
您不能amsrefs
与IEEEtran
样式一起使用。只需省略\usepackage{amsrefs}
特定命令即可。
\begin{filecontents*}{\jobname.bib}
@STANDARD{OpenMP,
institution = {{OpenMP}},
title = {{OpenMP 4.5 Specifications}},
url = {http://www.openmp.org/mp-documents/openmp-4.5.pdf},
note = {{A}ccessed on Oct~13, 2017}
},
@INBOOK{Chamberlain15,
author = {Bradford L.~Chamberlain},
editor = {Pavan Balaji},
title = {Programming Models for Parallel Computing},
chapter = {Chapel},
publisher = {{MIT} Press},
year = {2015},
month = nov,
}
\end{filecontents*}
\documentclass{article}
\begin{document}
Sample citations: \cite{OpenMP} \cite{Chamberlain15}.
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,\jobname}
\end{document}
这里我使用了\jobname
bib 数据库的名称,但这只是为了使示例自成一体。请注意,@STANDARD
条目需要一个institution
字段。
更准确地说:amsrefs
忽略\bibliographystyle
文档中的命令并使用自己的样式(amsrn
)。此类样式不识别与 相同的条目IEEEtran
,特别@STANDARD
是 或@BOOKLET
。