# Using figures in subfiles [closed]

I have just started to use the subfilespackage. I have the following folder structure:

|-Document
| Test.tex
|-img
| hierarchy.png
|-tex
| subtest.tex


The code for each document goes:

For Test.tex:

\documentclass[10pt,a4paper]{report}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{subfiles}
\graphicspath{ {F:/Master/V/Thesis/Document/img/} }
\begin{document}
Hello
\subfile{./tex/subtest.tex}
\end{document}


And for subtest.tex

%subtest.tex
\documentclass[F:/Master/V/Thesis/Document/Test.tex]{subfiles}
\begin{document}
Test text
\begin{figure}[h]
\centering
\includegraphics[width=1\textwidth]{hierarchy}
\caption{Hierarchy}
\label{fig:hier}
\end{figure}
\end{document}


The code runs when I don't include the figure, however if I include the figure the code doesn't compile and (I am using TeXstudio) there is no message in the log other than Process exited with error(s).

How can I make it work so that it compiles with the figure in the subfile?

## closed as off-topic by user36296, Mensch, Stefan Pinnow, user121799, Phelype OleinikNov 1 '18 at 17:03

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• this works for me. You find error messages in the file subtest.log – touhami Jan 30 '16 at 21:23
• Thanks, I just checked the log and it was a problem with the format of the image I was using – Amphiaraos Jan 30 '16 at 23:57
• I'm voting to close this question as solved according to comments – user36296 Nov 1 '18 at 15:36