> I've tried the same under Windows (I need this to work with LyX under
> Windows), setting an environment variable to point to a path (and
> reconfiguring and restarting LyX just in case), and specifying that path as
> my \filepath, but I still get the same 'I can't write on file
> `<path>/testreq1.tex' error.

Just to add a bit more information, if I try this from a Windows command
prompt I get the same error.
kpsewhich tells me that TEXMFOUTPUT is set to what I think it is set to:

> kpsewhich --var-value=TEXMFOUTPUT
C:\docs

! I can't write on file `C:\docs\testreq1.tex'

If I remove the path setting from my test.tex file so I basically have this:


\newwrite\tempfile
\immediate\openout\tempfile=testreq1.tex
\immediate\write\tempfile{Some text}
\immediate\closeout\tempfile

\input{C:/docs/testreq1.tex}


and set the -output-directory command line option to pdflatex:

> pdflatex -output-directory C:\docs test.tex

It all works, so I know that I can write files to that directory.  (Setting
the -output-directory like this though with LyX has the downside that LyX
then can't find the output PDF file as it isn't in the temp directory that
it expects.)

Also to note, it also works if I set -output-directory to %TEXMFOUTPUT%.

So, any clues as to why this doesn't work when just relying on the
TEXMFOUTPUT variable, without setting -output-directory?

Thanks and regards,

Steve

Reply via email to