1

Thanks first of all for the previous times that I have already found answers to my problems without having to post anything!

My problems is as follows: when I compile my main file only after I have done Bibtex on my chapter, it gives the following errors:

! Extra \else.
\@include ...ediate \closeout \@partaux \fi \else 
                                                  \deadcycles \z@ \@nameuse ...
l.26 \include{MWE}

I'm ignoring this; it doesn't match any \if.

Same for Extra \fi.

An MWE for the main file is:

\documentclass[
        twoside,openright,titlepage,numbers=noenddot,headinclude,
                cleardoublepage=empty,
                BCOR=5mm,paper=b5,fontsize=9.5pt, DIV=14,
                dutch,american, % Languages
                ]{scrbook} 
\input{classicthesis-config}                

\begin{document}
\include{MWE} 
\end{document}

For the chapter MWE it is:

\chapter{MWE}
\label{MWE}

\noindent \lipsum \cite{Abramowitz:1972}

\bibliographystyle{aa}
\bibliography{Bibliography}

I further use

 \PassOptionsToPackage{round,authoryear}{natbib}

and

\usepackage{lipsum}

in the classicthesis-config.tex and the following style file: A&A journal


Compilable example:

\begin{filecontents*}{\jobname.bib}
@Book{        Abramowitz:1972,
  author    = {{Abramowitz}, M. and {Stegun}, I.~A.},
  title     = "{Handbook of Mathematical Functions: with formulas, graphs, and mathematical tables}",
  keywords  = {Functions, Mathematics},
  booktitle = {Handbook of mathematical functions},
  address   = {New York},
  publisher = {Dover},
  year      = 1972,
  adsurl    = {http://adsabs.harvard.edu/abs/1970hmfw.book.....A},
  adsnote   = {Provided by the SAO/NASA Astrophysics Data System}
}
\end{filecontents*}
\begin{filecontents*}{\jobname-chap.tex}
\chapter{MWE}
\lipsum \cite{Abramowitz:1972}
%\bibliographystyle{aa}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{filecontents*}
\documentclass{scrbook} 
\usepackage[round,authoryear]{natbib}
\usepackage[sectionbib]{chapterbib}
\usepackage{lipsum}
\begin{document}
\include{\jobname-chap}
\end{document}
David Carlisle
  • 757,742
  • you mention classicthesis but your example code doesn't use that package at all? – David Carlisle Feb 24 '15 at 19:27
  • 1
    The example just generates ! Undefined control sequence. l.4 \noindent \lipsum please edit it so that it generates the error in the question. – David Carlisle Feb 24 '15 at 19:30
  • http://chat.stackexchange.com/transcript/message/20235887#20235887 <- Please test this MWE. Copy the content to a new file, run it. It contains all the information you have given us. I cannot know, what might be in your config file, that might lead to the behaviour. – Johannes_B Feb 24 '15 at 20:47
  • Please post the MWE in your question. Several reasons: (1) your question should be useful to other users, even if the external link changes or disappears; (2) preparing the MWE is part of diagnosing the issue, and it is the part which you can do even if you cannot get to the final diagnosis without help; (3) many people will be extremely reluctant to download a .zip posted by a complete stranger on a public site. (I won't do this.) How to create a minimal working example (MWE). – cfr Feb 24 '15 at 22:20
  • 1
    Note that the non standard aa bib style is not needed you can use \bibliographystyle{plain} and get the same error looks like natbib and chapterbib are not wanting to play together – David Carlisle Feb 24 '15 at 23:02
  • This is a duplicate: remove [sectionbib] and add \KOMAoption{bibliography}{leveldown} – David Carlisle Feb 24 '15 at 23:21
  • Note that once you had provided a MWE showing it was a chapterbib/natbib problem, searching on site revealed the duplicate question (and answer) immediately. It's always worth making a MWE:-) – David Carlisle Feb 24 '15 at 23:23

0 Answers0