0

I am trying to include chapters in a document without page breaks and found the newclude package can do this using \include*, however, when I try to implement it, instead of inputing the file, I just get text.

I have something like this...

\input{Layout.tex}  %Here I have some layout stuff for page numbering and such
\input{Macros.tex}  %Here I have the \usepackage{newclude} command
\begin{document}
\input{TitlePage.tex}

\chapter{Introduction}
\include*{1-Introduction}

\end{document}

The output is fine through the title page, but the Introduction has the chapter at the top with Introduction and the text is 1-Introduction. I'm not sure what I'm doing incorrectly with this file.

The above compiles fine using the normal \include command without the newclude package.

3
  • 1
    why not simply use \input rather than a non standard include mechanism if you do not want to force page breaks, on the other hand in most classes \chapter forces a page break anyway so the forced break from include is not a problem. Commented Apr 25, 2013 at 20:11
  • Related: When should I use \input vs. \include?
    – Werner
    Commented Apr 25, 2013 at 20:52
  • I forgot to mention, I am trying to do a bibliography after every chapter, including only the entries for that chapter, then a large bibliography at the end including everything. Using \input makes the entire bibliography appear at the end of every chapter. Commented Apr 25, 2013 at 22:25

1 Answer 1

2

If the text "1-Introduction" is on a new page, then I think you have forgotten to load the package newclude. The original LaTeX definition does not know a star form of \include. Then

\include*{1-Introduction}

does the same as:

\include{*}
1-Introduction

The star becomes the file name argument for \include, likely the file *.tex does not exist. This is written to the terminal/.log file:

No file *.tex.

\include calls its \clearpage and then the text "{1-Introduction}" is set. The curly braces are not used as argument and are executed as simple group (with no purpose/effect here).

Summary

The package newclude should be loaded:

\usepackage{newclude}

to get its star form of \include.

1
  • You were correct, somehow the "newclude" package wasn't getting loaded. But now I have a different problem. The page break is gone, but now the entire bibliography is at the end of every chapter (and without numbers), so I'm back where I started when using "\input" Commented May 3, 2013 at 18:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .