GeneralError ! File ended while scanning use of \@xdblarg.<inserted text>\par \include{chapter2}

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
DavideIng
Posts: 1
Joined: Tue Jan 30, 2018 11:32 am

Error ! File ended while scanning use of \@xdblarg.<inserted text>\par \include{chapter2}

Post by DavideIng »

Hello,
I am aware that this kind of error has already been discussed in this forum but the answers that I have read don't help me to fix mine.
So, I get this error:

! File ended while scanning use of \@xdblarg.<inserted text>\par \include{chapter2}

I have sorted my document in chapters, the code of the main document is the following:

Code: Select all

\mainmatter{
\include{introduzione}
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{chapter5}
\include{chapter6}
\include{chapter7}
\include{chapter8}
\include{conclusion}
}
I know that code is just a label to call each chapter but most of the others statements are only package, tell me if is useful to post the whole code to figure out the issue.

Many thanks
Davide

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Error ! File ended while scanning use of \@xdblarg.<inserted text>\par \include{chapter2}

Post by Stefan Kottwitz »

Hi Davide,

welcome to the forum!

\mainmatter is a switch, so remove the curly braces of that command. Otherwise all chapters are in the argument (parameter) of \mainmatter but that one has no argument.

Stefan
LaTeX.org admin
rbarrphd
Posts: 1
Joined: Mon Dec 21, 2020 7:12 am

Error ! File ended while scanning use of \@xdblarg.<inserted text>\par \include{chapter2}

Post by rbarrphd »

Thank you, Stephan, for saving my day yesterday with your 2018 post! I could not find the source of my mistake and the error message was not exactly helpful. Just one missing } kept the document from compiling and your post gave the answer after an hour of distress. Thank you very much.
Post Reply