{include} is about the \include command which makes LaTeX process the content of a given file, add page breaks before and after and open a new auxiliary file for the given file.

learn more… | top users | synonyms

12
votes
3answers
995 views

I'd like to include Markdown in a LaTeX file

I have a LaTeX file, foo.tex and a bunch of markdown files {1..N}.markdown in the same directory. Basically, I'd like to be able to \include{1.markdown} and have the markdown rendered to LaTeX and ...
6
votes
1answer
457 views

Get {standalone} to ignore blocks of text from \input files (e.g., \begin{spacing} and \maketitle)

I've got a number of separate .tex files that are all \documentclass{article}. I'm inputting these into a \documentclass{book} file as chapters. In the book.tex file, then, I've got inputs like this: ...
12
votes
2answers
2k views

Splitting a large document into several files

Why is it recommended to split a large document into several parts and include them with \include? Is it only a relic of the past times when computers and LaTeX compilers were slower, or is it still ...
3
votes
1answer
821 views

\tableofcontents and multiple files from \include

I am trying to compile a table of contents with \tableofcontents{} from multiple files I have included (with \include, i.e. chapters). What do I need to do to get the chapters included in the table ...
4
votes
1answer
3k views

Using \verbatiminput on filenames with underscores

I'm trying to include some source files using \verbatiminput{}. Some of these filenames have underscores in them. This works fine by default. But if I try to include the underscore package so that I ...
4
votes
1answer
323 views

Including transformed XML

I need to include a transformed XML document into my LaTeX source. Transformation is specified inside the XML via XSLT. I recently started using LaTeX and I have bib database in XML. However, this XML ...
4
votes
1answer
209 views

How to change appearance of a particular line when using \lstincludelisting?

I'm using the listings package and include code into my document through \lstincludelistings. The problem is that I want to set some code lines to bold to indicate changes from previous code segments. ...
4
votes
2answers
173 views

Can a file know if it has been \include'ed or \input'ed?

I have a somewhat large User's Guide for a code I've been working on with collaborators. Each chapter is in a subdirectory of the top directory, which includes the .tex file that grabs and stitches ...
3
votes
1answer
190 views

Delimit a single auxiliary file into chunks, and include these at separate places?

I have a LaTeX file for inclusion, automatically generated by a code-documentation tool, so the fact it’s a single file is non-negotiable. However, I want to include it not all at once, but some ...
7
votes
3answers
9k views

Using relative paths for \include commands

I have a top-level latex file: /thesis.tex And subfolders with chapters: /chap1/ch1.tex In thesis.tex I use \include commands like so: \include{chap1/ch1} And in ch1.tex I have more includes for ...
0
votes
1answer
343 views

Include a file (chapter)

Is it fair to assume that if an \include command does not add a blank page both before and after, it is because the chapter starts on a page with an odd page number ? EDIT: I thought I was having ...
15
votes
3answers
2k views

Create list of all external files used by master LaTeX document?

