2

I want to include a document in one of my section. For example,

\section{Introduction}
We are blablabla.....

\section{Our Previous Document: Document 1}
\include{Document1.tex}

Unfortunately, when I tried to build it, I couldn't see the document (document1) in my section. Can anyone help me?

  • 4
    if it didn't work there was presumably an error, but as you neither showed the error nor showed the file that was included impossible to say. You do however want \input not \include otherwise you will have a page break after the section heading – David Carlisle May 29 '17 at 17:55
  • @DavidCarlisle Hi, I didn't show the error because there isn't any. – lukehollup May 29 '17 at 17:57
  • So you see a section for "Introduction", a section for "Our Previous Document...", and then whatever is immediately after your failing include command, with nothing in between it and the "Our Previous Document..." header? – Mike Renfro May 29 '17 at 18:00
  • 2
    @lukehollup that's unlikely. Does your Document1.tex by any chance include a preamble? – Skillmon May 29 '17 at 18:00
  • 1
    @lukehollup it is really hard to make tex drop text without showing an error, but if you do not show the input nor log file (even an error free log) then how can anyone help? – David Carlisle May 29 '17 at 18:02
  • 1
    unless you have used \includeonly (but once you change the \include to \input then even \includeonly would not be a problem. – David Carlisle May 29 '17 at 18:03
  • I think the issue is the documents collapse with each other. I noticed that the table of content is overlapping after I put \include{} – lukehollup May 29 '17 at 18:04
  • 3
    only you can see the document if you just give vague descriptions without showing the errors and without showing any code that anyone can debug, then no one can help. Make a small complete document that shows the problem, then post that as an example, then probably someone will debug it and tell you how to fix it within minutes. – David Carlisle May 29 '17 at 18:10
  • @lukehollup Overlapping with what? I thought you said the document didn't appear at all? Since \include starts a new page, hard to see how it could overlap. – cfr May 29 '17 at 19:45
  • As stated \include is the wrong command here, use \input. Please see https://tex.stackexchange.com/questions/246/when-should-i-use-input-vs-include for more information. – Martin Scharrer Sep 26 '18 at 05:30

0 Answers0