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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
89 views
+100

chapterbib with subfiles for sections

I'm using chapterbib for a long document and the creation of bibliographies for each chapter works fine. Each chapter is in its own file that gets included. Is there any option to split the chapter ...
gothicVI's user avatar
  • 536
1 vote
1 answer
46 views

Overleaf 'forgets' user defined commands in different tex files [closed]

I am working on my master thesis and thus have a lot of different tex files which get included in main.tex (using \include{}). However I now face the problem that all commands I define in the preamble ...
BrakkoFTW's user avatar
2 votes
2 answers
40 views

Testing the appartenance to a list

I want to have a command \myInclude{} doing the following thing: \myInclude{} does nothing (if the argument if empty) \myInclude{file.tex} includes the file named file.tex if it has not been ...
Colas's user avatar
  • 6,518
0 votes
1 answer
70 views

\include{Glossary} does not work [duplicate]

I am writing the final version of my PhD thesis. Everything works fine except that the Glossary external file I created is completely ignored by the program. I am using Texstudio to compile it. The ...
Federica Tonti's user avatar
0 votes
0 answers
13 views

How to avoid pagebreak using input? [duplicate]

I'm just starting to use TeX, and I'm having a lot of trouble with it, which is why I'm asking. I am creating a solution of Lang Algebra for my personal collection. Since there are a lot of exercises, ...
MH.Lee's user avatar
  • 101
0 votes
1 answer
53 views

Can't build an included file, using texstudio [closed]

I'm doing my thesis in LaTeX, and have multiple chapters, separated in different .tex files and included in the main.tex using \include{}, which worked normally, and I can build it, without returning ...
JJP's user avatar
  • 57
0 votes
0 answers
38 views

Please suggest which method is correct to proceed

I'm using the following tags to generate a project: \documentclass{book} \begin{document} \frontmatter \include{fm} \mainmatter \include{ch01} ... \include{ch10} \backmatter \bibliographystyle{...} \...
GowriSaro's user avatar
  • 418
0 votes
0 answers
24 views

Reference an entire environment with its content

I have big-book.tex containing many exercises in \begin{problem} environments, and I want to make a homework.tex for students selecting only a few of them. Here are some methods I can think of: Copy-...
AvidSeeker's user avatar
0 votes
0 answers
12 views

problem with \cite{} in multipart article with separate bibliographies for each \include{} file

I've got a little problem with the consistency of \cite{} across multiple \include{} files, where each such file gets its own bibliography. Just to be clear: I'm not using natbib. Each \include{} file ...
Tim02130's user avatar
0 votes
0 answers
26 views

how to reduce vertical space before parts and increase chapter size in table of contents

currently writing a Geometry textbook and the start of the table of contents looks like this: With this code, using the tocloft package for my TOC: Edit: Here is what the beginning of each chapter ...
Nate's user avatar
  • 21
0 votes
0 answers
18 views

Function sync does not work when using include on TeXShop

