提问于:
浏览数:
2687
如题,目前无法引用,或者编译出错。有一个解决方案看着很美妙,我这编译出错。
https://tex.stackexchange.com/questions/300639/failure-to-use-bibliography-in-other-tex-file
而看xcite的说明文档,好像bibitem还是bibtex格式都无所谓的,
http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/xcite/xcite.pdf
貌似和hyperref有关系,因为我把这个包去掉之后就能引用了,但是又连带出一大堆标题什么的很烦。
现在就是编译不过
```tex
\documentclass[onecolumn]{article}
\usepackage{xcite}
\usepackage{xr-hyper} % \usepackage{xr}
\usepackage{graphicx}
\graphicspath{{figures/}}
\usepackage[colorlinks,linkcolor=black,anchorcolor=black,citecolor=black,urlcolor=black]{hyperref}
\externaldocument{../RNN_TEVC_v2/CBG_TEVC_v2}
\externalcitedocument{../RNN_TEVC_v2/CBG_TEVC_v2}
\begin{document}
This is a example.
cite \cite{rakitianskaia2016analysis, gallagher2001fitness, phan2013error}
% \ref{aaa}
aaa
\bibliographystyle{IEEEtran}
\bibliography{../RNN_TEVC_v2/bib/IEEEabrv,../RNN_TEVC_v2/bib/ref}{}
\end{document}
```
提示:
```
Command Line: bibtex.exe "response"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
bibtex: warning: running with administrator privileges
This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit)
The top-level auxiliary file: response.aux
I found no \bibdata command---while reading file response.aux
I found no \bibstyle command---while reading file response.aux
(There were 2 error messages)
Command Line: texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=1 "D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response\response.tex"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
texify: warning: running with administrator privileges
pdflatex: warning: running with administrator privileges
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit)
entering extended mode
(D:/工作/科研/项目/测试问题生成-CLG-TEC/TEC修改/Response/response
.tex
LaTeX2e <2018> patch level 5
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\size10.clo"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\xcite\xcite.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\xr-hyper.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\graphics.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-def\pdftex.def")))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\url\url.sty"))
Package hyperref Message: Driver (autodetected): hpdftex.
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty")) (response.aux
) ("D:\SOFTWARE\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\color.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\color.cfg"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
(response.out) (response.out)
! Undefined control sequence.
cite.\XC@prefix
rakitianskaia2016analysis\@extra@b@citeb
l.13 ...ysis, gallagher2001fitness, phan2013error}
?
```
\externalcitedocument{../RNN_TEVC_v2/CBG_TEVC_v2}改成
\externalcitedocument{../RNN_TEVC_v2/bib/ref}就编译成功了,
```tex
\documentclass[onecolumn]{article}
\usepackage{xcite}
\usepackage{xr-hyper} % \usepackage{xr}
\usepackage{graphicx}
\graphicspath{{figures/}}
\usepackage[colorlinks,linkcolor=black,anchorcolor=black,citecolor=black,urlcolor=black]{hyperref}
\externaldocument{../RNN_TEVC_v2/CBG_TEVC_v2}
\externalcitedocument{../RNN_TEVC_v2/bib/ref}
\begin{document}
This is a example.
cite \cite{rakitianskaia2016analysis, gallagher2001fitness, phan2013error}
% \ref{aaa}
aaa
\bibliographystyle{IEEEtran}
\bibliography{../RNN_TEVC_v2/bib/IEEEabrv,../RNN_TEVC_v2/bib/ref}{}
\end{document}
```
但是结果是这样的:
![](https://pics.latexstudio.net/data/images/201911/9a71b88c5e573be.png)
文献索引全从1开始了,而且还多出一块references,这都不是我想要的。
而且看提示:
```
Command Line: bibtex.exe "response"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
bibtex: warning: running with administrator privileges
This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit)
The top-level auxiliary file: response.aux
The style file: IEEEtran.bst
Database file #1: ../RNN_TEVC_v2/bib/IEEEabrv.bib
Database file #2: ../RNN_TEVC_v2/bib/ref.bib
-- IEEEtran.bst version 1.14 (2015/08/26) by Michael Shell.
-- http://www.michaelshell.org/tex/ieeetran/bibtex/
-- See the "IEEEtran_bst_HOWTO.pdf" manual for usage information.
Done.
Command Line: texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=1 "D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response\response.tex"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
texify: warning: running with administrator privileges
pdflatex: warning: running with administrator privileges
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit)
entering extended mode
(D:/工作/科研/项目/测试问题生成-CLG-TEC/TEC修改/Response/response
.tex
LaTeX2e <2018> patch level 5
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\size10.clo"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\xcite\xcite.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\xr-hyper.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\graphics.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-def\pdftex.def")))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\url\url.sty"))
Package hyperref Message: Driver (autodetected): hpdftex.
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))
Package xc Warning:
No file ../RNN_TEVC_v2/bib/ref.aux
LABELS NOT IMPORTED.
on input line 8.
(response.aux) ("D:\SOFTWARE\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\color.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\color.cfg"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
(response.out) (response.out) (response.bbl) [1{C:/Users/SUNFY/AppData/Local/Mi
KTeX/2.9/pdftex/config/pdftex.map}] (response.aux) )
Output written on response.pdf (1 page, 49635 bytes).
SyncTeX written on response.synctex.gz.
Transcript written on response.log.
gbk2uni, version 0.22, initially implemented by cxterm and ZLB in Jan. 2003
enhanced by hooklee in Mar. 2003.
please visit www.ctex.org and www.chinatex.org for more information.
gbk2uni response.out is finished!
Command Line: bibtex.exe "response"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
bibtex: warning: running with administrator privileges
This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit)
The top-level auxiliary file: response.aux
The style file: IEEEtran.bst
Database file #1: ../RNN_TEVC_v2/bib/IEEEabrv.bib
Database file #2: ../RNN_TEVC_v2/bib/ref.bib
-- IEEEtran.bst version 1.14 (2015/08/26) by Michael Shell.
-- http://www.michaelshell.org/tex/ieeetran/bibtex/
-- See the "IEEEtran_bst_HOWTO.pdf" manual for usage information.
Done.
Command Line: texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=1 "D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response\response.tex"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
texify: warning: running with administrator privileges
pdflatex: warning: running with administrator privileges
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit)
entering extended mode
(D:/工作/科研/项目/测试问题生成-CLG-TEC/TEC修改/Response/response
.tex
LaTeX2e <2018> patch level 5
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\size10.clo"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\xcite\xcite.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\xr-hyper.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\graphics.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-def\pdftex.def")))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\url\url.sty"))
Package hyperref Message: Driver (autodetected): hpdftex.
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))
Package xc Warning:
No file ../RNN_TEVC_v2/bib/ref.aux
LABELS NOT IMPORTED.
on input line 8.
(response.aux) ("D:\SOFTWARE\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\color.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\color.cfg"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
(response.out) (response.out) (response.bbl) [1{C:/Users/SUNFY/AppData/Local/Mi
KTeX/2.9/pdftex/config/pdftex.map}] (response.aux) )
Output written on response.pdf (1 page, 49635 bytes).
SyncTeX written on response.synctex.gz.
Transcript written on response.log.
gbk2uni, version 0.22, initially implemented by cxterm and ZLB in Jan. 2003
enhanced by hooklee in Mar. 2003.
please visit www.ctex.org and www.chinatex.org for more information.
gbk2uni response.out is finished!
Command Line: bibtex.exe "response"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
bibtex: warning: running with administrator privileges
This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit)
The top-level auxiliary file: response.aux
The style file: IEEEtran.bst
Database file #1: ../RNN_TEVC_v2/bib/IEEEabrv.bib
Database file #2: ../RNN_TEVC_v2/bib/ref.bib
-- IEEEtran.bst version 1.14 (2015/08/26) by Michael Shell.
-- http://www.michaelshell.org/tex/ieeetran/bibtex/
-- See the "IEEEtran_bst_HOWTO.pdf" manual for usage information.
Done.
Command Line: texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=1 "D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response\response.tex"
Startup Folder: D:\工作\科研\项目\测试问题生成-CLG-TEC\TEC修改\Response
texify: warning: running with administrator privileges
pdflatex: warning: running with administrator privileges
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840 64-bit)
entering extended mode
(D:/工作/科研/项目/测试问题生成-CLG-TEC/TEC修改/Response/response
.tex
LaTeX2e <2018> patch level 5
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\base\size10.clo"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\xcite\xcite.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\xr-hyper.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\graphics.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-def\pdftex.def")))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\url\url.sty"))
Package hyperref Message: Driver (autodetected): hpdftex.
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))
Package xc Warning:
No file ../RNN_TEVC_v2/bib/ref.aux
LABELS NOT IMPORTED.
on input line 8.
(response.aux) ("D:\SOFTWARE\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics\color.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\graphics-cfg\color.cfg"))
("D:\SOFTWARE\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"
("D:\SOFTWARE\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))
(response.out) (response.out) (response.bbl) [1{C:/Users/SUNFY/AppData/Local/Mi
KTeX/2.9/pdftex/config/pdftex.map}] (response.aux) )
Output written on response.pdf (1 page, 49635 bytes).
SyncTeX written on response.synctex.gz.
Transcript written on response.log.
gbk2uni, version 0.22, initially implemented by cxterm and ZLB in Jan. 2003
enhanced by hooklee in Mar. 2003.
please visit www.ctex.org and www.chinatex.org for more information.
gbk2uni response.out is finished!
_____________________________________________________________________
PDFTeXify Compilation Report (Pages: 1)
Errors: 0 Warnings: 2 Bad Boxes: 0
_____________________________________________________________________
```
214行,No file ../RNN_TEVC_v2/bib/ref.aux。没找到,那肯定没找到啊,因为没有这个文件,只有ref.bib
所以目前推测,应该还是得引用和外部tex相同文件名才行。但是编译又不过。