I'm using the template of University of Bristol Thesis on overleaf.com. I'd like to create a folder of chapter02 inside the folder of chapters. But I can't seem to do so. I can manually add a new folder but it goes to files rather than goes inside a specific folder chapters.

This doesn't work for me.

Below is the code of template. I'm confused of input and import command.

I tried to add

\import{chapters/chapter02/} %or

But they don't work. I got error message

 ! LaTeX Error: File `chapters/chapter02/.tex' not found.
    l.373 \input{chapters/chapter02/}


%\title{University of Bristol Thesis Template}
\renewcommand{\contentsname}{Table of Contents}
\addtocontents{toc}{\par\nobreak \mbox{}\hfill{\bf Page}\par\nobreak}
\addtocontents{lot}{\par\nobreak\textbf{{\scshape Table} \hfill Page}\par\nobreak}
\addtocontents{lof}{\par\nobreak\textbf{{\scshape Figure} \hfill Page}\par\nobreak}
% Here neither input nor import don't work.
% \input{chapters/chapter02/}
% \import{chapters/chapter02/}

Update: Thanks for all the help. There is a tip to create sub folder on Overleaf. See @LianTze Lim's reply.

  • 1
    Like I wrote, the command \input{chapters/chapter02/}{chap02.tex} would NEVER work, since that's not the correct syntax. Please stop showing the error output for THAT command, and instead show the error output if you replace it by one of \input{chapters/chapter02/chap02} (exactly as I wrote here) or \import{chapters/chapter02/}{chap02.tex}. – Willie Wong Jun 6 '16 at 19:31
  • 1
    I wouldn't use a template. – Johannes_B Jun 6 '16 at 19:38
  • 2
    Ah, I think this is the relevant quote: "chap02.tex doesn't exist. I'm just trying to add a folder of chapter02 under the folder chapters here. " The short version is "don't do that." The slightly longer version is "you can do that if you create the file chap02.tex; you can even leave it empty. But it has to be there." – Willie Wong Jun 6 '16 at 19:55
  • 1
    Two years ago there was no official UoB template. A few unofficial templates were kicking around but I was unimpressed. – Chris H Jun 6 '16 at 20:02
  • 1
    @Sile_Li Now it appears you are asking about the user interface for Overleaf.com. I am not familiar with it so I cannot help necessarily. But have you tried following the instruction here to create a folder/subfolder? You don't create a folder by putting in TeX code. TeX doesn't do that. You create a folder using the Overleaf (or whatever operating system/interface) and read files from the folder using TeX. – Willie Wong Jun 6 '16 at 21:21


%% 01 is .tex file inside the shown hierarchy


and you could do


for 01.tex and other files.

Look on the wiki here for further details.

If you have another problem, post a MWE and the error message.

Edited after MWE:

You are doing


This is not right syntax. Use



You error clearly states that ".tex" file is not found whereas you want to input "chap02.tex".

  • Thanks Amit. I'm now looking at the compiled file. chapter01 was added by \import. I try to add chapter02 by either \import or \input, but both don't work. Any ideas? – sileli Jun 6 '16 at 19:19
  • add your minimal code here, I and/or others can look and try to find the problem. – novice Jun 6 '16 at 19:23
  • Thanks Amit. I tried \input{chapters/chapter02/chap02.tex}, but still got same error: ! LaTeX Error: File `chapters/chapter02/chap02.tex' not found. l.373 \input{chapters/chapter02/chap02.tex} ^^M. I'm thinking is there anything special about this template, since in the template, there is only \import{chapters/chapter01/}{chap01.tex}, I didn't see \input was used anywhere. I'm a beginner apologize if the question is too obvious. Thanks. – sileli Jun 6 '16 at 19:34
  • 3
    Hi @Sile_Li, there's a trick to creating subfolders on Overleaf, explained here: overleaf.com/help/… and here: overleaf.com/help/… (it's a limitation of the current filetree that we're working to fix). If you're continuing to have trouble, please send us a message at overleaf.com/contact and we'll help there. Thanks, John – John Hammersley Jun 6 '16 at 20:48
  • 4
    @Sile_Li When you create the empty folder chapters/chapter02 on Overleaf, it shows up as a "flat" folder directly under the main folder. But if you add a file to this new folder, the file hierarchy would then fall into place correctly. Alternatively, you can also add a blank file in the chapters folder, but give it the name chapter02/chap02.tex. That would also immediately make the file hierarchy fall into place. Here's an animated GIF to help make things clearer: dropbox.com/s/twgkg06f3ayoinz/sileli-subfolders.gif?dl=0 – LianTze Lim Jun 7 '16 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.