I am writing a book and, to manage all the chapters, I use the function \include as in the example below \begin{document} \include{chapt1.tex} \include{chapt2.tex} ... \include{chapt10.tex} \end{...
AlmostSureUser's user avatar
0 votes
0 answers
138 views

Import a table and figure from another tex file

Is it possible to include the whole content of the table and figure in another tex file? Let's say we have A.tex \documentclass{article} \begin{document} write something here. \begin{table}[tbp] ...
yangtzech's user avatar
2 votes
1 answer
105 views

What is the correct way to import files within subfiles?

The subfiles docs explains that it handles path issues when main files and subfiles are in different directories and subfiles contain paths relative to their own directories using the \import package. ...
socialscientist's user avatar
3 votes
2 answers
63 views

How do (relative) paths work with the subfile package?

I am trying to understand how (relative) paths need to be used with the subfiles package. In particular, it's not clear how content that I usually would include with \include, \input, \includegraphics,...
socialscientist's user avatar
0 votes
0 answers
37 views

Is there a way to `\includeonly` when the memoir document is monolithic?

When writing a memoir document it's easy to focus on just one chapter by using \includeonly. \documentclass{memoir} \title{title} \author{author} \includeonly{chap-3} \begin{document} \include{chap-0}...
Sam's user avatar
  • 385
1 vote
0 answers
26 views

Make a list of labels from other included chapters

I try to automatically generate a list of relevant \label in the form of hyperrefs. I almost managed to do what I want, using a solution proposed in this topic: List of all labels with hyperlinks Here ...
user290444's user avatar
0 votes
0 answers
21 views

knitr + tikzDevice + apa7 class + input in premable produces "unable to calculate metrics" error

When using the apa7 class and input{} in the preamble, knitr chunks with the option dev='tikz' will no longer produce images and instead print out an error message. Here is a MWE: \documentclass[man]{...
abeeisnotabug's user avatar
1 vote
1 answer
46 views

Why does \WithSuffix\providecommand overwrite command already defined by instance of thmtools's restatable environment?

Consider the output of this MWE: \documentclass{book} \usepackage{amsthm} \usepackage{thmtools} \usepackage{suffix} \declaretheorem[numberwithin=chapter, style=plain,name=Theorem,refname={theorem,...
Linear Christmas's user avatar
0 votes
1 answer
63 views

TeXstudio problem compiling

I am writing a long document (thesis). I have a main.tex file, and several individual files, for each thesis' chapter. These files are included in the main file using the \include command. I had ...
Marlon Calispa's user avatar
0 votes
1 answer
47 views

\input function doesn't work: trying to include contents of external text file

I want to include the contents of an external text file into my LaTeX document. I've tried \input{./message}, but all I get is an error containing the very last line of the text file: (./message.txt ! ...
GPWR's user avatar
  • 255
2 votes
0 answers
80 views

How to define path for use with /input, such that TeXStudio can detect the location of the file using global command

Background I am writing a large document (main.tex) with several chapters (Introduction.tex, LiteratureReview.tex, etc). I use TeXStudio to compile the document. Each chapter is included using /input (...
Bernardo's user avatar
0 votes
0 answers
25 views

Avoid page break between section title and included subsections [duplicate]

When I apply the following code, I have a page break between the \section{*} and the \include{chapters/*.tex} (the chapters are composed of subsection). I would like to have no page break between the ...
C. Guff's user avatar
  • 135
1 vote
2 answers
48 views

Import Information into Several Documents from a Master Document

Context: I'm a university lecturer and therefore facing the same tasks whenever I prepare for a new semester. One of them is creating course material with LaTeX which includes a syllabus, slides for ...
macright's user avatar
0 votes
0 answers
50 views

Export parts of tex file separately

I'm writing a longer document and need this version, where everything is put together, and a few parts of the file in seperate pdfs. For example it might be that I need subsection 1.2 as a standalone ...
Hannes's user avatar
  • 11
1 vote
2 answers
62 views

RequirePackage and usepretex from latexmk change output file to texput.tex

I want to compile a larger file completly based on a toggle (my@final) from the commandline using a makefile. My .tex-file looks like: \documentclass{scrbook} \begin{filecontents}[overwrite]{01.tex} ...
lukascbossert's user avatar
0 votes
0 answers
22 views

Tufte-book does not include everything covered by \include command

I typed up and compiled a simple tufte-book, something like this: \documentclass{tufte-book} \title{Blah} \author{Blah} \begin{document} \maketitle \tableofcontents \include{chapter1} \include{...
crmdgn's user avatar
  • 2,568
0 votes
0 answers
78 views

How to put everything in front of \begin{document} in a separate file?

So as I am doing a lot of similar documents I tend to always use the same preamble for all of my documents. But as I sometimes add new commands, it gets a little iffy to always remember which document ...
curies's user avatar
  • 199
1 vote
1 answer
28 views

Can I \include sub-documents that employ gregorio?

I'd like to better manage a large latex document that incorporates many gregorio scores, by breaking it down into a main tex document and a number of sub-documents, incorporated into main with \...
Ian Williams's user avatar
0 votes
0 answers
22 views

Avoid New Page before and after include

I'd like to have some chapters on the same page without page breaks. Here you are my code: \documentclass[twoside]{report} \usepackage{hyperref} \usepackage{biblatex} \begin{document} \...
Eminent Emperor Penguin's user avatar
0 votes
0 answers
34 views

How to introduce another tex file with its own preambles into a main tex file

My coauthor and I have a tex file for the paper (main.tex), and another tex file for tables and figures (tables_and_figures.tex). Previously, we would compile main.tex, and then compile ...
John Kim's user avatar
0 votes
0 answers
76 views

Insert PDF form with values

I would like to include a filled PDF form in my document. My current workflow is as follows: Fill the form using Adobe Acrobat Print to PDF (to make the editing functionality go away and "bake&...
puchm's user avatar
  • 1
1 vote
2 answers
200 views

Add caption to figure in multicolumn

I need to add a caption to three images placed as follow: I did it by adding the caption command as you can see in the following snippet, but it doesn't work: \begin{figure*}[ht] \begin{center} $\...
Fabio's user avatar
  • 115
1 vote
1 answer
202 views

`No counter 'blx@maxsegment@<number>` error with `\includeonly`

A book manuscript that I used to compile successfully, first with all chapters, and then with only a few, using \includeonly, while retaining the .aux files from the full compilation, now results in ...
chandra's user avatar
  • 2,990
0 votes
0 answers
82 views

\include tex file does not allow me to add anything else afterwards [duplicate]

I am trying to include two tex files at the end of my report. The first file is included as usual but anything I write after that does not appear. This is my code: \section{Code for Question 1} \...
Kyriacos Xanthos's user avatar
0 votes
1 answer
540 views

undefined control sequence in an included file

I am using TeXstudio to handle a long document organized around a main document and a series of included chapters that are separate .tex files (of course the chapter files begin with \chapter and do ...
Fabio Campanile's user avatar
0 votes
0 answers
63 views

alternating page numbers in scrbook

I just realized that my document, written with scrbook does not have the page numbers on every page, and the behaviour looks very strange to me: My document is mainly made of chapters includes with ...
Fabio Campanile's user avatar
0 votes
1 answer
51 views

Including output from a read-eval-print-loop [duplicate]

I would like to include output from a read-eval-print-loop of a programming system. In my case, this would be the Poly/ML Standard ML compiler, but I guess there is a general solution for this, be it ...
Gergely's user avatar
  • 933
2 votes
1 answer
76 views

lstlisting: do not tread include-file as a keyword

I am writing some C++ listings. I would prefer some more keyword highlighting (for cout, cerr, endl, ifstream, string, etc.). However, when I define string as a keyword, also the #include directive ...
Eltjo's user avatar
  • 43
0 votes
0 answers
101 views

Include a pdf file as Thesis Cover

I need to include a cover in my thesis. Its is a specific cover from a pdf file. Supposedly using \includepdf, the pdf should appear, but it does not.
Rich Hard Fine Man's user avatar
0 votes
3 answers
183 views

Using Latex code chunks as library - For reusing latex elements such as figures in multiple representations

In object programming languages often structs exist which help you to reuse code twice or often, but writing that code only one time. A convenient way to write Latex code if the author does not want ...
Jan Hackenberg's user avatar
0 votes
0 answers
35 views

cannot insert image in latex tex file code

tex code $\includegraphics[scale=0.5]{pzt_image.jpg}$ Above is the code in texmaker code. The image is in same folder and the details are also correct. in output pdf pztimage[scale = 0.5]pztimage.jpg ...
velocitydata's user avatar
2 votes
2 answers
395 views

How to \include files with commas in their path

I am part of a large project working with big documents (>100 chapters and ~1000 pages per document). As it stands, we input our partial files into the main document via \input. The project would ...
marquinho's user avatar
  • 1,492
14 votes
1 answer
395 views

How to force LaTeX to error when an \include file is missing/misspelled?

The only file which was meant to be compiled in my Main.tex was specified by the following line: \include{transformtaion} It was compiled without any error using the following command: pdflatex -...
Naghi's user avatar
  • 284
0 votes
0 answers
75 views

For my usecase, should I use \input, \import or \include command, subfile package or standalone package

I am writing a manual. The manual has a bunch of versions intended for different audience. Let's say I am writing files A,B1,B2,B3,C1,C2,C3, where B1,B2,B3&C1,C2,C3 are different versions of the ...
jxhyc's user avatar
  • 1,111
0 votes
0 answers
20 views

How to use import pacakge(Error:test.aux not found)import

I tries to run my latex as a project, with each section using a different text file. But I seem unable to let import command do what I want it to do. Here is the MWE: mainfile \documentclass{article} \...
jxhyc's user avatar
  • 1,111
0 votes
1 answer
55 views

How to prevent \include from changing the position of text in a minipage?

When I place some text in a minipage it is positioned exactly as I expect, at the very top of the minipage. When I move the text to a separate .tex file and use the \include command it messes up the ...
Liisi's user avatar
  • 137
0 votes
0 answers
28 views

Tex adding information to txt

Is there any possibility to add Information to a .txt or other type of document? For example I have the following .tex \begin{filecontents*}{Info.tex} @ P & 1 & 60 & 2 & 77 \\ ...
IH Pro's user avatar
  • 141
0 votes
0 answers
166 views

quick tip on \input or \include?

I'd been trying to compile a pdf from a tex file, using only miktex texworks. But it turned out that the file(gutenberg 38769) was too big to be loaded at all on some devices and so I am now ...
김순규's user avatar
0 votes
0 answers
78 views

Is there an equivalent of the python 'if name == __main__.py' command in latex?

I'm busy working on a multi-document latex file. I use \include to import my different chapters into my main file, and I've defined my preamble in a separate .sty file, that I import into my main file ...
dan_sk8r's user avatar
1 vote
2 answers
131 views

Automatically composing documents from multiple text files which are not LaTeX formatted?

I'm looking for a way to create a songbook out of individual song files. Each song file is a self-contained block of text data consisting of: Song name Song author Some details (optional) Lyrics with ...
Petr Doležal's user avatar

1
2 3 4 5
13