I have a Tex file that I am able to compile using TeXnicCenter with no issues on my local computer. I also need to compile it on the server that runs on Linux, and my experience with Linux is limited.

On the terminal, I typed:

[user@server myfolder]$ pdflatex -jobname = filename

which gives me this error message:

! I can't find file `.aux'.
\enddocument ...keatletter \@@input \jobname .aux 
                                                  \fi \@dofilelist \ifdim \f...

I found two other similar questions (1) and (2). The question (1) does not really apply to my issue. The question (2) seems a possible solution. It seems that pdflatex is looking for the filename.aux in the wrong folder.

I do not have the filename.aux on my folder differently from question (2). I thought pdflatex would create it when I run it. Nonetheless, I tried:

pdflatex --output-directory="/home/user/myfolder" --file-line-error --interaction=nonstopmode "filename.tex"

which gives me the same error as above.

Any ideas?

  • Does just pdflatex filename.tex work on the server, so without setting the jobname or the output directory?
    – Marijn
    Commented Jun 24, 2020 at 18:51
  • It looks a bit like you do \def\jobname{} somewhere in the middle of your document, because LaTeX opens the .aux file correctly at \begin{document}, but can't at \end{document}. Try \edef\x{\jobname}\show\x before \end{document} to see what is the value of \jobname. Commented Jun 24, 2020 at 18:56
  • @Marijn it works! I was using "-jobname=" because the current script (which I have worked based on) has pdflatex -jobname = "filename" temp > temp2. Commented Jun 24, 2020 at 19:29


You must log in to answer this question.

Browse other questions tagged .