Relative paths when using import and endfloat packages

I am combining multiple tex files (different papers) that are from different projects. I decided to use the import package. Figures and tables of each file should go at the end of a chapter. Because of that, I need to use the endfloat package as well.

Nonetheless, when I try to compile the file generated by the endfloat does not assign the correct path for figures and tables. The endfloat does not use the path I assign for the import package.

Thought how to solve it?

For figures, it seems I can partially solve it with graphpath. I have no idea how to solve it for tables.

%%%%%%%%%%%%
% file 1 - location: ~root/paper1/tex/manuscript.tex
% manuscript.tex
blah blah blah
\begin{table}
\input{../tables/table1.tex}
\end{table}
%%%%%%%%%%%%

%%%%%%%%%%%%
% table 1 - location: ~root/paper1/tables/tables1.tex
% table.tex
\begin{tabular}
\end{tabular}
%%%%%%%%%%%%

%%%%%%%%%%%%
% Main tex file
% location: ~root/
\documentclass{report}
\usepackage{import}
\usepackage{endfloat}
\begin{document}
\chapter{title}
\import{paper1/tex/}{manuscript.tex}
\end{document}
%%%%%%%%%%%%


File ../tables/table1.tex' not found. \input{../tables/table1.tex}

I would do yourself a favour and avoid using sub files this way.

My dad used to tell me "My sons father is my fathers son" I tell my daughter "My daughters father is my Mothers son"

You have nothing at all wrong with the mwe files they work perfectly loading any table in that location. However what IS that location?

So why would I get a message such as

there is only one reason i.e. you have not given us the correct relative location of table1.tex which you store in

~root/paper1/tables/table1.tex


If I change \input{../tables/table1.tex} to

\input{paper1/tables/table1.tex}


then your mwe runs without error.

• Thanks for answering. I don't like this structure either. However, I need it to put together different articles in my dissertation. As you mention, we did not get any error when doing my last instructions. Thanks for catching that. I did some edits in my post to reproduce my error. I think you can reproduce my error now. – Leonardo Rosa Jul 1 at 13:55