Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [subfiles]

{subfiles} is about a class and package for multi-file projects in LaTeX

Filter by
Sorted by
Tagged with
1 vote
1 answer
48 views

Path problem with subfiles, and fontspec

I have the project with the following structure: fonts/ times.ttf timesbd.ttf timesbi.ttf timesi.ttf sections/ section1.tex main.tex My main.tex contains: \documentclass{article} \...
Enevevet's user avatar
  • 796
1 vote
1 answer
47 views

pdfpages Error with subfiles and XeLaTeX

I have a project with the following structure: ./sections/appendices/appendices.tex ./sections/appendices/my_file.pdf main.tex Here's a MWE: main.tex \documentclass{article} \usepackage{pdfpages} \...
Enevevet's user avatar
  • 796
1 vote
1 answer
29 views

subfiles — compile \printindex separately

subfiles is designed to both work as \input, but also allow to compile a subfile individually in order to save compile time. I have a big multi-file project and I want to test my index style while ...
antshar's user avatar
  • 4,652
0 votes
1 answer
31 views

Compile glossary files individually for testing

Is there a setup that allows importing glossary definitions from another file, while at the same time being able to compile this file in a standalone manner (for testing purposes)? acronyms.tex \...
Hyperplane's user avatar
1 vote
1 answer
44 views

Bibliography with subfiles package in Texmaker

I've been trying to use a template I developed in Overleaf in Texmaker for my thesis. I would like to use the subfiles package so I can compile parts of my (eventually) large document separately, ...
aleks's user avatar
  • 33
2 votes
1 answer
218 views

Different definitions of commands in different chapters with subfiles

I have a LaTeX project which I've created using subfiles which contains several nested directories. Each of the directories other than the bottom-most one in the hierarchy contains a main.tex file ...
hexagonNoah's user avatar
0 votes
0 answers
43 views

Use tex subfile as appendix with separate TOC and frontpage

I have two files that are very similar; their preambles are very similar. They are also both full documents with their own chapters, front pages and tables of content. I want to use one of those files,...
Luctia's user avatar
  • 101
2 votes
2 answers
55 views

Demoting unnumbered section using newenvironment not working for subfile

I am trying to export a tex using subfile into a main tex file. The file structure is the same for both the main file and subfile. The importing of the subfile is an addendum. The leveldown of the ...
Ozooha Ozooha's user avatar
4 votes
2 answers
80 views

Referencing ExPex example from a different subfile?

Is there any way I can get subfiles to correctly reference ExPex example numbers? Say I had a main file which contained two subfiles. One subfile contains an ExPex example, and the other contains a ...
geordiekidd's user avatar
1 vote
1 answer
233 views

latexmkrc and subfiles

I have a LaTeX-Project that is split into multiple files using the package subfiles. The project has the following structure: main.tex .latexmkrc lib/custom-class.cls lib/custom-package.sty foo/bar....
GeF's user avatar
  • 13
1 vote
1 answer
61 views

Subfile compilation fails bibliography

I am working on overleaf, and I am trying to set up a large project. When I compile main.tex the citation appears, but when I do the local compile of content/mini.tex they do not. Any suggestions? My ...
Carlos Mougan's user avatar
2 votes
2 answers
227 views

How to make bibliography to work in subfiles of a subfile?

I am writing a long report that needs the help of the subfiles package to break it into individual sections. It works like a charm until I further split one of the subfiles into two. Previously, the \...
Shixi's user avatar
  • 23
1 vote
2 answers
102 views

Add separate \maketitle to subfile which only executes when the subfile is compiled independently

I'm writing a document with multiple files, and I hope to add titles to them like so: %%% main.tex \documentclass{article} \usepackage{subfiles} \title{Main} \begin{document} \maketitle Some text \...
Canyon's user avatar
  • 309
1 vote
0 answers
80 views

Packages used in subfiles not working in main.tex

I'm following Overleaf example of 'subfiles' ... and also some examples of the 'verse' and the 'song' packages The subfiles work well but when called by main.tex the song package does not work ...
AWE's user avatar
  • 111
1 vote
0 answers
53 views

How can i add a beamer LateX file to the main LateX file? [closed]

I am trying to add a Beamer LateX file to my main LateX file using the command subfile. After some research, I found the \usepackage{beamerarticle} package that actually helped me insert it into the ...
Γιάννης Γιαννάκος's user avatar
1 vote
2 answers
77 views

Better way to subfile multiple files with similar titles?

