GeneralInput File not found in working Directory

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
wjahnva
Posts: 4
Joined: Thu Jun 07, 2012 12:26 am

Input File not found in working Directory

Post by wjahnva »

Hi,
I have used LaTeX for over 10 years now, and thought I knew how it works...big mistake!

Here's my problem:
I recently upgraded to Ubuntu 12.04 (or installed it from scratch to be exact), and installed texlive-full (as I always had done before).

Now when I try to compile a document (from the directory where my input file is), I get the following error:

Code: Select all

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
! I can't find file `presentation.tex'.
(presentation.tex is my input file). When I put the complete path it works, but I get a different error:

Code: Select all

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(/home/my_name/Desktop/presentationJune2012/presentation.tex
! Undefined control sequence.
l.1 \documentclass
                  [dvipsnames,table,t,hyperref]{beamer}
I have now re-installed texlive-full but I get the same error.

The whole thing makes absolutely no sense to me....why does it not find a file which is in the same directory? I tried with other documents, and get the same error.

Any ideas what could be wrong? I suspect it is my OS rather than the LaTeX distribution, but no idea how to fix it...

Thanks!
Last edited by Stefan Kottwitz on Thu Jun 07, 2012 8:39 am, edited 1 time in total.

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Input File not found in working Directory

Post by Stefan Kottwitz »

Hi wjahnva,

welcome to the board!

It seems that you compile with pdfTeX, but not with pdfLaTeX. (pdf)TeX doesn't know \documentclass because it's a (pdf)LaTeX command. Either use pdflatex on the console, i.e. in a terminal window, or change your editor settings to typeset with pdfLaTeX.

Stefan
LaTeX.org admin
wjahnva
Posts: 4
Joined: Thu Jun 07, 2012 12:26 am

Re: Input File not found in working Directory

Post by wjahnva »

Hi Stefan,
thanks for your reply, pdflatex actually works...

but it doesn't fix my initial problem, it still doesn't find the input file in the working directory. This is annoying, since I compile it from within emacs, and I don't want to open a new shell to compile it with complete path every time. And even if there's a work around (I guess I could tell emacs to put the whole path), I'd like to know where this problem suddenly comes from....had never had that before.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Input File not found in working Directory

Post by Stefan Kottwitz »

Perhaps post your .log file here, as attachment.
Ensure that emacs actually works in the document directory, and is not calling the document from another directory.

Stefan
LaTeX.org admin
wjahnva
Posts: 4
Joined: Thu Jun 07, 2012 12:26 am

Re: Input File not found in working Directory

Post by wjahnva »

Hi Stefan,
I found the problem (although I still don't understand the cause). Maybe you can explain it to me:

In my .bashrc file I set and exported TEXINPUTS (it was set as .texmf/tex/latex, and it was where I had my own sty files and shortcut declarations). I commented it out, and now it works.

What I don't understand is that it used to work fine....is it a problem with the updated texlive package? Is there a way of defining TEXINPUTS that won't break my LaTeX distribution?

Anyway, thanks for your time ;)

Cheers,
Wolfram
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Input File not found in working Directory

Post by Stefan Kottwitz »

Hi Wolfram,

if you define TEXINPUTS, you should also include the current directory, which is used by default if TEXINPUTS isn't set. For example:

Code: Select all

export TEXINPUTS=".:~/.texmf/tex/latex/";
The dot . is a shortcut for the current directory. The : separates the paths.

Stefan
LaTeX.org admin
wjahnva
Posts: 4
Joined: Thu Jun 07, 2012 12:26 am

Re: Input File not found in working Directory

Post by wjahnva »

yeah, I fixed that now and it all works fine. Actually now I am wondering how it used to work before....the current setting (where I include the "." in TEXINPUTS) makes much more sense.

Anyway.........(sigh)
Post Reply