Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative path problem (\input, \include) #1083

Closed
eisenreich opened this issue Apr 18, 2017 · 2 comments
Closed

Relative path problem (\input, \include) #1083

eisenreich opened this issue Apr 18, 2017 · 2 comments
Labels

Comments

@eisenreich
Copy link

eisenreich commented Apr 18, 2017

I'm trying to Include/Input some .tex files.
If I'm trying to do this the error message that the file wasn't found occurs. When I'm using the absolute path, to the file, it works.
After I wrote for example "\input{" then sublime text suggests me possible files which are deeper in hierarchy. But there still occurs the error.

Example:

  • main.tex
  • context/
    -- tables.tex
    -- tables/
    --- table1.tex
    --- table2.tex

Now I like to input files table1.tex and table2.tex into tables.tex.

@eisenreich eisenreich changed the title Relative path problem Relative path problem (\input, \include) Apr 18, 2017
@r-stein
Copy link
Member

r-stein commented Apr 18, 2017

The paths in \input are relative to the tex root, hence you need to use \input{context/tables/table1.tex} inside tables.tex.


If you want to use relative paths you can use the import package (for which LaTeXTools also provides completions in the newest version).
Then you write in your main.tex

% ...
\usepackage{import}
% ...
\begin{document}
% ...
\subimport{context/}{tables.tex} % attention the / must be present

And in tables.tex

\input{tables/table1.tex}

@r-stein
Copy link
Member

r-stein commented Apr 25, 2017

If you have no further questions I will close this issue.

@r-stein r-stein closed this as completed Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants