Inputting files.

theodore.norvell's picture

Hi.  When I use the TeX input command. I get an error that the file can't be found.

Similarly when I use the lstinputlisting command from the listsings.sty package, I get an error message that the file can't be found.

I suspect that this is because SWP likes to copy the main .tex file and any needed graphics files over to a temporary directory and compiles them there.

Either I need to persuade SWP not to copy anything and work in place. Or I have to persuade it to copy over all the adjunct files that are needed for compilation.

Any help would be greatly appreciated.

Cheers,

Theodore Norvell

When you using the \input or

When you using the \input or \include statement directly, you will either need to include the complete file path or place the files to be included in some directory searched for input files.  This is any directory at or below TCITeX\TeX.

A work around is to change your document so it is a master document.  When SW compiles a master document it uses the document directory rather than the temporary directory for the compile directory.  You can insert a subdocument, but then leave the subdocument empty.  You will have to save, close, and reopen the main document as it is when SW reads in the subdocument fields that SW knows it is opening a master document.

theodore.norvell's picture

Thanks George. Are there any

Thanks George. Are there any downsides to using a master document/subdocument structure. E.g. will it affect graphics quality?

Why doesn't SW just always compile in-place? That would make it easier to work with packages such as listings that read external files.

Cheers, Theo

Using a master/subdocument

Using a master/subdocument structure will not change the typeset results vs. a single document.

The current document directory cannot always be used as the compile directory.  For example, if the current directory is read only (maybe on a CD).  I would not disagree that the programmer decision to always use the temporary directory except for master documents is incorrect.