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.

0
votes
1answer
29 views

Problem with a child-document within a table

I ran into a problem with the \include/\input command. I want to generate a table based on the child document somedoc.tex, which looks as follow $$12.67$$ & $$6.18$$ & $$5.00$$ & $$60.33$$...
1
vote
1answer
39 views

How to find out the page span of a section

I have several short documents out of which I want to build a larger document, each smaller document corresponding to a section in the larger document. I want to set the footer to contain the name of ...
1
vote
0answers
41 views

include files from specific folder

New linux (mint) user, with pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian), using TexStudio (that might change) I have custom files (sty's and whatnot) in a folder that I cannot move (...
0
votes
0answers
14 views

Severals files with \include [duplicate]

Good morning. I have a directory with several *.tex files. Then I have a main file with the preamble. How can I insert in the main file all the files of the directory with the command \include without ...
1
vote
1answer
40 views

Recursively search parent directories when including/inputting file

I'm wondering if it's possible to modify the function of the \input command so that e.g. \input{macros} would work recursively. Variant 1 Check if macros.tex exists in the current directory. If ...
0
votes
0answers
15 views

xelatex option -output-directory problem with include command

My setup is texlive2019 + texstudio, compiler is xelatex, I setup "temp" folder for aux files in root folder same as main tex, use this command xelatex.exe -output-directory=temp -synctex=1 -...
0
votes
1answer
23 views

Inclusion of separate files in a main file show error for graphics

When I call two separate files(chapters) from a main file, it shows error for graphicx. Details are bellows: (i) The main file main.tex contains following contents: \documentclass[a4paper,...
0
votes
1answer
28 views

How can i remove this blank page after my list of figures?

All chapters of my work have enough text in them to fill atleast two pages, so this is not an issue, but for my list of figures, i get this empty page after wards: This is my main page: \...
0
votes
0answers
16 views

ToC as enumerated list + Separate ToC's for each \include{filename.tex}

I am hoping to accomplish two things here. The first is that I would like to have a Table of Contents that looks exactly like a typical \begin{enumerate} \item \end{enumerate} list, where each \item ...
1
vote
1answer
36 views

How to only \include as much data as fits on a single page in ConTeXt?

I need to \include data from several different files, showing the contents of each file on a separate page (e.g. file1.tex on page 1, file2.tex on page 2), but cut off any extra data if the contents ...
0
votes
2answers
61 views

How to include all files in a directory in ConTeXt?

I need to include a large number of files in my ConTeXt document: \starttext \include file1 \include file2 \include file3 \include file4 \include file5 \stoptext They are all ...
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
33 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
22 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
36 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
42 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
53 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
60 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
78 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
39 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
60 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
37 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
44 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
49 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
155 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
52 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
22 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
92 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
198 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
22 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
170 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
32 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
63 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
59 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
50 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
62 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
160 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
562 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
61 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 ...
5
votes
1answer
177 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
53 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
75 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
73 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
24 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
176 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
28 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
138 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
48 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
85 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{...