Can't find the way how to fix problem with TEXINPUTS env.

In my docs I use personal .sty templates. Every doc is a new git repository.

Usually I put my template to texlive\texmf-dist\tex\latex\mytemp and use it by \usepackage{mytemp} command in doc.tex file.

Now I decided to create repository for my mytemp package and use it as submodule in new documents.

So document working dir is:

  • mytemp\mytemp.sty
  • mytemp\mytemp1.sty (dependency for mytemp.sty)
  • doc.tex
  • .gitmodules

On windows 7 with Sublime Text 3 build gets an error: LaTeX Error: File mytemp.sty not found

I want to use relative path to my package and tried to edit LaTeXTools setting:

"builder_settings" : {
    "windows" : {
        "env" : {
            "TEXINPUTS" : ".:$TEXINPUTS"    

But error still not fixed.

Any thought how to fix it?

I've tried lots of variants, but still no result.

PS. On MacOS everything builds ok even without redefining TEXINPUTS in LaTeXTools settings.

1 Answer 1


For path variables on posix/unix/mac where you see : (colon) on Windows it is ; (semicolon)

For this disparity you need to go back long time in history and blame the system manufacturers not coming to a concordant method i.e. going back to CP/M using : as a drive to path separator taken forward through IBM /MS DOS ant thus into Windows. so windows will accept / in lieu of \ but will not accept : inlieu of ;

thus try variants on the following which are probably NOT all correct note the first ENV separator after Texinputs" is still:

"TEXINPUTS": ".//;q:/hard coded/location/;./my sub dirs/;$TEXINPUTS;"

Notes There should be NO full colons : inside a windows path unless it is an absolute address for a drive e.g "D:/mydata" and .:/whatever is NOT valid.

.// should translate to current and various subdirs from there
A:/whatever/ is an absolute path and should be terminated/
./my sub/ is a relative subdirectory in space and not recommended
$TEXINPUTS roughly = ; and unlikely to work as the end now translates to ;;;
so for this variable avoid $TEXINPUTS OR %TEXINPUTS% just ensure the last character inside the final" on the line is ; thus end the line with ;"

  • I've already tried to use semicolon ; "TEXINPUTS": ".//:q;./mytemp/;$TEXINPUTS;" or "TEXINPUTS": ".//:./mytemp/;$TEXINPUTS;" Both variants causes xelatex.exe crush
    – Smosia
    Apr 2, 2019 at 8:24
  • both the examples you show have posix separators between the second quotes no such drive as ".:" = crash
    – user170109
    Apr 2, 2019 at 11:28
  • Thank you, your answer helped me a lot!
    – Jan
    Dec 10, 2020 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.