[Tex/LaTex] MikTeX does not use TEXMFLOCAL environment variable

environment-variablesmiktex

I use TEXMFLOCAL, TEXINPUTS and TEXFONTMAPS to tune tex compilation. Everything works fine under Linux and Mac OS X, but MitTeX under Windows breaks my expectations.

c:\tmp\tex> type test.bat
set TEXMFLOCAL=some;thing
kpsewhich --var-value TEXMFLOCAL

c:\tmp\tex> test.bat

c:\tmp\tex>set TEXMFLOCAL=some;thing

c:\tmp\tex>kpsewhich --var-value TEXMFLOCAL
C:/Documents and Settings/user/Application Data/MiKTeX/2.9

Why the value of the environment variable TEXMFLOCAL is ignored? Do I set it wrong, or is it a feature of MikTeX? How to affect MikTeX's TEXMFLOCAL, TEXINPUTS and TEXFONTMAPS from a script (.bat or .py)?

Best Answer

The only environment variables recognised (at least the documented ones) by MiKTeX globally are (MiKTeX manual, Chapter 8):

BIBINPUTS Extra paths to locate .bib files.

BSTINPUTS Extra paths to locate .bst files.

MFINPUTS Extra paths to locate METAFONT input and openin files.

MIKTEX_REPOSITORY Location of the package repository. This can be either a fully qualified path name (a local package repository) or an URL (a remote package repository).

MIKTEX_TRACE Comma-separated list of trace stream names (see Chapter 9, Trace Streams). If this variable is set, then MiKTeX programs will write trace messages into the DebugView window.

MPINPUTS Extra paths to locate MetaPost input files.

TEXINPUTS Extra paths to locate TeX \input and \openin files.

TFMFONTS Extra paths to locate TeX font metric files

If you want to know hot to set a local texmf tree have a look at Create a local texmf tree in MiKTeX

Related Question