1

I am new to LaTeX and writing my thesis work and I have a lot of figures to add up in to my report. Now I want to make folders like Chap1, Chap2, ... inside my images folder containing figures for each chapter. I need help how to make it possible?

  • Do you mean how you can include your images in the document when you have them in subfolders? – karlkoeller Aug 4 '13 at 16:01
  • 1
    BTW: Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Aug 4 '13 at 16:02
2

Images can be included from anywhere if you specify the path. Something like \includegraphics{./images/Chap1/figure-name} should be fine, assuming that the images folder is a subfolder of the one containing the TeX. Does that answer your question?

1

If you are anticipating a complex document structure where you want to \input files that are in subdirectories, take a look at the import package. This means you can have a main file that includes a line like this:

\subimport{../figures/case1/}{TexFile.tex}

or rather, \subimport{path to file}{file name}.

and then in that file you can do this:

\begin{figure}[!ht]
        \centering
    \subfloat[Subcaption 1]{\includegraphics[width = 3in]{figure1a.png}}
    \hfill
        \subfloat[Subcaption 2]{\includegraphics[width = 3in]{figure1b}}
        \caption{Main caption}
\end{figure} 

This means you no longer have to keep (too much) track of where your files are.

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.