Is there an easy way to create a list of all external files (complete path) which are used by a LaTeX document (and its "sub-documents") by \input \include \includegraphics ? (may I have forgotten ...
8
votes
5answers
676 views

Calling \end{document} in a macro

I have a file, which is meant to be used as a fragment file inside a larger document: \include{boilerplate} content \include{boilerplate} The goal is to make a fragment file compilable. So inside ...
3
votes
1answer
120 views

Add when the file was compiled to the draft document.

I would like to have on my draft-documents on the bottom something like compiled ch2.tex on July 21, 2011 at 18:46. My document has multiple files which I include by using \input. I have the ...
2
votes
2answers
800 views

use variable inside include/input

I would like to use a variable so I can define which file to include at compile-time (argument passed to LaTeX - see below). Problem here is that I cannot insert document name with "_", without ...
15
votes
6answers
2k views

\endinput: what is it for?

I am working on a big document and I am using the \include command to put chapters one after the other. On the internet I came to know about the existence of the \endinput command. However I do not ...
3
votes
1answer
133 views

Printing selected chapters without affecting cross-referencing

I am writing my thesis in Lyx and for some reason, probably due to the style sheet, I am unable to print the complete thesis. It gives weird errors. However, individually all chapters are easily ...
9
votes
3answers
1k views

Producing different versions of a document

I am writing a documentation for a software environment which will be composed of several subfile put together using the \include command. The thing is, I would like to be able to output different ...
4
votes
1answer
2k views

Generate a merged LaTeX file, with \input code in place?

I'm currently working on an experiment that involves re-typesetting a digitized physical book from OCRed images. For various reasons involving the workflow, the resulting project architecture is a ...
5
votes
1answer
653 views

What happens to a relative path in a file added with \input{}?

I stumbled upon the following question: In the preamble of my main tex file for my thesis, I've included several other files with definitions for abbreviations which are in the same path as main.tex, ...
12
votes
2answers
6k views

How to add a page number to the included PDF pages?

I'm creating a documentation with some included pdf files (mostly diagrams or tables) in the following way. \includepdf[pages=1-10, angle=90]{requirements/Requirements.pdf} The command ...
2
votes
0answers
480 views

Rubber and \include: Missing aux file [closed]

I'm trying to build a multi-file document with Rubber. In thesis.tex, I have: \include{intro} and I have a file intro.tex. It builds fine with pdflatex, but with rubber -d, I am getting the error: ...
4
votes
3answers
400 views

Can i automatically load chapters and sections based on the filesystem?

I was interested in knowing if i can load chapters and sections of my book based on the filesystem. For example: Chapter 1/ Section 1.tex Section 2.tex Section 3.tex Chapter 2/ Section 1.tex ...
5
votes
3answers
1k views

About \include in LaTeX

When using \include{file}, if the including file is a complete LaTeX document, with documentclass{}, \begin{document}, etc., it generates an error. It doesn't generate the error if I remove everything ...
3
votes
2answers
242 views

How can I place tables after first \autoref when tables are all defined in one place or contained in a separate file called by \input?

Background I have a set of tables that can be automatically generated (specifically, a set of database table descriptions generated by phpmyadmin). I would like to include each tables in the ...
4
votes
1answer
76 views

Removing whitespaces caused by separate source files

I have an article which consists of multiple files, a main file with following section includes: \include{Introduction} \include{ProposedProtocol} \include{Comparison} \include{FutureWork} ...
6
votes
1answer
2k views

Page break with \include

I like to print my drafts with big fonts and small margins (i do this in memoir style in a single chapter), but the \include comand creates a page break. Is there a way to avoid this and have section ...
12
votes
2answers
6k views

Multiple bibliographies

I have the following: \documentclass{report} \begin{document} \include{chapter1} \include{chapter2} \end{document} I also have a reference.bib file, with entries book1, book2 and book3. ...
13
votes
2answers
24k views

\graphicspath and \include

I am trying to define a central graphics path for my thesis, however, the chapters are included with the \include command and by using \include with \graphicspath, pdflatex complains about it can not ...
6
votes
3answers
544 views

Standalone compilation of sources intended for \input{} or \include{}

My LaTeX workflow involves frequent recompiles (good ol' C-c C-c in AucTeX). Right now I'm working on a large document that's composed of chapters, each in an individual file. I would like to use ...
4
votes
2answers
1k views

Figure environment not working with included file (extra } or forgotten endgroup)

I've spent hours on this issue. I hope someone can help me. I'm running into some kind of interference when I try to use the figure environment (Likewise for table, might be related to floats). I ...
3
votes
2answers
780 views

Recommended directory structure for separating presentation and content

For my bachelor thesis I am going to structure the files for my LaTeX document in a more sophisticated way, which means I would like to use different folders for different file types. Is there a ...
7
votes
2answers
282 views

Options for building multiple documents from the same content with different layouts

I need to produce two document layouts using the same content. I'm going to be making heavy use of the input{} command to do this, but it is more complex than just this. I'm looking for suggestions ...
10
votes
2answers
4k views

Where to put a custom macros file?

I have a bunch of common commands I put in document preambles. I don't always use them all, but it makes the preamble too long for my tastes. I want to put them all in an external file (preferably in ...
21
votes
5answers
18k views

How to include a document into another document?

I have two documents A and B. Both of them are separate documents. But document A also has to include document B. Now if I use \include{B} i get the following error: ! LaTeX Error: Can be used only ...
28
votes
1answer
3k views

Adding Table of Contents to existing PDF

How can I add a Table of Contents (TOC) to an existing PDF? I have an existing PDF (scanned notes from a class). I'd like to improve this basic scan as much as possible. I do not think that any OCR ...
3
votes
1answer
448 views

How do we do hierarchical includes with local paths?

I need to generate an appendix with hundreds of tables. I put several tables on a page, as an earlier question established. The first level consists of pure tables, created as ...
4
votes
1answer
375 views

Blank pages between pages of the same file and between pages in different files.

I'm writing in the "master document" style, using the \include command, and between pages of the same file included and between pages of different files some blank pages appeared. What do I do to make ...
3
votes
2answers
775 views

Using the “master file” with emacs and Sweave

One of the things I love about emacs is being able to specify a master file, then compile an included .tex file - I just use C-c C-b For sweave documents, I have the following layout: master.Rnw ...
2
votes
4answers
7k views

Combine several chapters (separate files) in to one report

I am writing my final year thesis. I was asked to write my report part by part. First I wrote the Introduction chapter. No I have completed the Literature Survey. Both these were written as two ...
1
vote
1answer
294 views

Change size of whole set of elements

I am trying to include some gnuplot-generated figures using the epslatex terminal, which creates an .eps file and a .tex file. The way to include these figures in the document is writing ...
15
votes
3answers
6k views

How to include audio file in PDF

How do I include audio file, or should I say, link to audio file in PDF? Audio should be playable "from PDF directly", without opening any additional window. Is it possible to attach audios to PDF ...
11
votes
2answers
2k views

How to make \include work with a quoted string path containing spaces?

In Windows, \input can work with a quoted string path containing spaces, but \include cannot. How to fix it? \documentclass{book} \begin{document} %\input works! \input{"Contents/Installing and ...
5
votes
3answers
4k views

Chapters and Formatting Headers

When I am composing a large document in LaTeX, I often compose the chapters in separate documents. When I do this I have to copy and paste a large block of header text to the chapter I am editing so I ...
27
votes
4answers
19k views

How to make the main file recognize relative paths used in the imported files?

I'm currently using doxygen to generate some documentation for a project, and doxygen generate some LaTeX code that then can be used to generate a nice pdf. But let's say I would like to write ...
14
votes
2answers
2k views

Keep chapter number of chapters inserted with \include

Okay, I've puzzled over this for a while and I can't work it out. I have a document with several chapters, using the memoir class. I've separated each chapter into separate files, and I'm including ...
9
votes
3answers
1k views

Combining Document Classes

I have a complicated document containing files with a letter as the first document followed by several article type documents. I have done this by setting up a master tex file with all the frontpeice ...
15
votes
2answers
2k views

Is there an \exclude option?

When I'm debugging a big multifile project, it's often useful to make extensive use of \includeonly to narrow down where the problem is. but today I found myself using: ...
18
votes
4answers
2k views

Include without pagebreak

I really like the \input command, but what I really like more is the \includeonly command. Is there a way to have the best of these worlds? (i.e. an \inputonly or an \include without page-breaks?)
12
votes
2answers
3k views

(How) can I include the file somedir/file.tex in the file somedir/subdir/anotherfile.tex

I know that it is possible to include somedir/subdir/anotherfile.tex in somedir/file.tex by using \include{subdir/file}. Is it possible to do it the other way around? A Linux workaround that I'm ...