在同一文件中分离两个围兜

在同一文件中分离两个围兜

我想使用两个 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}

在此处输入图片描述

相关内容