[texhax] Setting the right environment vars and config

Thomas Jung thomas.jung at public-files.de
Sat May 8 23:40:05 CEST 2010


Hello,

I have a problem to get the right configuration on a Windows 7 mashine.
First I installed TexLive 2009 and if I start "latex mytest.tex" all seems
to
be fine and the file will be compiled.

Then I would like to add additional paths (because my project is organized
in several subdirectories) where latex should search for my own project
realted
style and bib files.. Btw: in miktex there is an option
"--include-directory=" e.g.
"--include-directory=bib"

So I asked in the tex.live mailinglist "include directories to search for
additonal files
like *.bib *.sty, etc." how to do this and got a very helfull hint from a
user. He said
I have to set BIBINPUTS and TEXINPUTS and latex, bibtex, etc will search
theses paths too.

OK, I wrote a batch wrapper which sets

set BIBINPUTS=.;bib
set TEXINPUTS=.;tex\sty

as relative paths and the additional paths will be found.

But!

The above example "latex mytest.tex" doesn't work anymore and I get the
error:

! LaTeX Error: File `book.cls' not found. UUUUhhhh ;-)

Strange, I think. Because latex starts to compile and bibtex finds now my
bib files and latex finds my own style files in the subdirectories given by
the
environment vars.

But it looks like this BININPUTS and TEXIINPUTS _overwrites_ the defaults

OK, I searched at the documentation (kapthesa) and there are many VARS which
sets all the paths. e.g. TEXMF, TEXMFLOCAL, TEXMFMAIN, TEXMFCNF, etc.

I also find this statement in the documentation and this is very confusing.

http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-500007.1

which says:

Automatic setting of environment variables.
No manual configuration steps are required.

But in fact there are _no_ environment vars set in Windows 7 (Setup as
elevated Adminsitrator)
Perhaps this was the behavior of previous versions of texlive and with
previous versions of windows. But with Windows 7 and Tex-Live 2009 there
are _no_ environment vars set by the tlmgr and if a user sets this
BIBINPUTS,
TEXINPUTS var, the installation doesn't work ;-)

Ok, but now do I have to set _ALL_ of this environment Variables by hand, if
I set this aditional paths? btw: Would be good if latex, bibtex, etc would
just _extend_
the "defaults" which are defined  AFAIK in
"C:\texlive\2009\texmf\web2c\texmf.cnf"
and not to overwrite them.

Is it enough to set
TEXMF=C:\texlive\2009

and then I can use/set the vars in my batch like

set BIBINPUTS=.;bib;%TEXMF%
set TEXINPUTS=.;tex\sty;%TEXMF%

or should I set the var
TEXMFCNF=C:\texlive\2009\texmf\web2c
of just
TEXMFCNF=texmf\web2c

and can set my customizations like:

set BIBINPUTS=.;bib
set TEXINPUTS=.;tex\sty

, because latex, bibtex will now search the TEXMFCNF subdir and find
the texmf.cnf file?

Don't know/sure what is the best practice and what will work


Thomas



More information about the texhax mailing list