General\input{} "file ".." not found.

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Dyexz
Posts: 3
Joined: Mon Nov 17, 2014 11:53 am

\input{} "file ".." not found.

Post by Dyexz »

Hi,

I/we haven't been using LaTeX for very long and I/we are getting a very peculiar error that to my knowledge should not happen:

Code: Select all

! LaTeX Error: File `../projekt/preamble.tex' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)
Enter file name:
! Emergency stop.
<read *>
l.1 \input{../projekt/preamble.tex}
*** (cannot \read from terminal in nonstop modes)
Here is how much of TeX's memory you used:
41620 strings out of 493921
908919 string characters out of 3144876
1096135 words of memory out of 3000000
44186 multiletter control sequences out of 15000+200000
31689 words of font info for 88 fonts, out of 3000000 for 9000
841 hyphenation exceptions out of 8191
70i,20n,78p,10488b,869s stack positions out of 5000i,500n,10000p,200000b,50000s
! ==> Fatal error occurred, no output PDF file produced! 
this is the code:

Code: Select all

\input{preamble.tex}   % This seem to generate the error but I dont know why?
\input{macros.tex}

\begin{document}

\include{frontpage}
\include{titlepages}
\include{preface}
%\include{Forord}

\tableofcontents
Both the master.tex file and the preamble.tex file is in the same folder so there shouldn't be any problems importing it using the \input{} command, but there is clearly something wrong. I have no clue why it is looking in the path "../projekt/" (that path does not exist)

has anyone else experienced this and anyone that can help solve it ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: \input{} "file ".." not found.

Post by Johannes_B »

Hi and welcome,
you shouldn't externalise the whole preamble, this leads to confusion. For example, your macros are also defined in the preamble.

There are may ways to externalize some parts of the code that will stay the same. you can also biuld your own format to speed up the compilation.

LaTeX goes one folder up, into directory projekt and looks for file preamble.tex, but from the code i cannot see why. Please try to run your example from the command line, so we can rule the editor out.

Btw: If you are not sure, you should omit file endings. LaTeX usually does a pretty good job in deciding what to input ;-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Dyexz
Posts: 3
Joined: Mon Nov 17, 2014 11:53 am

\input{} "file ".." not found.

Post by Dyexz »

I did some additional digging around and found out what was causing the error, which was one of the documents that I was importing also had the commands

Code: Select all

\usepackage{}
\begin{document} 
\end{documents}
That's what I get for switching from 1 file to multi-file structure, it can be easy to overlook small things in a very extensive file.. :o

thanks for the reply though, made me investigate further on what the cause was. :)
Post Reply