[Tex/LaTex] Writing thesis in overleaf. How to create a sub-folder

foldersoverleaf

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
\input{chapters/chapter02/}

But they don't work. I got error message

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

Example:

%\title{University of Bristol Thesis Template}
\begin{document}
\frontmatter
\pagenumbering{roman}
\input{frontmatter/title}
\input{frontmatter/abstract}
\input{frontmatter/dedication}
\input{frontmatter/declaration}
\renewcommand{\contentsname}{Table of Contents}
\maxtocdepth{subsection}
\tableofcontents*
\addtocontents{toc}{\par\nobreak \mbox{}\hfill{\bf Page}\par\nobreak}
\listoftables
\addtocontents{lot}{\par\nobreak\textbf{{\scshape Table} \hfill Page}\par\nobreak}
\listoffigures
\addtocontents{lof}{\par\nobreak\textbf{{\scshape Figure} \hfill Page}\par\nobreak}
\mainmatter
\import{chapters/chapter01/}{chap01.tex}
% Here neither input nor import don't work.
% \input{chapters/chapter02/}
% \import{chapters/chapter02/}
\appendix
\import{chapters/appendices/}{app0A.tex}
\backmatter
\bibliographystyle{siam}
\refstepcounter{chapter}
\bibliography{thesisbiblio}
\end{document}

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

Best Answer

\documentclass[12pt,a4paper]{book}
\usepackage[latin1]{inputenc}

\begin{document}

%% 01 is .tex file inside the shown hierarchy
\input{Chapters/chapter01/01} 
\input{Chapters/chapter02/02}
\input{Chapters/chapter03/03

\end{document}

and you could do

\chapter{Intro}
...

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

\input{chapters/chapter02/}{chap02.tex}

This is not right syntax. Use

\input{chapters/chapter02/chap02.tex}

instead.

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

Related Question