0

I have a directory structure consisting of a a Main folder in which there are subfolders Chapter1, Chapter2, ...

Each of these subfolders contains a tex file and a number of image files that are to be used in that particular chapter only.

The chapter files are included in a main.tex which resides in the main folder and consists basically of:

\documentclass{article}
\begin{document}
    \input{Chapter1/chapter1.tex}
    \input{Chapter2/chapter2.tex}
\end{document}

I am aware that I can include image files in a chapter.tex by specifying the path relative to the Main folder, e.g. in chapter1.tex I could write:

\includesvg{Chapter1/img}

Is there a way to avoid specifying the folder (or to specify it only once)? I'd rather write:

\includesvg{img}
  • 1
    In the svg package documentation is described a \svgpath command. – vi pa Aug 21 at 9:08
  • @vipa True, I can add the location of image directories in main.tex using \svgpath{} and it works. My only issue is that I can't use the same image file name in two different chapters. Is it possible to specify the svgpath specifically for the inputted files only or only alltogether for main.tex? – user1583209 Aug 21 at 21:26
  • I think that is not a good practice having files with the same names. You can create a folder only for the images of your document. – vi pa Aug 22 at 11:55

Your Answer

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

Browse other questions tagged or ask your own question.