I have a set of lecture notes and each lecture is contained within a subfile, and the main file contains a list of all the lectures like so: \subfile{lec-1} \subfile{lec-2} % more files labeled lec-X \...
Revise's user avatar
  • 365
0 votes
0 answers
40 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
  • 572
3 votes
1 answer
1k views

Overleaf - Compiling multiple .tex files into multiple outputs (alternatively, nesting document classes?)

Clarification: I am looking for a way to automatically run pdflatex on multiple .tex files to produce multiple separate .pdf files when I click the Recompile button in Overleaf. I have multiple .tex ...
L Duran's user avatar
  • 33
3 votes
1 answer
461 views

The best/correct order of loading hyperref, cleverref and subfiles packages

I got it from overleaf that the subfiles package is best loaded last in the preamble. Besides, it is known that hyperref is recommended to loaded last too. In another answer, I got that Load varioref ...
GingerKitten7951's user avatar
2 votes
1 answer
525 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
232 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
2 votes
1 answer
427 views

Citation Problems when using subfiles

I am aiming for a multifile Latex document and I am working on it in Overleaf. I would like each chapter to have separate bibliography sections (this can be done apparently with the chapterbib package)...
Heath's user avatar
  • 207
1 vote
1 answer
140 views

Loading a preamble from a separate file than the main file with the subfiles package. When I compile the main.tex everything works but not subfile

I have a document with a very long preamble in the separate file general.tex. The main.tex looks something like \documentclass[10pt, letterpaper]{article} \input{general.tex} \usepackage{subfiles} \...
Alex Cong's user avatar
1 vote
1 answer
206 views

biblatex and subfiles: New type of previously reported error

Let me start off by saying that I am aware that variants of this question have been asked many times before (at least in 1, 2, 3, 4, 5, 6, 7, 8), yet despite trying all of the solutions I've read, my ...
Shady Puck's user avatar
3 votes
1 answer
569 views

Subfiles not finding `main.tex` reliably

The minimal working example could not be simpler: I have a main.tex file like so: \documentclass{article} \usepackage{subfiles} \begin{document} \subfile{Subfiles/subfile} \end{document} and a ...
Jan Matula's user avatar
2 votes
1 answer
126 views

Is it possible to have a search path for subfiles?

Similar to how the graphicspath works, would it be possible to create a search path subfilespath for .tex files instead of images? For example, given a folder structure as below. - Main - FolderA ...
Steven's user avatar
  • 153
1 vote
1 answer
38 views

\subfile expands robust commands (so differs from \input in that respect)

I'm overloading _ as a non-breakable dash in nonmath, and this poses no problem with \input: \documentclass{article} \usepackage{babel} \let\subscr=_ \catcode`_=\active \DeclareRobustCommand_{\ifmmode\...
Michaël's user avatar
  • 1,444
2 votes
1 answer
1k views

Is there a way to always compile the main document?

I am using overleaf and I have a main document and several subfiles. Is there a way of always having the main file compile even if I have selected and I am editing subfiles? Cheers in advance, Blake
Blake Rowan's user avatar
3 votes
2 answers
152 views

Does subfiles work with memoir?

I am considering whether to to try to use subfiles with memoir, biber, and xelatex. Before I try, I wanted to ask: does this kind of setup work with subfiles? Usually I would just try it myself and ...
Alex Roberts's user avatar
  • 1,379
1 vote
1 answer
211 views

use bib2gls in individually compiled subfiles

I am trying to use the glossaries-extra package with record (using bib2gls) option for a symbols list in a long document where each chapter can be compiled individually using the subfiles package. My ...
mayonnaise's user avatar
1 vote
1 answer
155 views

subfiles "Command already defined" problem

I have the following problem: Using a combination of the subfiles package, 4 files, a subdirectory, and input in the preambles, and where the 'outer' file subfile-imports the 'inner' file in the ...
Jon's user avatar
  • 141
3 votes
1 answer
203 views

Graphicspath with several paths not working when only defined in the subfile

I have a main document which calls several modules and also uses images from upper folders, this is the structure of the folders: Icons Common Covers Test All main.tex Module subfile.tex ...
fancy_docs's user avatar
0 votes
1 answer
554 views

Title page not showing up in subfile{} when included in main.tex

I am compiling a different documents of article class type and I am using a main tex file of report class to compile it into one pdf file. I used subfile{} to do so but the \maketitle{} page in ...
Vaishnav's user avatar
1 vote
1 answer
294 views

One pdf file for each chapter in addition to the global pdf

