1

I want to separate my references using two bibs. It is not working.

\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}
Stefan Pinnow
  • 29,535
user31177
  • 1,089
  • You can do that with biblatex quite easily, for BIbTeX you may need another package, see http://tex.stackexchange.com/q/54940/35864, http://tex.stackexchange.com/q/12116/35864, http://texblog.org/2012/10/22/multiple-bibliographies-with-biblatex/ – moewe Mar 31 '16 at 11:19

1 Answers1

3

Here is a solution with biblatex. Note you could use a single .bib file:

\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}

enter image description here

Bernard
  • 271,350