[tex-live] [win32] bibtex and makeindex - Forbidden to openfor writing

Siep Kroonenberg siepo at cybercomm.nl
Wed Sep 15 09:39:46 CEST 2010


On Wed, Sep 15, 2010 at 04:27:38AM +0200, Thomas Jung wrote:
> 
> "Karl Berry" <karl at freefriends.org> wrote in message
> news:201009142145.o8ELjChs007710 at f7.net...
> >   D:\mydocs\tmp\document.1.blg: Forbidden to open for writing
> >   I couldn't open file name `D:\mydocs\tmp\document.1.blg'
> >
> >>From http://tug.org/texlive/doc/texlive-en/texlive-en.html#news:
> >
> > ... BibTeX and Makeindex now refuse to write their output files to an
> > arbitrary directory (like TeX itself), by default. This is so they can
> > now be enabled for use by the restricted \write18. To change this, the
> > TEXMFOUTPUT environment variable can be set, or the openout_any setting
> > changed.
> >
> >I'm glad Siep knew another incantation that may help you.
> >
> 
> Thank you for your tip. That's the reason.
> I could fix this by setting:
> 
> openout_any = r
> 
> in the top-level texmf.cnf file.
> 
> openout_any = a
> 
> schould work too. ;-)
> 
> But had no success to set the environment var like:
> 
> set TEXMFOUTPUT=%CD%\tmp;
> or
> set TEXMFOUTPUT=D:/mydoc/tmp;
> 
> and a relative path doesn't work either. E.g.
> set TEXMFOUTPUT=./tmp;
> 
> Does anybody knows the right syntax?
> Because I would prefer to set it in a script.

If `script' means `batchfile', does this what you want?

cd /d %~dp1\tmp
...
bibtex %~n1
...
cd ..

%~dp1 is drive and path from %1.
%~n1 is just the filename without drive, path or extension.

-- 
Siep Kroonenberg


More information about the tex-live mailing list