For my lecture notes, I have a big tex file containing \include commands (one for each chapter). Is there a way to typeset in one go : the whole file: i.e. all the files appearing in the includeonly (...
jowe_19's user avatar
  • 1,013
1 vote
1 answer
213 views

A error about subfiles and tikzpicture

I have a main.tex and a subfile. Subfile.tex file works independently, but when I run it with main.tex, the soft clip code gives an error. Is there any way to fix this? Where am i doing wrong? My main....
Mehmet Onat's user avatar
1 vote
1 answer
783 views

Bibliography with subfiles

I am writing my PhD thesis in Overleaf and having issues with bibliography while using subfiles command. Ideally I would like one bibliography right at the end of the thesis instead of different ...
User12's user avatar
  • 11
0 votes
0 answers
19 views

Error when trying to input an external file with xltabular package `\hline ->\noalign` [duplicate]

I am trying to stack several tables one on another. For this I am using xltabular packages. I want to input text from another file. The following code works without problem when removing / commenting ...
ecjb's user avatar
  • 935
1 vote
1 answer
142 views

First page number misplaced when using subfile and loadgeometry

In a document (memoir class), I need to have a title page with large margins compared to the rest of the document. To do that, I use \savegeometry/\loadgeometry. However, if I include this title using ...
tobiasBora's user avatar
  • 9,004
2 votes
1 answer
370 views

Bibliography imported from main and subfiles

I have a bib file that I need several subfiles to have access to. Currently the file structure is: project main.tex Bib.bib Chapters Chapter1 Chapter1.tex I can ...
andrew's user avatar
  • 125
1 vote
0 answers
126 views

Names of the files using subfiles package

I was wondering if there is a way to include with the subfiles package, files (in a main tex file) that don't have english names, especially in my case greek, but generally in other languages? I have ...
Νικολέτα Σεβαστού's user avatar
1 vote
0 answers
34 views

Why would a \subfile{} call not return? [duplicate]

Tex presents no errors. Output Calling Sub2.tex. Sub2.tex entered. Calling Sub1.tex. Sub1.tex entered. Sub1.tex completed. Directory structure ./main.tex ./Sub2.tex ./Sub1.tex main.tex \...
DevJoe's user avatar
  • 11
1 vote
1 answer
363 views

Bibtex issues with subfile

Good day I am attempting to cite in a subfile using a global BibTeX file but I keep getting the following error You have cited something which is not included in your bibliography. Make sure that the ...
Susan-l3p's user avatar
0 votes
1 answer
272 views

My natbib referencing is not working on one particular PC and I don't know why

I am writing my PhD thesis, which is split into multiple chapter subfiles with a masterfile that combines them all for convenience of editing. I have attempted to implement citations in the subfiles ...
Matt Rogers's user avatar
1 vote
1 answer
141 views

hyperref and bibunit: Keep the destination of the cite-link in the same bibunit

I have a rather big and complex document with several bibunits and recurring citations. By default, all citations target the first appearance of a reference in a bibliography, leading to awkward jumps ...
Sir Cornflakes's user avatar
1 vote
2 answers
305 views

Possible subfiles/setspace issues

I seem to be having difficulty preventing my document from overwriting \doublespacing commands. I have a document using a subfiles structure (a Main.tex) that calls a number of subfile .tex's for each ...
Jerome's user avatar
  • 173
1 vote
1 answer
151 views

Tikz-graphic gets squashed in subfigure

I try to display two tikz-plots in the same figure. But one gets totally squeezed into a small area. Here I use the same file in both subfigures, an get this result: \usepackage{subcaption} \...
dba's user avatar
  • 659
1 vote
1 answer
187 views

Subfiles is not ignoring \end{document}

As far as I understand the subfiles for use in the subfiles package should all end with \end{document}, so that they can be built independently. However, I'm finding that, in order for each of my ...
Ben's user avatar
  • 11
2 votes
1 answer
675 views

subfiles: bibliography not found in chapters

I'm using subfiles to split my document into multiple files, one per chapter. It works great, except for bibliography: if I compile the main document, the items are found, but if I compile a chapter ...
tobiasBora's user avatar
  • 9,004
1 vote
1 answer
146 views

\newgeometry not applying to the last page of a subfile, but only in main document

I'm working on a two-sided document which collates a number of files using the subfiles package, some of which require wider margins for margin notes. However, the \newgeometry command consistently ...
cora's user avatar
  • 13
0 votes
1 answer
975 views

How can I enforce creation of *.aux files?

I want to write a thesis using subfiles and xr for external references. I use subfiles because that allows me to compile chapters separately without having to compile the whole thesis. My problem is ...
Insa's user avatar
  • 1

1
2 3 4 5 6