![在同一文件中分离两个围兜](https://linux22.com/image/331158/%E5%9C%A8%E5%90%8C%E4%B8%80%E6%96%87%E4%BB%B6%E4%B8%AD%E5%88%86%E7%A6%BB%E4%B8%A4%E4%B8%AA%E5%9B%B4%E5%85%9C.png)
我想使用两个 bib 来分隔我的参考文献。但是不行。
\begin{filecontents}{onlinebib.bib}
@online{WinNT,
author = {MultiMedia LLC},
title = {{MS Windows NT} Kernel Description},
year = 1999,
url = {http://web.archive.org/web/20080207010024/http://www.808multimedia.com/winnt/kernel.htm},
urldate = {2010-09-30}
}
\end{filecontents}
\begin{filecontents}{refbib.bib}
@ARTICLE{Vickrey1961,
AUTHOR = {W. Vickrey},
TITLE = {Counterspeculation, auctions and sealed tenders},
JOURNAL = {Journal of Finance},
YEAR = {1961},
volume = {16},
pages = {8--37},
}
@BOOK{Golumbic2004,
AUTHOR = {M. C. Golumbic},
TITLE = {Algorithmic Graph Theory and Perfect Graphs},
PUBLISHER = {Elsevier Science},
YEAR = {2004},
edition = {2nd Edition},
}
\end{filecontents}
\documentclass{article}
\begin{document}
first reference file\cite{Vickrey1961}.
OnLine:\\
Online reference file\cite{WinNT}. % not working
first reference file\cite{Golumbic2004}.\\
\bibliographystyle{plain}
\bibliography{refbib} % Heading should be references
\bibliography{onlinebib} % Heading should be Online references
\end{document}
答案1
这是一个解决方案biblatex
。请注意,您可以使用单个 .bib 文件:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier} \usepackage{csquotes}% recommended in output (biblatex)
\usepackage[backend=biber, defernumbers]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{refbib.bib}
@ARTICLE{Vickrey1961,
AUTHOR = {W. Vickrey},
TITLE = {Counterspeculation, auctions and sealed tenders},
JOURNAL = {Journal of Finance},
YEAR = {1961},
volume = {16},
pages = {8--37},
}
@BOOK{Golumbic2004,
AUTHOR = {M. C. Golumbic},
TITLE = {Algorithmic Graph Theory and Perfect Graphs},
PUBLISHER = {Elsevier Science},
YEAR = {2004},
edition = {2nd Edition},
}
\end{filecontents}
\begin{filecontents}{onlinebib.bib}
@online{WinNT,
author = {MultiMedia LLC},
title = {{MS Windows NT} Kernel Description},
year = 1999,
url = {http://web.archive.org/web/20080207010024/http://www.808multimedia.com/winnt/kernel.htm},
urldate = {2010-09-30}
}
\end{filecontents}
\addbibresource{refbib.bib}
\addbibresource{onlinebib.bib}
\begin{document}
\nocite{*}
first reference file\cite{Vickrey1961}.
OnLine:\\
Online reference file\cite{WinNT}. // working
first reference file\cite{Golumbic2004}.\\
\printbibliography[type=online, heading=subbibliography, prefixnumbers ={N}, title=Online references, ]
\printbibliography[nottype = online, heading=subbibliography, title =References, prefixnumbers ={P}, ]%
\addcontentsline{toc}{chapter}{Bibliographie}
\end{document}