5

Following the method described in the LaTeX Wikibook, I have set up the folders of my project in the following fashion:

Project...  
  main.tex  
  mystyle.tex
  img...
    fig1.png
  tex...
    frontmatter...
      awknowledgements.tex
    mainmatter...
      intro.tex        
      conclusion.tex
    backmatter...
      biblio.bib    

I can easily compile the complete document using \include:

\documentclass{book}
\usepackage{graphicx}

\usepackage{mystyle}
\usepackage{hyperref} 

\begin{document}

\author{Erika Mustermann}
\title{My BIG Project}

\frontmatter
    \maketitle
    \include{./tex/frontmatter/awknowledgements} 
    \tableofcontents

\mainmatter
    \include{./tex/mainmatter/intro}
    \include{./tex/mainmatter/conclusion}

\backmatter
    \clearpage
    \bibliography{./tex/backmatter/biblio/}

\end{document}

This works without any problem. However, if I try to compile a limited number of chapters using the following \includeonly, I get errors and the document doesn't compile:

...
\includeonly{./tex/mainmatter/intro}
...

Database file #1: ./tex/backmatter/biblio.bib (There were 3 error messages)

Sorry, but "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\texify.exe" did not succeed.

The error messages are namely:

intro.tex Package natbib Warning: Citation `Mustermann_2016' on page 1 undefined on input line 5.
main.tex Package natbib Warning: There were undefined citations.
main.tex LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

(There is only 1 citation in intro.tex.)

I'm not sure if there's something I'm doing wrong or missing. I read that it might have something to do with being unable to find the .aux file, but I'm not sure if there's a way to solve it. I moved my bibliography file into the top project folder where the main.tex is saved, but that doesn't seem to solve the problem. I also saved everything into the top-level folder and the issue was not resolved. Perhaps it is in the way that I make the bibliography? Any hints and suggestions would be appreciated!

Edit Using \includeonly works fine when the bibliography is commented out which is what led me to believe the issue is there.

  • 1
    FWIW: \bibliography{./tex/backmatter/biblio/} looks wrong, why the final slash? – Blaisorblade Jul 25 '17 at 1:54

Your Answer

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

Browse other questions tagged or ask your own question.