Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Apr 25 '13 at 20:07

This question came from our site for professional and enthusiast programmers.

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. –  David Carlisle Apr 25 '13 at 20:11
    
Related: When should I use \input vs. \include? –  Werner Apr 25 '13 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. –  user2318493 Apr 25 '13 at 22:25

1 Answer 1

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.

share|improve this answer
    
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" –  user2318493 May 3 '13 at 18:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.