2

As I understand, the package bibtopic redefines (and ignore) the commands \bibliography and \nobibliography. While the package bibentry rely on either commands to load the bibliographic entries and insert them in the document when a \bibentry is encountered.

Is there a workaround to make those work together? Currently, all I get is an empty place where the \bibentry should appear. Here follows a (kinda) minimal example.

\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{natbib}
\usepackage{bibentry}
\usepackage{bibtopic}


\begin{document}
\bibliographystyle{plain}
\nobibliography*

The cloud by NIST~\cite{NISTCloud}. Nice graphic card: \cite{TeslaK40}.

BigData:\\
\bibentry{BigData}

\chapter*{Bibliography}
\begin{btSect}{main}
    \btPrintCited
\end{btSect}

\chapter*{Webography}
\begin{btSect}{web}
    \btPrintCited
\end{btSect}

\bibliography{main}

\end{document}

The content of main.bib.

@article{BigData,
    title={{3D Data Management: Controlling Data Volume, Velocity and Variety}},
    author={Laney, Doug},
    journal={META Group Research Note},
    volume={6},
    year={2001}
}
@article{NISTCloud,
    title={{The NIST Definition of Cloud Computing}},
    author={Mell, Peter and Grance, Tim},
    year={2011},
    publisher={Computer Security Division, Information Technology Laboratory, National Institute of Standards and Technology}
}

The content of web.bib.

@misc{TeslaK40,
    author = {\textsc{nVIDIA}},
    title = {{Tesla K40 and K80 GPU Accelerators for Servers}},
    howpublished = {\url{http://www.nvidia.com/object/tesla-servers.html}}
}

And here are the commands I use to compile:

pdflatex main
bibtex main1
bibtex main2
pdflatex main
pdflatex main

So everything should be compiled correctly.

  • Do you have to use bibtex, or are you open minded to use the modern biblatex that combines (all?) bib-related packages in one powerful tool. – Johannes_B Feb 12 '15 at 13:48
  • @Johannes_B I'm open to alternatives as long as it's worth it and that I don't have large changes to make to my 110 pages PhD thesis. When in doubt, I prefer to stick with the most common tools. – Celelibi Feb 12 '15 at 15:01
  • Basically, you want to have two separate bibliographies depending on the topic (or a keyword), right? – Johannes_B Feb 12 '15 at 15:11
1

I think what you are searching is the powerful biblatex, coming with all the utilities you need. I made some minor edits to the example, to keep it up to date. You need to decide, if it is applicable to your own project.

I used article in the example to keep everything on one page. Which documentclass you are using doesn't really matter.

celelibiBibTopic

\begin{filecontents*}{\jobname-main.bib}
    @article{BigData,
        title={{3D Data Management: Controlling Data Volume, Velocity and Variety}},
        author={Laney, Doug},
        journal={META Group Research Note},
        volume={6},
        year={2001}
    }
    @article{NISTCloud,
        title={{The NIST Definition of Cloud Computing}}, 
        author={Mell, Peter and Grance, Tim},
        year={2011},
        publisher={Computer Security Division, Information Technology Laboratory, National Institute of Standards and Technology}
    }
\end{filecontents*}
\begin{filecontents*}{\jobname-web.bib}
    @online{TeslaK40,
        author = {\textsc{nVIDIA}},
        title = {{Tesla K40 and K80 GPU Accelerators for Servers}},
        url = {http://www.nvidia.com/object/tesla-servers.html},
    }
\end{filecontents*}
\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%\usepackage{natbib}
%\usepackage{bibentry}
%\usepackage{bibtopic}
\usepackage[natbib=true]{biblatex}
\addbibresource{\jobname-main.bib}
\addbibresource{\jobname-web.bib}

\begin{document}

The cloud by NIST~\cite{NISTCloud}. Nice graphic card:
\cite{TeslaK40}.

BigData:\par
\fullcite{BigData}

\printbibliography[title=Bibliography,nottype=online]
\printbibliography[title=Webography,type=online]

\end{document}
  • I moved to biblatex, it's very nice. But it required me more time than I'd have expected to convert my document. For instance, the bibtex backend doesn't handle the 3 letters code for the field month so I had to switch to biber. And some howpublished of my main bib file had to be converted to url. But in the end, it worked and biblatex seems a lot nicer than plain old bibtex. So... accepted. :) – Celelibi Feb 12 '15 at 23:52
  • @Celelibi Remember when bibtex came around. Over the years, people added packages to satisfy their needs. Almost 10 years ago development started on the biblatex/biber combo. There are many advantages. Changing the appearance for example is a bit time consuming, but doable using just LaTeX macros. No, strange beast files. – Johannes_B Feb 13 '15 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.