Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [include]

{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.

1
vote
0answers
16 views

Suggested way to embed or include an article as an appendix within another book?

I have made an scientific article using LuaTeX because I need to publish it on a journal. It's already completely written and laid out. Now, I also need to write my thesis and include the former ...
1
vote
1answer
28 views

Aligning \includestandalone{} graphs

I have these two standalone bar graphs that are identical in size, but when I \includestandalone{} them, to insert them into my main document, I can't for the life of me get them to line up. If I put ...
0
votes
0answers
20 views

Size of document changes when printed in paper, and size of PDF changes when included as is

I am using this LaTeX template for an academic thesis. I have two problems with the size of the page: When the document is displayed on a screen, it shows the normal page margins you'd expect. ...
0
votes
1answer
35 views

Problem using Part in main file while %including chapters

I am using MikTex and WinEdt on a Windows machine. I am writing a book and right now I have it structured with chapters, sections etc. I want to add parts. Here is my main file \documentclass[...
0
votes
1answer
32 views

“Run section” in LaTeX?

Anybody know of any LaTeX/TeX package or GUI that allows LaTeX script to be run in sections? I'm after a feature similar to MATLAB's "run section" feature. My LaTeX documents tend to take ages to ...
4
votes
2answers
50 views

What is the purpose of ../ in \input and \include?

I sometimes see \include{../foo} and \input{../bar.tex} in code examples online. What does the ../ means? What does it changes? What are its advantages? How is it possible to use it?
0
votes
2answers
56 views

incorporation problem in book class

I 'm writing a book and I 'm trying to incorporate the chapters that are in other tex files. I have these chapters: ch1.tex \chapter{1st chapter} \begin{examp} example1 example1 \end{examp} text1 ...
1
vote
1answer
52 views

Saving tikz figures in external file

I have several tikz figures, some of which are over 400 lines of code. This complicates my working on the main file since I have to scroll past all that code quite often so I was thinking I put it in ...
0
votes
0answers
38 views

Preprocess a .tex file and save it as a new file

I have several .tex files that I would like to share with other people. I've included in them (with the command \input) several files with macros that I've written myself. However, I would like to ...
3
votes
1answer
39 views

Include specific parts of a standalone subfile

I'm trying to compile one main file of exercises where each exercise is a standalone TeX file. standalone is the perfect package for that but it lacks the customizability to choose a specific part of ...
1
vote
1answer
22 views

Add an indent to appendix line in ToC for included appendix

I asked how to add an indent to a toc line for an appendix here. In my real structure I am including the appendices: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \...
0
votes
0answers
39 views

How to structure my thesis

I am currently writing my BSc thesis and want to use LaTeX. I am using Texmaker on Windows and have several problems that occured. I want to use BibTeX for my literature and \bibliographystyle{...
0
votes
1answer
42 views

fancy header not working with \include

I am using fancy header to insert the chapter title in the header of each page, as shown below. It works properly for the table of contests and lists of figure/tables, but when it comes to the ...
4
votes
1answer
139 views

Why does the \includeonly command not \stepcounter the chaptercounter for omitted chapters?

I'm a big fan of the \includeonly command, to keep pagecounts intact while only printing specific chapters. But I'm wondering why chaptercounters are not stepped in a scenario such as this one: \...
1
vote
1answer
46 views

How do I tell XeLaTeX where to find the .bbl files?

I am trying to compile a multi-chapter dissertation. I am using chapterbib so I run bibtex on each chapter. xelatex dissertation bibtex chapters/chapter1 bibtex chapters/chapter2 xelatex dissertation ...
0
votes
0answers
20 views

Partial compilation of part of a document without breaking the page

I'd like to avoid recompilation of unchanged sections of my documents. However, I don't want new sections to be on new pages. Suppose this is my document: I only want the second section to be ...
4
votes
1answer
70 views

Build one single .tex file from a .tex file with multiple \input

Edit: I think this question is sufficiently distinct from this question because I am specifically asking for a method within TeX itself, i.e. not running some Perl script separately to do this, but ...
2
votes
1answer
137 views

Texmaker (& similar) - How to \usepackage{svg} especially on Mac OS

I'm using TexMaker on Mac and try to include some svg's to my document. I think my question is very similar to this one svg package failing to find svg files But I can't solve my problem. I already ...
0
votes
1answer
21 views

Custom page numbers fail on last page of included chapters

TL;DR when I include an appendix into my master report, the custom page numbering fails on the last page of each appendix. How can I fix it? I am creating a long report with appendices. I want ...
2
votes
1answer
162 views

Include a text file as a paragraph

I am trying to input a text file to latex. However, this text file contains special symbols like % and & which causes issues. I do not want to import the file as verbatim, it should be imported ...
0
votes
0answers
26 views

Is it possible to `\include`/`\input` a text depending on the language set on babel or polyglossia

I would like to know if it is possible to conditionally require, in a given document, the inclusion of a chapter or the input of a particular piece of text, depending on the language set on babel or ...
1
vote
0answers
51 views

Weird chemfig 1.33 behaviour with polymerdelim

I observed a very weird behaviour regarding chemfig and the polymer delimiters. I have created a minimal working example: main.tex: \documentclass[12pt,a4paper,ngerman]{article} \include{preamble} %\...
1
vote
1answer
58 views

question - answer system

Please excuse my poor English. I have a question regarding a "question - answer" system in latex. I want to create a quiz with 1000+ questions/answers like this: Question_1 Question_2 ... Question_n ...
0
votes
1answer
47 views

conflict between \include and the \hyperref package

In the MWE below, an error is thrown by the command sequence pdflatex mwe ; pdflatex mwe when mwe.tex is \documentclass{amsart} \usepackage{hyperref} \includeonly{} \begin{document} \include{refFile} ...
1
vote
0answers
51 views

Using \include with file names that contain symbols and spaces

I need to include a chapter of a book if the name of the folder and the file contacting in is chapter1 and chapter1 respectively. I just do \include{chapter1/chapter1} and everything is ok. The ...
1
vote
1answer
95 views

Table of contents of included pdf

How can I do a table of contents, list of figures and list of tables of included pdf \documentclass{memoir} \usepackage{pdfpages} \usepackage{hyperref} \usepackage{cleveref} \begin{document} \...
12
votes
2answers
558 views

How do I create a PDF document whose height exactly matches the contents?

I have a document that is about 1/3 to 1/2 page long. I want to compile it to a PDF document. That PDF document will be included in another document, so I want it to be short - it should contain only ...
1
vote
2answers
53 views

I'd like to put a full pdf page in my document, but it doesn't work!

i've got an issue. I'm writing a LaTeX document, i would like to make a page of my final document as a pdf file (that is a text). I searched on this site but no one of the existing topic helped me. I ...
0
votes
0answers
32 views

One latex document to another latex document referencing

I have a latex document named L1. The content of this document to another latex file(L2). Is it possible to referencing L1 to L2 such that all the content of L1 will come to L2. Example: Content of ...
5
votes
1answer
166 views

Same absolute path works for \input but does not work for \include, why?

If I use the command "\input{filepath}" then the file is perfectly printed in "main.tex". If I only change the command to "\include{filepath}" I get the following error: I can't write on file `...
0
votes
1answer
40 views

Override macro with \renewcommand{} multiple times from different files - toc addcontentsline

Intro While trying to get my head a round my current problem (To add a line to the toc, depending on the comparison of the values of two makros/commands: please see here: Add tocline depending on ...
0
votes
1answer
51 views

Entire chapter as subsection

I have a document with 3 chapters. I would like the chapter 2 - Dolor, to appear as a section 1.1 in the table of contents, instead of chapter 2. I have separate file for each of the chapter and it ...
2
votes
1answer
73 views

bug in frankenstein?

I cannot get includedocskip in the newclude package to work. As far as I can tell, it requires the allocate option, but this option loads allocate.sto, which uses an InitWheel command that has not ...
3
votes
1answer
71 views

Possible ways to split up and then recombine lecture notes

I'm teaching Math Methods of Physics this fall, and want to provide written notes after class for the students to use. I'd like for them to be individual lectures, but combinable into one document ...
2
votes
0answers
22 views

arranging the sections with \include [closed]

As we know, it is possible to use \include{chapter name} to have a more convenient manuscript. The question is, is it possible to order the sections by meant of \include too?
0
votes
1answer
133 views

Include fails with error “can't write on file aux”. Included file does not have the .tex extension

I'm trying to migrate my LaTeX documents to better work with Git. One step in this is separating them out, which given the length is a good idea even if I wasn't using Git. To this end I am trying ...
1
vote
1answer
26 views

Store chapter name from unincluded part (potentially in part's aux file)

I use \include to insert parts into a large document. Some of the parts contain chapter declarations, others only sections. I would like to make the current chapter name available in the daughter ...
1
vote
1answer
131 views

Use glossaries-extra + bib2gls with secondary files via \include instead of \input

Explanation I've been writing a larger document for a while and used makeidx to produce my index. However, this seemed to be not flexible enough, so I swapped to the more sophisticated glossaries-...
0
votes
1answer
40 views

LYX : import blank file.lyx with a preamble

I have some problems using LyX. So I have a blank custom cover page but I use the preamble to put some LaTeX code and do my stuff (write text, import picture, title, author, etc.). I have my main.lyx ...
0
votes
2answers
73 views

LaTeX starts new page after using 'includegraphics'

I placed a picture in a new chapter but LaTeX puts it on a new page. But I want to have the picture under the topic of the chapter. My code looks like this: \tableofcontents \listoffigures \chapter{...
0
votes
1answer
334 views

include sql files and use minted for highlighting

I write in latex a documentation about a database project. I would like to include some sql files in my latex document and highlight this files with minted. My initial approach is the following, ...
0
votes
1answer
44 views

Embed two {Standalone} in {article} with /minipage

I have to embed four documents{standalone} in another document{article}. \includestandalone is not working for me. (I have the data in the same folder, therefore the /./) I tried to include with this ...
1
vote
2answers
320 views

Section on one page with includepdf [landscape]

I want to include a PDF in landscape (its a table in PDF form) with include PDF. I want a section on the same side, but when I use this command, the section heading is not on top (of that landscape ...
3
votes
1answer
119 views

Remove file path from lstinputlisting

I would like to achieve the following ornament: For the university we have to convert code into a PDF. To make this easier I use the following macro: \newcommand{\includecode}[2][code]{\...
3
votes
1answer
230 views

How to make document background non-transparent?

I've created a tool to include PDF documents on a larger page to provide margins and a grid to facilitate commenting and markup. I'm happy with the results except that the grid background behind the ...
0
votes
2answers
225 views

\input and \include for a thesis

I'm writing a thesis but not modular style. I simply write everything in one big document and want to change it. But there is a problem. For sections must not I start with \begin{document} again? ...
1
vote
0answers
98 views

blank page after includeonly

Following this previous post regarding a conflict between \includeonly and the hyperref package, here is another problem I found with \includeonly. With the following mwe,a first compilation ...
0
votes
0answers
83 views

includeonly and page numbering

I am writing a fairly large documents that contains different chapters included in the main .tex file using the \include command. I find this to be practical as I can then compile a single chapter ...
0
votes
1answer
143 views

Does splitting tex documents into multiple ones improve build performance

I've seen this mentioned often, for example, in several answers here. But I have my doubts. Do LaTeX engines (latex/pdflatex/xelatex/lualatex) do incremental compilation at all? Besides, even if they ...
0
votes
2answers
105 views

Trouble compiling locally due to \include{directory/file.text}, but works in browser

I am struggling to compile a file locally either in TexMaker or Atom that nevertheless compiles fine on ShareLatex.com (where I originally made it). My file is of the form... \documentclass{article} ...