1

I am getting desperate with including bibunits in order to create references for each chapter of my thesis. When I bibtex the file I get the following error message:

The top-level auxiliary file: phd1.aux A level-1 auxiliary file: bu.aux I found no \bibstyle command---while reading file phd1.aux (There was 1 error message)

Any help is highly appreciated!

adn
  • 11,233
Adrian
  • 11
  • 1

1 Answers1

2

Here is a small MWE that I suspect may contain one the necessary definitions that may be missing in your code.

\begin{filecontents}{mytestbib.bib}
@book{goossens93,
    author = "Frank Mittelbach and Michel Goossens  and Johannes Braams and David Carlisle  and Chris Rowley",
    title = "The {LaTeX} Companion",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}
\end{filecontents}

\documentclass{report}
\usepackage{filecontents}
\usepackage{lipsum}
\usepackage[numbers,square,comma,sort&compress]{natbib}
\usepackage{bibunits}
\defaultbibliography{mytestbib}
\defaultbibliographystyle{IEEEtranN}
\renewcommand{\bibname}{References}   
%\nocite{*}     % list all refs in database, cited or not

\begin{document}

\chapter{Example}
    \renewcommand{\bibsection}{\section*{\bibname}\markboth{\leftmark}{\bibname}}
    \begin{bibunit}
        \section{A section}
            There is text in a section, \lipsum and sometimes a reference is needed \cite{goossens93}
            \putbib 
    \end{bibunit}

    \begin{bibunit}
        \section{A second section}
        There is text in a section, \lipsum and sometimes a reference is needed \cite{goossens93} \lipsum 
        \putbib 
    \end{bibunit}
\end{document}

I prefer to compile the code with command line tools. If you are on windows leave me a comment and I can provide some command line instructions for MikTeX specific to xelatex and bibunits.

EngBIRD
  • 3,985