[texworks] can't find file

Jonathan Kew jfkthame at gmail.com
Tue Apr 1 20:00:05 CEST 2014


On 1/4/14 17:00, L.A.D. de Boer wrote:
 > Dear Duncan,
 >
 > Thanks for your reply.
 > I checked and double checked the spelling, including case, including 
path.
 > So I'm afraid that isn't the solution.
 >
 > Thanks anyhow,
 > Lou
 >

It sounds like you're inadvertently running plain tex (or pdftex, or 
xetex) rather than latex (or pdflatex, or xelatex). \input as a macro 
with a brace-delimited argument is a LaTeX-ism; in plain TeX, you should 
NOT have braces, as they'll be interpreted as part of the actual filename.

This would have been easier to diagnose if you quoted the *exact* output 
you're getting, which I suspect includes the error message

   ! I can't find file `{../hdrBook.tex}'.

(showing the braces as part of the name); it would also include the 
initial "banner" line that would confirm what TeX format (plain, latex, 
etc.) you're actually using.

If I'm right, you need to choose the appropriate compilation tool (e.g. 
pdflatex) from the options in the TeXworks toolbar. Or add a comment at 
the top of your file such as

   % !TEX program = pdflatex

that tells TeXworks what tool to use.

JK

 >
 > Op 01-04-14 16:04, Duncan Murdoch schreef:
 >> On 01/04/2014 4:48 AM, L.A.D. de Boer wrote:
 >>> Dear members,
 >>> I'm new to this list. I searched the archive for "can't find file" but
 >>> did not find my problem.
 >>
 >> Given everything you tried, my guess would be that you have misspelled
 >> the filename. Ubuntu normally uses a case-sensitive file system and
 >> Windows doesn't, so you need to get the filename exactly right,
 >> including uppercase versus lowercase.
 >>
 >> Duncan Murdoch
 >>>
 >>> I just transferred my LaTeX files from my Win-pc with Texworks to my
 >>> Ubuntu-pc with Texworks.
 >>> My main file is /home/lou/TexDocs/Fundamentals/main.tex
 >>> Its first line reads   \input{../hdrBook.tex}
 >>> Compiling stops immediately, error: can't find file. (On the Win-pc
 >>> compiling went fine)
 >>> It concerns the header file /home/lou/TexDocs/hdrBook.tex .
 >>> I also copied the header file to the directory Fundamentals and tried
 >>>     \input{hdrBook.tex}and
 >>>     \input{hdrBook}and even
 >>>     \input{/home/lou/TexDocs/Fundamentals/hdrBook.tex}
 >>> But alwasy the same error: can't find file.
 >>> Desperately I also added a path /home/lou/TexDocs to edit>preferences>
 >>> typesetting>paths .
 >>> What should I do?
 >>>
 >>> Thanks, Lou
 >>>
 >>>
 >>>
 >>>
 >>
 >>
 >>
 >
 >
 >





More information about the texworks mailing list