GeneralProblem with nested '\include'

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
manojg
Posts: 24
Joined: Thu Apr 28, 2011 3:20 am

Problem with nested '\include'

Post by manojg »

Hi,

I have many separate .tex files and are included in main.tex file:

Code: Select all

\include{a.tex}
\include{b.tex}
\include{c.tex}
So far no problem.

I have another d.tex file that I want to include inside b.tex file. But it shows me error when I include d.tex inside b.tex:

Code: Select all

! LaTeX Error: \include cannot be nested.
Is it not allowed or am I doing something wrong?
Thanks.

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problem with nested '\include'

Post by localghost »

manojg wrote:[…] Is it not allowed or am I doing something wrong? […]
I think the error message is very clear in this regard.


Thorsten
manojg
Posts: 24
Joined: Thu Apr 28, 2011 3:20 am

Re: Problem with nested '\include'

Post by manojg »

\input works but it does not start from new page, I want to start d.tex after end of b.tex. Any solution?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Problem with nested '\include'

Post by localghost »

Then just include »d.tex« after »b.tex« and not within.
manojg
Posts: 24
Joined: Thu Apr 28, 2011 3:20 am

Problem with nested '\include'

Post by manojg »

localghost wrote:Then just include »d.tex« after »b.tex« and not within.
Yep, that solve the problem. Thanks.
Post Reply